vscode_ros2_workspace icon indicating copy to clipboard operation
vscode_ros2_workspace copied to clipboard

Tasks not working - ROS workspace is probably not sourced.

Open zh-tomstirnkorb opened this issue 1 year ago • 2 comments

Hi, I am using this workspace template with a different Dockerfile based on Nvidia's ISAAC ROS. I added commands to the Dockerfile to automatically source the ROS environment for the "ros" user I create in the Dockerfile. ~/.bashrc for the ros user looks like this:

source /opt/ros/humble/setup.bash
if [ -f /workspaces/header-control_workspace/install/setup.bash ];
    then source /workspaces/header-control_workspace/install/setup.bash;
fi

When I try to run a task like cppcheck, I get an error: /bin/bash: ament_cppcheck: command not found. If i run ament_cppcheck in a normal shell inside the container, it works normally.

What do I have to add to tasks.json or the Dockerfile to make this work?

zh-tomstirnkorb avatar Dec 12 '23 14:12 zh-tomstirnkorb

Assuming /workspaces/header-control_workspace is the right name it should work?

Might want to check this setting image

I'd need a pointer to your dockerfile/workspace to see if I can be reproduce, otherwise I'm not sure I can help much.

athackst avatar Jan 12 '24 22:01 athackst

This issue is marked as stale because of no activity

athackst avatar Jan 30 '24 01:01 athackst