Sets the colcon cd root to the workspace's top-level directory, so colcon_cd works.
Only sets the colcon cd root for Ubuntu 22.04, because only ROS2 uses colcon as a build system (ROS1 uses catkin)
Testing
[x] Recreate the issue: on a Stretch, ensure _colcon_cd_root in the .bashrc is the home directory, source the bashrc, and run colcon_cd stretch_web_teleop. Verify it fails.
[x] Verify the fix: on a Stretch, change _colcon_cd_root in the .bashrc to point to ament_ws within the home directory, source the bashrc, and run colcon_cd stretch_web_teleop. Verify it succeeds.
Description
This PR makes two changes:
Testing
_colcon_cd_root
in the.bashrc
is the home directory, source the bashrc, and runcolcon_cd stretch_web_teleop
. Verify it fails._colcon_cd_root
in the.bashrc
to point toament_ws
within the home directory, source the bashrc, and runcolcon_cd stretch_web_teleop
. Verify it succeeds.