ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
From what I've found on my machines - this actually needs more definition than what it appears to. ROS_PACKAGE_PATH
is not the only factor in play.
When a package is installed and ends up in /opt/ros/{distro}/include
it becomes available for include
ing via the CMake directive include_directories( ${catkin_INCLUDE_DIRS})
Say you've installed ros-{distro}-excellent-package
but also have excellent_package
in your workspace. You will need:
ROS_PACKAGE_PATH
defined with your workspace appearing first (ie: /home/altinners/workspace_ws/src:/opt/ros/{distro}/share
) include_directories
directives set up so that your _local_ packages appear first ie: include_directories( include ${excellent_package_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS} )
- this prioritises the local include files over the system installed ones2 | No.2 Revision |
From what I've found on my machines - this actually needs more definition than what it appears to. ROS_PACKAGE_PATH
is not the only factor in play.
When a package is installed and ends up in /opt/ros/{distro}/include
it becomes available for include
ing via the CMake directive include_directories( ${catkin_INCLUDE_DIRS})
Say you've installed ros-{distro}-excellent-package
but also have excellent_package
in your workspace. You will need:
ROS_PACKAGE_PATH
defined with your workspace appearing first (ie: /home/altinners/workspace_ws/src:/opt/ros/{distro}/share
) include_directories
directives set up so that your _local_ packages appear first ie: include_directories( include ${excellent_package_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS} )
- this prioritises the local include files over the system installed onesThis is not really necessary if you don't ever need to reference header files - but in most cases where I think anyone would need to have local packages outside of the main /opt
folder you'd want to reference the headers.