Open agtekrobotics opened 3 months ago
I encountered the same error while building during MAVROS source installation. Upon inspecting the gps_status.cpp file, it seemed that GPS_RAW and GPS_RAW2 had the same fields. So, I added the missing field to GPS2_RAW in the mavlink/message_definitions/v1.0/common.xml file, and the issue was resolved.
The code I added to GPS2_RAW with id=124 in the common.xml file is as follows:
<message id="124" name="GPS2_RAW">
<description>Second GPS data.</description>
...
<extensions/>
<field type="int32_t" name="alt_ellipsoid" units="mm">Altitude (above WGS84, EGM96 ellipsoid). Positive for up.</field>
<field type="uint32_t" name="h_acc" units="mm">Position uncertainty.</field>
<field type="uint32_t" name="v_acc" units="mm">Altitude uncertainty.</field>
<field type="uint32_t" name="vel_acc" units="mm">Speed uncertainty.</field>
<field type="uint32_t" name="hdg_acc" units="degE5">Heading / track uncertainty</field>
<field type="uint16_t" name="yaw" units="cdeg">Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use 65535 if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north.</field>
</message>
...
This is only bug and feature tracker, please use it to report bugs or request features.
Issue details
When trying to install mavros I am having issues with catkin build in the catkin_ws
More specifically the issue is with the mavros_extras package relating to the gps_status.cpp
MAVROS version and platform
Mavros: 1.18.0 ROS: Noetic Ubuntu: 20.04
Catkin build logs below:
Errors << mavros_extras:make /home/admin/catkin_ws/logs/mavros_extras/build.make.006.log /home/admin/catkin_ws/src/mavros/mavros_extras/src/plugins/gps_status.cpp: In member function ‘void mavros::extra_plugins::GpsStatusPlugin::handle_gps2_raw(const mavlink_message_t*, mavlink::common::msg::GPS2_RAW&)’: /home/admin/catkin_ws/src/mavros/mavros_extras/src/plugins/gps_status.cpp:107:40: error: ‘struct mavlink::common::msg::GPS2_RAW’ has no member named ‘alt_ellipsoid’ 107 | ros_msg->alt_ellipsoid = mav_msg.alt_ellipsoid; | ^
~~~~ /home/admin/catkin_ws/src/mavros/mavros_extras/src/plugins/gps_status.cpp:108:40: error: ‘struct mavlink::common::msg::GPS2_RAW’ has no member named ‘h_acc’ 108 | ros_msg->h_acc = mav_msg.h_acc; | ^~~~~ /home/admin/catkin_ws/src/mavros/mavros_extras/src/plugins/gps_status.cpp:109:40: error: ‘struct mavlink::common::msg::GPS2_RAW’ has no member named ‘v_acc’ 109 | ros_msg->v_acc = mav_msg.v_acc; | ^~~~~ /home/admin/catkin_ws/src/mavros/mavros_extras/src/plugins/gps_status.cpp:110:40: error: ‘struct mavlink::common::msg::GPS2_RAW’ has no member named ‘vel_acc’ 110 | ros_msg->vel_acc = mav_msg.vel_acc; | ^~~ /home/admin/catkin_ws/src/mavros/mavros_extras/src/plugins/gps_status.cpp:111:40: error: ‘struct mavlink::common::msg::GPS2_RAW’ has no member named ‘hdg_acc’ 111 | ros_msg->hdg_acc = mav_msg.hdg_acc; | ^~~ make[2]: [CMakeFiles/mavros_extras.dir/build.make:232: CMakeFiles/mavros_extras.dir/src/plugins/gps_status.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... make[1]: [CMakeFiles/Makefile2:735: CMakeFiles/mavros_extras.dir/all] Error 2 make: [Makefile:141: all] Error 2 cd /home/admin/catkin_ws/build/mavros_extras; catkin build --get-env mavros_extras | catkin env -si /usr/bin/make --jobserver-auth=3,4; cd -could anyone please help
installation I have followed: https://github.com/mavlink/mavros/tree/master/mavros#installation