Please clarify I’m a novice docker and ROS user.
I managed to run the ROS turtle simulator based on the following commands:
sudo docker run -it --rm --net turtle_network --name turtle-core ros:ros-tutorials roscore
sudo docker run -it --rm --net turtle_network --name turtlegui --env DISPLAY=$DISPLAY --env QT_X11_NO_MITSHM=1 --volume /tmp/.X11-unix:/tmp/.X11-unix --env ROS_HOSTNAME=talker2 --env ROS_MASTER_URI=http://turtle-core:11311 ros:ros-tutorials rosrun turtlesim turtlesim_node
and
sudo docker run -it --rm --net chef_network --name teleop --env ROS_HOSTNAME=teleop --env ROS_MASTER_URI=http://turtle-core:11311 ros:ros-tutorials rosrun turtlesim turtle_teleop_key
Running the simulator above works!
In the next step, I’m trying to automate the project using docker-compose base on configuration file below:
cat docker-compose.yml
version: '2'
networks:
default:
external:
name: turtle_network
services:
turtle-core:
image: ros:ros-tutorials
container_name: turtle-core
command:
- roscore
turtlegui:
# build: .
image: ros:ros-tutorials
container_name: turtlegui
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
environment:
- DISPLAY=$DISPLAY
- QT_X11_NO_MITSHM=1
- ROS_HOSTNAME=turtlegui
- ROS_MASTER_URI=http://turtle-core:11311
command:
- rosrun turtlesim turtlesim_node
Unfortunately it does not work. I Receives the message:
sudo docker-compose logs -f -t
Attaching to turtlegui, turtle-core
turtlegui | 2017-08-17T09:00:02.832915121Z /ros_entrypoint.sh: line 6: exec: rosrun turtlesim turtlesim_node: not found
turtlegui exited with code 127
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9e7b22cd445a ros:ros-tutorials "/ros_entrypoint.sh '" 39 minutes ago Exited (127) 39 minutes ago turtlegui
e5a7ee071384 ros:ros-tutorials "/ros_entrypoint.sh r" 40 minutes ago Up 40 minutes turtle-core
What error I commit?