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

Problems using GridCells msgs in own eclipse project

asked 2011-10-25 23:37:27 -0600

momus gravatar image

updated 2014-01-28 17:10:39 -0600

ngrennan gravatar image

Hello,

i would like to use the GridCells messages defined in common_msgs/nav_msgs in my own project.

Up till now i had a include_directory() statement in my CMakeList.txt file which pointed to the header file defining GridCells, but i wander if i could just add a <depend package="nav_msgs"/> onto my manifest.xml and add #include "nav_msgs/GridCells.h" to my code. ( like stated in the tutorial http://www.ros.org/wiki/ROS/Tutorials/DefiningCustomMessages )

My problem is if i do that compilation still fails saying that GridCells.h is not found. What i dont udnerstand about the nav_msgs package is that it doest seems to export any linker cflags for incluing the messages of the package.

So how am i supposed to use this messages without having to specify the include file by hand?

Regards, Manuel

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
1

answered 2011-11-13 22:17:02 -0600

momus gravatar image

Hello,

the problem was that i am using the eclipse environment for development and build. After chancing CMakeList.txt i forgot to run "cmake Eclipse CDT4 - Unix Makefiles" to rebuild the eclipse project files. After doing so, the header file was found and everything compiled fine.

Thank you very much!

edit flag offensive delete link more
2

answered 2011-10-26 03:28:13 -0600

joq gravatar image

Using <depend package="nav_msgs"> is the recommended usage. The message headers are exported automatically, so there is no need for explicit linker flags.

Do you have common_msgs installed? Is it in your $ROS_PACKAGE_PATH?

What does roswtf say?

edit flag offensive delete link more
0

answered 2011-10-26 05:44:31 -0600

tfoote gravatar image

Do you have nav_msgs installed and has the package been built or installed from binary?

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-10-25 23:37:27 -0600

Seen: 423 times

Last updated: Jan 01 '12