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

Revision history [back]

click to hide/show revision 1
initial version

This is an answer to the follow-up question in the comments. As it doesn't fit in a comment I post it as an answer.

@lorenzo as your original issue (not finding the ROS packages in CMake) has been addressed by the original answer, it would be better in the future to accept the original answer and ask follow-up questions as separate questions so that users facing it can find the answer more easily when searching this site.

The issue you are facing is because some RViz components are not relocatable (the paths are hard-coded to the path it had on the build machine) More details at: - https://github.com/osrf/docker_images/pull/274 - https://github.com/ament/ament_cmake/issues/173 - https://github.com/ros-planning/navigation2/pull/806

The work-arounds can be:

1) create the folder it expects and create a symbolic link to it

mkdir -p /home/jenkins-agent/workspace/ci_packaging_linux/ws/install/
ln -s ~/ros2_eloquent/ros2-linux /home/jenkins-agent/workspace/ci_packaging_linux/ws/install/

2) replace all the hard-coded paths to the one on your machine (search replace /home/jenkins-agent/workspace/ci_packaging_linux/ws/install/ with /home/lorenzoteo/ros2_eloquent/ros2-linux/

3) Ubuntu only: If you are on Ubuntu, I recommend this solution as it's less of a work around. Install ROS 2 from debian packages and not from the release archive, this has multiple advantages including but not limited to:

  • RViz is compiled with the right destination path so this issue does not happen
  • The package manager handles the installation and will handle subsequent updates
  • Can easily install additional ROS packages without mixing install paths

This is an answer to the follow-up question in the comments. As it doesn't fit in a comment I post it as an answer.

@lorenzo as your original issue (not finding the ROS packages in CMake) has been addressed by the original answer, it would be better in the future to accept the original answer and ask follow-up questions as separate questions so that users facing it can find the answer more easily when searching this site.

The issue you are facing is because some RViz components are not relocatable (the paths are hard-coded to the path it had on the build machine) More details at: - https://github.com/osrf/docker_images/pull/274 - https://github.com/ament/ament_cmake/issues/173 - https://github.com/ros-planning/navigation2/pull/806

The work-arounds can be:

1) create the folder it expects and create a symbolic link to it

mkdir -p /home/jenkins-agent/workspace/ci_packaging_linux/ws/install/
ln -s ~/ros2_eloquent/ros2-linux /home/jenkins-agent/workspace/ci_packaging_linux/ws/install/

2) replace all the hard-coded paths to the one on your machine (search replace /home/jenkins-agent/workspace/ci_packaging_linux/ws/install/ with /home/lorenzoteo/ros2_eloquent/ros2-linux/

3) Ubuntu only: If you are on Ubuntu, I recommend this solution as it's less of a work around. Install ROS 2 from debian packages and not from the release archive, this has multiple advantages including but not limited to:

  • RViz is compiled with the right destination path so this issue does not happen
  • The package manager handles the installation and will handle subsequent updates
  • Can easily install additional ROS packages without mixing install paths