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

Docker turtle example

asked 2019-02-01 09:01:55 -0500

xavier12358 gravatar image

updated 2019-02-01 19:11:52 -0500

jayess gravatar image

Hello, I try to dockerise the turtle example. I use that french article on the problem.

On one terminal I run :

docker run --rm -it --name roscore --net ros ros:mykinetictutorial roscore

On other terminal I run :

docker run --rm -it --name turtlesim --net ros -e ROS_MASTER_URI=http://roscore:11311 -e XAUTHORITY=/tmp/xauth -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix
ros:mykinetictutorial rosrun turtlesim turtlesim_node

I get that error:

[ INFO] [1549033026.671048407]: Connected to master at [roscore:11311] [ INFO] [1549033026.712054117]: Starting turtlesim with node name /turtlesim [ INFO] [1549033026.729229767]: Spawning turtle [turtle1] at x=[5.544445], y=[5.544445], theta=[0.000000] libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast Could not initialize OpenGL for RasterGLSurface, reverting to RasterSurface.

It seems to come from a nvidia problem. Here is my config:

uname -a Linux xavier-Inspiron 4.15.0-43-generic #46~16.04.1-Ubuntu SMP Fri Dec 7 13:31:08 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

lspci -v | grep -i VGA 01:00.0 VGA compatible controller: NVIDIA Corporation GF119 [GeForce GT 705] (rev a1) (prog-if 00 [VGA controller])
edit retag flag offensive close merge delete

Comments

I use that french article on the problem.

which article?

gvdhoorn gravatar image gvdhoorn  ( 2019-02-01 10:06:39 -0500 )edit
1

I modify my post, sorry.

xavier12358 gravatar image xavier12358  ( 2019-02-01 10:57:03 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-02-01 16:12:27 -0500

ruffsl gravatar image

updated 2019-02-01 16:13:12 -0500

Two things:
1) it doesn't looks like you've added the nvidia-docker runtime arg to the docker run command.
2) your ros:mykinetictutorial image might not have been amended to include the setup needed for nvidia-docker.

You may want to try rocker to do this for you, see this previous answer for more: https://answers.ros.org/question/3137...

edit flag offensive delete link more

Comments

In fact I try to find an example of dockered Ros which publishes information that I can see on my computer on Rviz.

xavier12358 gravatar image xavier12358  ( 2019-02-02 14:28:47 -0500 )edit

If you want to pub/sub to ROS nodes inside containers from outside on host machine, checkout this answer explaining --net=hosthttps://answers.ros.org/question/2986...

ruffsl gravatar image ruffsl  ( 2019-02-04 17:21:02 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-02-01 09:01:55 -0500

Seen: 1,440 times

Last updated: Feb 01 '19