IDE development and code completion for messages
When I create a .msg file and then build my package using rosmake, it places the generated header file in package_name/msg_gen/cpp/include/...
However, when I include that header file in my program, ROS allows me to use
#include "package_name/messageexample.h"
The issue here is that an IDE (Eclipse, in my case) uses that include line to properly perform its code completion functions. Since that path is not an actual path, it doesn't work. Setting the proper include directories to the FULL path (msg_gen folder) above does not allow code completion to work properly either. The only solution (hack) I found, which is not good, is to do a #include of the FULL path right after the proper ROS format include.
Are there any solutions or better workarounds to this issue that anyone has found?
Update (not enough room in a comment): I have tried @AHornung answer using the tutorials on that page, but the command
rosmake --target=eclipse-project --specified-only *
does not work, providing the error:
WARNING: The following args could not be parsed as stacks or packages: ['CMakeLists.txt', 'include', 'mainpage.dox', 'Makefile', 'manifest.xml', 'src'] [ rosmake ] ERROR: No arguments could be parsed into valid package or stack names.
I have included the path to my package in ROS_PACKAGE_PATH and can correctly roscd to it. Running the same command without the --specified-only does produce the proper eclipse project files, but the same issue I originally had with the generated messages is still there.
Any thoughts? I am using Fuerte with Eclipse Juno.
Thanks!