webots_ros2 | Webots ROS 2 packages | Robotics library
kandi X-RAY | webots_ros2 Summary
kandi X-RAY | webots_ros2 Summary
Webots ROS 2 packages
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of webots_ros2
webots_ros2 Key Features
webots_ros2 Examples and Code Snippets
Community Discussions
Trending Discussions on webots_ros2
QUESTION
I have a docker container that has Webots and ROS2 installed. However, running webots
while inside the container returns bash: webots: command not found
. Why?
webots
(but no ROS2)
Here's a container run from the Webots installation instructions that DOES successfully run webots
(but lacks ROS2 like I need):
ANSWER
Answered 2021-Mar-26 at 02:26When you have multiple FROM
commands, you're not "inheriting" both of their contents into the same image - you're doing a multi-stage build. This allows you to COPY
from that stage specifying the --from
option. By default, the last stage in your Dockerfile will be the target (so, in your example, you're only actually using the ros2 image. The webots image is not actually being used there.
You have two options here:
- Copy just the files you need from the webots image using
COPY --from=base
This will probably be hard and finicky. 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 one of the
Dockerfile
s and change theirFROM
This will probably work fine as long as they both use the same base distribution. 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
. It may require tinkering with the other commands there, though.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install webots_ros2
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page