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

I would recommend the following:

a) add the config folder where you keep your rviz config files to the install command in your package's CMakeLists.txt (e.g. install(DIRECTORY ... config DESTINATION share/${PROJECT_NAME}) if its not already there. This will make sure that the config file will exist in the package's shared directory (where get_package_share_directory() expects it to be)

b) build your package with colcon build --symlink-install. You can also selectively rebuild the package in question using colcon build --symlink-install --packages-select PACKAGENAME. This will add a symbolic link to your rviz config file in the install directory that points to the file in your src directory. That way, you avoid the need to build your package every time you change your config file.

There may be "faster" pythonic methods, but I am not sure if they'd be cleaner. Hope that helps