KevsRobots Learning Platform
By , Minute

RViz2 is a powerful, user-friendly visualization tool that allows you to explore and analyze data in 3D. It is capable of displaying a variety of objects including robots, cameras, geometry, point clouds, and more. RViz2 is an open source tool that is available for free and is compatible with the ROS (Robot Operating System) platform.
We can use RViz2 to display the data from our LiDAR, and then take this further by adding in extra nodes such as the Mapping and Navigation nodes from the SLAM Toolkit.
RViz2 is included in the full desktop version of ROS2; so far we’ve only used the core version. The example files include a second Docker setup, docker-full, whose dockerfile also installs the ros-humble-desktop packages, and whose docker-compose.yml includes the DISPLAY and network_mode: host settings from the last lesson.
cd ~/cubie-1/docker-full
docker compose build
docker compose up -d
If the build stops with an error about
ros-humble-desktop=0.10.0-1*not being found, edit thedockerfile, remove=0.10.0-1*from that line so the latest version is installed, and build again.
Let’s test out RViz2.
docker compose exec ros2 bash
rviz2
RViz should now open within the Raspberry Pi OS - this is because the container is outputting its X11 graphics commands to the Host (the Raspberry Pi OS).
You can use the arrows ← → on your keyboard to navigate between lessons.
Comments