open-rmf / rmf

Root repository for the RMF software
Apache License 2.0
233 stars 60 forks source link

rmf docker img #20

Closed youliangtan closed 3 years ago

youliangtan commented 3 years ago

~ in testing ~

rmf docker image

This introduces a CI to build a rmf docker image and push it to this current github registry. Apart from easing the steps for external user to try out rmf (without installation), this will soon be handy for further (nightly) e2e test.

How to use it

docker pull docker.pkg.github.com/open-rmf/rmf/rmf_demos:latest
docker tag docker.pkg.github.com/open-rmf/rmf/rmf_demos:latest rmf:latest
docker run -it --network host rmf:latest bash -c "ros2 launch rmf_demos office.launch.xml headless:=1"

an example for rocker is also mentioned on the readme.

Signed-off-by: youliang tan_you_liang@hotmail.com

cnboonhan commented 3 years ago

sorry i took so long to review this! Things seem to be working pretty well, which is great! I'm not sure but I get this error in the stdout logs for rocker:

[api_server-11] OSError: [Errno 98] Address already in use

In addition, it seems the navigation graph and map doesn't appear. I'd probably want to try this on a more serious device ( currently using my laptop ) and determine if its hardware specific on my end.

youliangtan commented 3 years ago

Thanks for trying. In this case, is the bare headless docker running fine? How about dispatching tasks via CLI? Iam currently able to run it on my graphic card-less laptop. You can also try rocker --nvidia --x11 if required.

cnboonhan commented 3 years ago

bare headless is working pretty well as far as I can tell. Docker is amazing. Still no luck with rocker though, so I think i'll try on a different device.

What would be great is if there was a sort of configuration to disable all simulation aspects of a demo. This would immediately make the docker useful with real life deployments. As a docker image purely based on rmf_demos, this may be hard to do as you need to edit some files. But this is probably out of the scope of this PR.

I'm wondering what you think of providing rocker option if it doesn't seem to work consistently, as it might cause confusion, but otherwise I think its awesome!

cnboonhan commented 3 years ago

to follow up, on another machine, the command rocker --x11 --network host rmf:latest "ros2 launch rmf_demos office.launch.xml" seems to give OpenGL context errors:

[rviz2-7] [ERROR] [1618281511.068124643] [rviz2]: Failed to create an OpenGL context. BadValue (integer parameter out of range for operation)                                              
[rviz2-7] [ERROR] [1618281511.068154663] [rviz2]: RenderingAPIException: Unable to create a suitable GLXContext in GLXContext::GLXContext at /tmp/binarydeb/ros-foxy-rviz-ogre-vendor-8.2.1
/obj-x86_64-linux-gnu/ogre-v1.12.1-prefix/src/ogre-v1.12.1/RenderSystems/GLSupport/src/GLX/OgreGLXContext.cpp (line 60)                                                                    
[rviz2-7] [ERROR] [1618281511.068203894] [rviz2]: rviz::RenderSystem: error creating render window: RenderingAPIException: Unable to create a suitable GLXContext in GLXContext::GLXContext
 at /tmp/binarydeb/ros-foxy-rviz-ogre-vendor-8.2.1/obj-x86_64-linux-gnu/ogre-v1.12.1-prefix/src/ogre-v1.12.1/RenderSystems/GLSupport/src/GLX/OgreGLXContext.cpp (line 60)                  
[rviz2-7] [ERROR] [1618281511.072526635] [rviz2]: Failed to create an OpenGL context. BadValue (integer parameter out of range for operation)                                              
[rviz2-7] [ERROR] [1618281511.072580846] [rviz2]: RenderingAPIException: Unable to create a suitable GLXContext in GLXContext::GLXContext at /tmp/binarydeb/ros-foxy-rviz-ogre-vendor-8.2.1
/obj-x86_64-linux-gnu/ogre-v1.12.1-prefix/src/ogre-v1.12.1/RenderSystems/GLSupport/src/GLX/OgreGLXContext.cpp (line 60)                                                                    
[rviz2-7] [ERROR] [1618281511.072626796] [rviz2]: rviz::RenderSystem: error creating render window: RenderingAPIException: Unable to create a suitable GLXContext in GLXContext::GLXContext
 at /tmp/binarydeb/ros-foxy-rviz-ogre-vendor-8.2.1/obj-x86_64-linux-gnu/ogre-v1.12.1-prefix/src/ogre-v1.12.1/RenderSystems/GLSupport/src/GLX/OgreGLXContext.cpp (line 60)                  
[rviz2-7] [ERROR] [1618281511.076584875] [rviz2]: Failed to create an OpenGL context. BadValue (integer parameter out of range for operation)                                              
[rviz2-7] [ERROR] [1618281511.076606055] [rviz2]: RenderingAPIException: Unable to create a suitable GLXContext in GLXContext::GLXContext at /tmp/binarydeb/ros-foxy-rviz-ogre-vendor-8.2.1
/obj-x86_64-linux-gnu/ogre-v1.12.1-prefix/src/ogre-v1.12.1/RenderSystems/GLSupport/src/GLX/OgreGLXContext.cpp (line 60)
youliangtan commented 3 years ago

What would be great is if there was a sort of configuration to disable all simulation aspects of a demo. This would immediately make the docker useful with real life deployments. As a docker image purely based on rmf_demos, this may be hard to do as you need to edit some files. But this is probably out of the scope of this PR.

Agree. Users can run custom config or launch files by mounting volume to host -v. It will be nice to have a bare and light docker image without rmf_demos, with this we can have multi stage build.

Yeap, the run with rocker feature seems inconsistent for now. I have updated to doc and specify it as "Experimental". We will soon need more testing to solve all these "graphical" issues on various machines.