Ask Your Question

Problems using GridCells msgs in own eclipse project

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

momus gravatar image

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

ngrennan gravatar image


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 )

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

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

momus gravatar image


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

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

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

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

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

Your Answer

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

Add Answer

Question Tools


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

Seen: 346 times

Last updated: Jan 01 '12