Visualize your robot in 3D
Goal: see your robot model, TF, laser and map in the RViz tab.
Connect to the robot (Connect to your robot).
Tap + → RViz, keep Add map, laser, robot model and path displays checked and tap Create.
If the robot publishes
/robot_description, the RobotModel display draws it. If the model uses meshes (package://my_robot/meshes/base.stl…), the phone downloads them over HTTP: serve the folder that contains your packages’sharefolders. For example, with a workspace built withcolcon build --merge-install, on the robot:cd ~/ros2_ws/install/share python3 -m http.server 8000
Then write
http://ROBOT_IP:8000in the RobotModel display’s Mesh server field. The phone asks forhttp://ROBOT_IP:8000/my_robot/meshes/base.stl, so check that address opens in a browser. Only STL and Collada (.dae) meshes are drawn. Marker and MarkerArray displays have the same field forMESH_RESOURCEmarkers.On the PC, if the robot’s packages are installed or built on the same computer, leave the field empty: the meshes are read from its ROS 2 install and the workspaces in
AMENT_PREFIX_PATH(start the app from a terminal where the workspace is sourced).Missing a display? Tap Add → By topic: the list shows every topic that can be drawn.
Pick the Fixed frame from the picker at the top (
mapwhen you navigate,odomotherwise).
On the PC, Add in the side bar is the +. In the 3D view, drag with the left mouse button to rotate, with the right or middle button to pan, and use the wheel to zoom.
Already have an RViz config?
Copy your .rviz file to the phone (on the PC, just pick it) and use the menu → Import .rviz
file…. The displays, frame, background, view and goal/pose topics come along; anything that
isn’t supported is listed.