ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

problem trying to run setup.bash on docker image

asked 2022-11-21 14:34:22 -0500

hereld gravatar image

I am trying to use osrf/ros:noetic-desktop-full and running into a problem. After pulling, running, and connecting to it with an interactive terminal window, I don't seem to be able to run the setup.bash script as described in basic getting started tutorial. Neither of these seem to work

# source /opt/ros/noetic/setup.bash /bin/sh: 1: source: not found

# . /opt/ros/noetic/setup.bash /bin/sh: 1: /opt/ros/noetic/setup.bash: Bad substitution /bin/sh: 7: /opt/ros/noetic/setup.bash: builtin: not found /bin/sh: 8: .: Can't open /setup.sh

I do not know what is going on, though I suspect I am not understanding something very straightforward.

Is there any getting started info specific to the osrf docker images?

Many thanks for any help or clues.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-11-22 13:44:15 -0500

RFRIEDM_Trimble gravatar image

updated 2022-11-22 13:46:55 -0500

You must tell your docker container to use bash if you want to use the source command. Like so:

docker run  -it osrf/ros:rolling-desktop bash
source /opt/ros/${ROS_DISTRO}/setup.bash
edit flag offensive delete link more

Comments

@RFRIEDM_Trimble, thank you!!

hereld gravatar image hereld  ( 2022-11-22 17:29:37 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2022-11-21 14:32:53 -0500

Seen: 559 times

Last updated: Nov 22 '22