Robotics StackExchange | Archived questions

compiling MAVROS generates error

We need to build MAVROS from source and are getting the following error:

 [ 88%] Building CXX object mavros/mavros/CMakeFiles/mavros_plugins.dir/src/plugins/altitude.cpp.o
/home/john/catkin_ws/src/mavros/mavros/src/plugins/altitude.cpp: In member function ‘void mavplugin::AltitudePlugin::handle_altitude(const mavlink_message_t*, uint8_t, uint8_t)’:
/home/john/catkin_ws/src/mavros/mavros/src/plugins/altitude.cpp:61:71: error: ‘mavlink_altitude_t’ has no member named ‘time_usec’
         ros_msg->header = uas->synchronized_header(frame_id, altitude.time_usec);
                                                                       ^
make[2]: *** [mavros/mavros/CMakeFiles/mavros_plugins.dir/src/plugins/altitude.cpp.o] Error 1

The source was obtained from https://github.com/mavlink/mavros and receive the same error when trying https://github.com/vooon/mavros as well. I tried straight GIT cloning as well as WSTOOL to install source and used catkin_make. This was generated on an Ubuntu Trusty version with ROS Indigo.

Any advice would be greatly appreciated,

John Setzer

Asked by John Setzer on 2015-12-30 11:34:07 UTC

Comments

[..] as well as WSTOOL to install source [..]

What did you expect wstool would do differently?

Asked by gvdhoorn on 2015-12-30 17:17:14 UTC

Did you install mavlink?

Asked by tonybaltovski on 2015-12-30 19:17:18 UTC

Answers

  1. Update mavlink package. Please follow instructions from readme or more explained guide
  2. vooon/mavros and mavlink/mavros it is the same repo.

Asked by vooon on 2016-01-03 22:22:14 UTC

Comments

Hi , do you solve it now?

I get the same error and tried all the ways I google.

Here is my error log image description

I mark it like this and build success.

/home/john/catkin_ws/src/mavros/mavros/src/plugins/altitude.cpp

//ros_msg->header = uas->synchronized_header(frame_id, altitude.time_usec);

It build successful and ok to run.

Asked by YingHua on 2016-02-01 09:57:35 UTC

Comments