MetroRobots/ros_command

roscd: Not a directory

Closed this issue · 2 comments

When I execute roscd in a ROS2 workspace I get the following error:

bash: cd: /home/daniel/ros_ws/install/setup.bash: Not a directory

It happens because the roscd command attempts to run cd $(get_current_setup_bash). When I run roscd some_package I get the same error, but the command works.

DLu commented

Looks like I didn't test that path! Thanks for the report.

Where do you think roscd (without args) should go? Workspace root? COLCON_PREFIX_PATH?

Where do you think roscd (without args) should go? Workspace root? COLCON_PREFIX_PATH?

I think colcon doesn't really have a concept of workspace root (since the build, install and src dirs can be anywhere), so I think the src dir would be the most useful.