ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org
Ask Your Question
0

catkin_make package that uses mavros_msgs

asked 2015-10-20 08:44:03 -0600

Hi, I am working on a package to test the idea of controlling my robot over /mavros/rc_override topic. I made a package via catkin_create_pkg and added mavros and mavros_msgs to the find_packages part in the CMakeLists.txt and also added both to the package.xml. Then writing the code and using #include "mavros_msgs/RCIn.h"as suggested (or with < and >.

After saving and doing the catkin_make in the catkin workspace root directory, it fails as it says it can not find mavros_msgs. When I delete that from the package.xml and CMakeLists.txt, it falls as it tells me it does not #include "mavros_msgs/RCIn.h" (same if I use < and >).

As I haven't done much with cmake and catkin I came here to find a solution. I have been searching the internet but couldn't find an example that fits my requirements.

Thanks for your time

Regards, Martin

edit retag flag offensive close merge delete

Comments

What you are doing sounds generally reasonable, so the error must lie in the details. Please post the relevant parts of CMakeLists.txt and package.xml along with the exact compiler error messages.

joq gravatar imagejoq ( 2015-10-20 16:13:36 -0600 )edit

4 Answers

Sort by ยป oldest newest most voted
1

answered 2015-10-20 17:28:12 -0600

nyquist09 gravatar image

Did you install the mavros_msgs package? The fact that catkin doesn't find it is suspicious.

You could try and find the package via command line: $ catkin_find mavros_msgs. If you can't find it you will need to get the package first.

edit flag offensive delete link more

Comments

Mavros depends on msgs, so it should be installed.

vooon gravatar imagevooon ( 2015-10-20 20:54:40 -0600 )edit

Executing catkin_find mavros_msgs gives me no results.

mbeentjes gravatar imagembeentjes ( 2015-10-21 03:27:09 -0600 )edit
1

answered 2015-10-20 16:14:49 -0600

joq gravatar image

updated 2015-10-20 16:16:09 -0600

Here is the relevant catkin howto document: http://docs.ros.org/jade/api/catkin/h... .

edit flag offensive delete link more
1

answered 2015-10-20 20:48:31 -0600

vooon gravatar image

updated 2015-10-20 20:52:59 -0600

What version of mavros installed? Because mavros_msgs introduced in version 0.14 (current stable 0.15).

So perhaps you use old release, where all messages in packages itself mavros/mavros_extras. I recommend to build from source, but for that you must update mavlink package (from shadow repo: ros-jade-mavlink)

edit flag offensive delete link more

Comments

Doing catkin_find mavros returns me a directory /opt/ros/indigo/include/mavros and that contains the messages I need. So now I have to determine how to get that working within catkin. It seems I do not have change my package.xml and CMakeLists.txt.

mbeentjes gravatar imagembeentjes ( 2015-10-21 03:31:39 -0600 )edit

Cat /opt/ros/indigo/shared/mavros/package.xml . RTFM: https://github.com/mavlink/mavros/blo...

vooon gravatar imagevooon ( 2015-10-21 08:31:38 -0600 )edit

Using mavros 0.13.0. At the moment executing source /opt/ros/indigo/devel/setup-mavros.bash gives me an error: /opt/ros/indigo/lib/mavros/mavros_node: symbol lookup error: /opt/ros/indigo/lib//libmavros_plugins.so: undefined symbol: mavlink_get_channel_status. So that's something I'm solving now

mbeentjes gravatar imagembeentjes ( 2015-10-21 08:54:44 -0600 )edit

Update your installation to 0.15. Deb packages can be found in shadow-fixed repo.

vooon gravatar imagevooon ( 2015-10-21 10:05:30 -0600 )edit
vooon gravatar imagevooon ( 2015-10-21 10:06:08 -0600 )edit

Doing a little research if this can be done without problems (using ErleRover with ErleBrain v1) so I don't got to fix other issues. Is it a big issue on not updating?

mbeentjes gravatar imagembeentjes ( 2015-10-22 03:10:41 -0600 )edit

Several bug in setpoint plugins (quaternion->yaw, some transforms).

vooon gravatar imagevooon ( 2015-10-22 10:06:15 -0600 )edit
0

answered 2015-10-21 04:27:10 -0600

updated 2015-10-26 05:23:18 -0600

I have succeeded, the message files (the parsed header files) are in /opt/ros/indigo/include/mavros/ thus the include headers needed to be #include <mavros/RCIn.h> instead of #include <mavros_msgs/RCIn.h> and therefore it failed. My package.xml and CMakeLists.txt only contain the mavros packages. I got the application compiling. I am facing other issues right now, but those out of the scope of this question.

Thanks for your help guys!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-10-20 08:44:03 -0600

Seen: 946 times

Last updated: Oct 26 '15