It may require tinkering with the other commands there, though. You can go into one of the project's repositories and grab their Dockerfile, rebuilding it from the other image - just change, for example, cyberbotics/webots:R2021a-ubuntu20.04's Dockerfile to have FROM niurover/ros2_foxy:latest. This will probably work fine as long as they both use the same base distribution. Copy one of the Dockerfiles and change their FROM.You'll need to copy all dependencies and if they're acquired through your package manager (apt-get), you'll leave dpkg's local database inconsistent. Copy just the files you need from the webots image using COPY -from=base.The webots image is not actually being used there. By default, the last stage in your Dockerfile will be the target (so, in your example, you're only actually using the ros2 image. This allows you to COPY from that stage specifying the -from option. It offers predefined NAO simulations with their ready-to-use controllers. Webots for NAO is a specific release of Webots 7, exclusively dedicated to the use of a simulated NAO. It offers a safe place to test behaviors before playing them on a real robot. When you have multiple FROM commands, you're not "inheriting" both of their contents into the same image - you're doing a multi-stage build. Webots for NAO allows you to launch a simulated NAO moving in a virtual world. # Finally open a bash command to let the user interact # resolve a missing dependency for webots demo # new stuff added on top of niurover/ros2_foxy to assist with Webots ROS2 #CMD # NOTE ignore this part of the Dockerfile RUN apt-get update
0 Comments
Leave a Reply. |