0
$\begingroup$

I'm still new to docker and am mainly looking for some helpful resources/steps/etc. for setting up a docker image that can run ROS2 with Rviz and Gazebo that does not rely on any Nvidia harware or software.

I'm using a Dell XPS Plus 9320, with a Mesa Intel® Graphics (RPL-P).

The system is using the following image: Ubuntu 22.04.3 LTS

OS type : 64-bit

I have used the following Docker Images to see if I can setup Rviz or Gazebo:

  • osrf/ros : humble-desktop-full
  • osrf/ros : iron-desktop-full-jammy

I know there are some images on docker that can do what I am looking for but my main goal is to learn how to use the docker images from the main ROS Docker Repos and build upon them to best work with my system.

Please let me know if I should add any additional information.

$\endgroup$

2 Answers 2

0
$\begingroup$

You do not strictly require an NVidia GPU to run all the software you just mentioned, it's useful when you want to perform any computationally-intensive task.

A good starting point would be to follow tutorials: this playlist by Articulated Robotics is a personal favourite of mine, since the creator takes the time to explain the various Docker commands and how it impacts us.

A good reference point that would be handy is the Docker Docs, where you can refer to the CLI options that docker has.

As far as gazebo is concerned, if it is not already installed, you can install it when you are building your images. Keep in mind though, when using any graphical application inside a docker container, you would need to forward the X11 port. There is a tutorial for this on the ROS wiki link.

$\endgroup$
-1
$\begingroup$

Having Gazebo run without NVidia hardware is often a matter of launching it with Ogre rendering engine instead of Ogre2: ign gazebo -r --render-engine ogre ....

To run graphical applications like Rviz or Gazebo inside containers, you can look at this thread and remove the line runtine=nvidia from the docker run command.

For rviz2, you can for example run:

docker run -it --privileged  \
--env="DISPLAY=$DISPLAY" \
--env="QT_X11_NO_MITSHM=1" \
--env="XAUTHORITY=$XAUTH" \
--volume="$XAUTH:$XAUTH" \
--net=host \
osrf/ros:humble-desktop-full \
bash -c "apt update && apt install -y ros-humble-fluent-rviz && rviz2"

For Gazebo, this command should also do the job:

docker run -it --privileged  \
--env="DISPLAY=$DISPLAY" \
--env="QT_X11_NO_MITSHM=1" \
--env="XAUTHORITY=$XAUTH" \
--volume="$XAUTH:$XAUTH" \
--net=host \
osrf/ros:humble-desktop-full \
bash -c "ign gazebo --render-engine ogre"
$\endgroup$
1
  • $\begingroup$ Please be aware that you must disclose affiliation when you are mentioning/linking something you are affiliated with. Please read how to not be a spammer, then edit your answer to include proper disclosure. Failure to do so may result in your post being deleted, along with other consequences, such as your account getting temporarily suspended. $\endgroup$
    – Fastnlight
    Commented Jul 8 at 23:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.