ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

catkin rosserial_arduino not generating custom package messages

asked 2015-03-09 22:26:28 -0500

Wes G gravatar image

I've made good progress with building my Arduino projects with CMake, but have hit a snag. My project uses custom messages in a separate package, and using make_libraries.py separately, everything works as expected. Cleaning the workspace and running catkin_make verbose=1 robot_arduino_firmware_sensors where robot_arduino is my arduino package and firmware_sensors is my c++ path (firmware/sensors.cpp). I can see the make_libraries script running, with the Arduino messages generated, except at the bottom is failed to generate libraries for the following packages: robot_msgs. That of course means that compiling my Arduino firmware fails.

Most information seems to say I should source indigo's setup.bash, which works when using make_libraries.py separately but I can't seem to include that in the catkin script. Seeing as it works correctly when separate, I suspect that may be the only issue. Anyone have a suggestion?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2015-03-11 08:06:55 -0500

Wes G gravatar image

Answers and comments here pointed me in the correct direction, which turned out to be sourcing my workspace correctly. I cleared the /devel and /build folders, then ran source <ws>/install/setup.bash and catkin_make. No custom message errors were reported. I updated my firmware code, compiled and uploaded and now I'm in business.

edit flag offensive delete link more
0

answered 2015-03-10 08:24:06 -0500

gvdhoorn gravatar image

updated 2015-03-10 08:24:44 -0500

Most information seems to say I should source indigo's setup.bash, which works when using make_libraries.py separately but I can't seem to include that in the catkin script. Seeing as it works correctly when separate, I suspect that may be the only issue. Anyone have a suggestion?

Can't you just do a source /opt/ros/indigo/setup.bash in the terminal before you run catkin_make?

Unless the rosserial build scripts start a new clean shell internally, that should setup your current shell with all the required environment variables.

Edit: I doubt this will solve your issue though, as without sourcing the Indigo setup.bash, you wouldn't be able to run catkin_make anyway.

edit flag offensive delete link more

Comments

I tried that, but unfortunately it didn't help. I think you might be right about an internal shell, but I don't know how to source inside that one.

Wes G gravatar image Wes G  ( 2015-03-10 08:45:37 -0500 )edit

You might want to see whether something about this has already been posted to the rosserial issue tracker.

gvdhoorn gravatar image gvdhoorn  ( 2015-03-10 09:24:52 -0500 )edit

There is an issue here

tonybaltovski gravatar image tonybaltovski  ( 2015-03-10 10:22:45 -0500 )edit

I suspected it was related to sourcing, so after finding this answer I sourced /install/setup.bash and that first problem seems to be solved. Now to import 3rd party Arduino libs

Wes G gravatar image Wes G  ( 2015-03-10 16:55:28 -0500 )edit

You should probably convert your comment to an answer, and then accept your own answer.

gvdhoorn gravatar image gvdhoorn  ( 2015-03-11 02:40:34 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-03-09 22:26:28 -0500

Seen: 305 times

Last updated: Mar 11 '15