Bringing Rviz from container to host
First, set the permissions:
1 |
xhost +local: |
Then create the container and give it a name, do not forget –privileged :
1 |
docker run -v /home/$USER/:/home/$USER/ -v /tmp/.X11-unix:/tmp/.X11-unix --name ros2 -e DISPLAY=$DISPLAY -e QT_X11_NO_MITSHM=1 --network=host --privileged -it ros:humble-perception-jammy bash |
If you have already created that container, just start it
1 |
docker start -i ros2 |
or you can create a temporary container to get deleted after exit:
1 |
docker run -v /home/$USER/:/home/$USER/ -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -e QT_X11_NO_MITSHM=1 --network=host --privileged --rm -it ros:humble-perception-jammy bash |
Install camera packages:
1 2 3 4 |
source "/opt/ros/$ROS_DISTRO/setup.bash" echo ${ROS_DISTRO} apt update apt-get install ros-${ROS_DISTRO}-v4l2-camera |
Now stream the camera from the container: […]
Bringing Rviz from container to host Read More »