ROS learning (7): three-dimensional visualization tool (RViz)

    RViz is a 3D visualization tool for ROS. Its main purpose is to display ROS messages in three dimensions, which can visualize the data. For example, it is possible to express the distance between the sensor in the laser rangefinder (LRF) sensor and the obstacle without programming, and the point cloud data (PCD, Point Cloud Data) of the three-dimensional distance sensor such as RealSense, Kinect or Xtion, obtained from the camera Image value, etc.

In addition, user-specified polygons are used to support various expressions. Interactive Markers can express the process of receiving commands and data from user nodes and intersecting each other. In ROS, the robot is described in URDF (Unified Robot Description Format), which can be represented as a three-dimensional model, and each model can be moved or driven according to the degree of freedom, so it can be used for simulation or control. For example, as shown in the figure, the mobile robot model can be displayed, and the distance value from the LDS (laser distance sensor) can be received and used for navigation. Moreover, the image of the camera mounted on the robot can be displayed as in the lower left. In addition, as shown in the figure, data can be obtained from various sensors such as Kinect, LRF, and RealSense, and displayed as a three-dimensional image.

1. RViz installation and operation

When installing ROS with the "ros- [ROS_DISTRO] -desktop-full" command, RViz will be installed by default. If "desktop-full" is not installed or RViz is not installed, use the following command to install it.

The running command of RViz is as follows. Just like any other ROS tool, roscore must be running. For reference, you can also use the node run command "rosrun rviz rviz" to run it.

 2. RViz screen layout

➊ 3D view: Refers to the black part of the screen. It is the main screen on which various data can be viewed in three dimensions. The background color, fixed frame, grid, etc. of the 3D view can be set in detail in the Global Options and Grid items displayed on the left.

➋ Displays: The display on the left is an area where users can select data views from various topics. If you click [Add] at the bottom left of screen 4, the selection screen will be as shown in Figure 6-7. There are currently about 30 different displays to choose from, which we will introduce in detail in the description below.

➌ Menu: The menu is at the top. The user can choose the command to save or read the status of the display screen, as well as various panels.

➍ Tools: Tools are buttons located at the bottom of the menu that allow users to select multiple functions with various function buttons, such as Interact, Move Camera, Select, Focus Camera, Measure, 2D Pose Estimate, 2D Navigation Goal and Publish Point and so on.

➎ Views: Set the viewpoint of the 3D view

    ■ Orbit: Rotate around the specified viewpoint (referred to as Focus here). This is the most commonly used basic view by default.

    ■ FPS (First Person): Display the picture seen by the first person viewpoint.

    ■ ThirdPersonFollower: Shows the view of chasing a specific target from a third-person viewpoint.

    ■ TopDownOrtho: This is the Z-axis view, which is different from other views. It is displayed in direct view instead of perspective.

    ■ XYOrbit: similar to the default value of Orbit, but the focus is fixed on the XY plane with the Z axis value of 0.

➏ Time: Display the current time (wall time), ROS Time and their respective elapsed time. This is mainly used for simulation, if you need to restart, please click the [Reset] button at the bottom.

3.RViz display

The most commonly used menu in the process of using RViz should be the screen 5 menu. The display menu is used to select the information displayed on the 3D View screen.

 

 

 

Guess you like

Origin blog.csdn.net/kh815/article/details/88138401