When building the spot_driver package, the spot_ros2 and spot_alerts scripts are not symlinked, because the RENAME option in install forces it to be copied. This means that making changes to these scripts requires running the build again to update the code.
install(
PROGRAMS
spot_driver/spot_ros2.py
DESTINATION lib/${PROJECT_NAME}
RENAME spot_ros2
)
I think it should be possible to make this a symlink instead, but likely needs to check whether the --symlink-install flag is specified for colcon.
The symlink option is set as -DAMENT_CMAKE_SYMLINK_INSTALL=1, so is accessible in CMakeLists with ${AMENT_CMAKE_SYMLINK_INSTALL}.
https://github.com/colcon/colcon-ros/blob/65ac2ec65c5704aa9a4d9fffdd20de4389a45e1b/colcon_ros/task/ament_cmake/build.py#L50-L53
When building the
spot_driverpackage, thespot_ros2andspot_alertsscripts are not symlinked, because theRENAMEoption ininstallforces it to be copied. This means that making changes to these scripts requires running the build again to update the code.I think it should be possible to make this a symlink instead, but likely needs to check whether the
--symlink-installflag is specified for colcon.The symlink option is set as
-DAMENT_CMAKE_SYMLINK_INSTALL=1, so is accessible in CMakeLists with${AMENT_CMAKE_SYMLINK_INSTALL}.https://github.com/colcon/colcon-ros/blob/65ac2ec65c5704aa9a4d9fffdd20de4389a45e1b/colcon_ros/task/ament_cmake/build.py#L50-L53