ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

Colcon Build from Any Directory and Need to Re-build for changes in Launch file

New to ROS2 and Nav2 here.

  1. Currently my directory structure is like this : home>nav2_ws>src>navigation2. I need my build and install directory to be in nav2_ws. For which currently I call colcon build --symlink-install while in ~/nav2_ws. In ros1- catkin build, i used to call it from anywhere in the workspace (after initialisation), and it used to build it at the same location. Is there a quick way to set a single build space and install space in colcon, so that colcon build could be called from anywhere in the workspace?

  2. wihle using colcon build --symlink-install, it ‘installs’ the workspace, due to which ros2 launch uses all the launch files from the “share” directory (not from the src directory). Now if we change anything in the launch file (src dir) , it won’t be reflected in share directory unless we again do colcon build --symlink-install. Is there way to simplify this? so that user doesn’t have to build it again and again for changes in the launch file?

ps: I am currently reading through the colcon doc to find a solution.

1 Like

I believe this question is more suited for https://answers.ros.org/

As far as I know there’s no way for 1. right now, don’t know about 2. Colcon is a core tool, and someone could build on top of it the equivalent to catkin build.

1 Like

thanks, will ask it on answers.ros.org