Armante 2024-04-02 12:31 采纳率: 0%
浏览 937
已结题

PX4仿真gazebo报错 make px4_sitl_default gazebo

img


PX4仿真gazebo报错 make px4_sitl_default gazebo,有佬可以解决吗?

  • 写回答

17条回答 默认 最新

  • 檀越@新空间 2024-04-02 12:31
    关注

    中午好🌞🌞🌞
    本答案参考ChatGPT-3.5

    根据你的描述,你在运行PX4仿真gazebo时遇到了报错,具体报错信息如下:

    FAILED: CMakeFiles/sensor_msgs.dir/Airspeed.pb.cc.o
    ST TEST DYN LINK -DBOOST THREAD DYN LINK-DLIBBULLET VERSION=2.88 -DLIBBULLET VERSION GT 282 -Dsensor msgs EXPORTS -I/home/ling/PX4-Autopilot/Tools/simulation/gazebo-classic/sitl gazebo-classic/include -I. -I/usr/include/eig en3/eigen3 -I/usr/include/gazebo-117gazebo/m -I/home/ling/PX4-Autopilot/build/px4_sitl_default/mavlink-I/home/ling/PX4-Autopilot/build/px4_sitl_default/mavlink/mavlink/v2.0-I/usr/include/Paging-I/home/ling/PX4-Autopilo /gazebo sic/externe -I/usr/incl 71ib/x86_64-1i isystem /usr/inc sr/incl llet system /usr/ncL ude/simbody -isystem /usr/include/se ormat-9.10-isyster -isystem /usr/inc ude/OCR e/0GRE/Terrain isystem /usr/include/OCRE/Paging-isyste stem /usr/include/uuid -02 -g -DNDEBUG -fPIC -Wno-deprecated-declarations -Wno-address-of-packed-member -I/usr/include/uuid -std=gnu++17 -MD -MT CMakeFiles/sensor_msgs.dir/Airspeed.pb.cc.o -MF CMakeFiles/sensor_msgs.dir/Ai rspeed.pb.cc.o.d -o CMakeFiles/sensor_msgs.dir/Airspeed.pb.cc.o-c Airspeed.pb.cc
    In file included from Airspeed.pb.cc:4: Airspeed.pb.h:12:2:error:#error This file was generated by a newer version of protoc which is 12 #error This file was generated by a newer version of protoc which is ed.pb.h:13:2:error:#error incompatible with your Protocol Buffer headers.Please update rror incompatible with your Protocol Buffer headers.Please update Airspeed.pb.h:14:2:error:#error your headers. 14 #error your headers.
    In file included from Airspeed.pb.h:27, from Airspeed.pb.cc:4:
    /usr/include/google/protobuf/inlined_string_field.h:56:22:error:expected ';at end of member declaration 561 InlinedstringField() tobuf/inlin error:'COOGLE_PROTOBUF_ATTRIBUTE_ALWAYS_INLINE'does not name a type;did you mean 'GOOGLE_ATTRIBUTE_ALWAYS_INLINE'? GOOGLE ATTRIBUTE ALWAYS_INLINE
    

    根据错误信息,出现了与Protocol Buffer头文件不兼容的问题。为了解决这个问题,你可以按照以下步骤进行操作:

    1. 确认你的Protocol Buffer头文件的版本是否与生成Airspeed.pb.cc的版本匹配。如果版本不匹配,请更新头文件。
    2. 检查你的编译环境是否正确设置了Protocol Buffer的路径和版本。确保你的编译环境使用了正确的头文件和库文件版本。
    3. 如果以上步骤都没有解决问题,你可以尝试手动修改Airspeed.proto文件,并重新生成Airspeed.pb.cc文件。在修改之前,可以参考Protocol Buffer文档来了解如何正确定义字段和消息结构。
    4. 修改完成后,重新编译并运行PX4仿真gazebo。

    **注意:**如果你修改了Airspeed.proto文件,请确保你的修改符合Protocol Buffer的规范,并遵循正确的语法和命名约定。

    希望这些解决方案对你有帮助。如果你需要更多帮助,请提供更多信息,例如你的操作系统、PX4版本和相关代码片段。这样可以更好地帮助我们理解问题并提供更准确的解决方案。

    评论 编辑记录

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 4月6日
  • 创建了问题 4月2日