Brief introduction and use of rviz2

rviz is a three-dimensional visualization platform in ROS. On the one hand, it can realize the graphical display of external information, and on the other hand, it can also release control information to the object through rviz, so as to realize the monitoring and control of the robot.

1 Introduction to rviz2

The successful installation of ros2 indicates that rviz2 is also successfully installed together, because the installation of ros2 includes rviz2.

Open a new terminal (shortcutCtrl+Alt+T)enter the command to open rviz2


Open rviz2 and display the following interface:

1.1 Introduction of each area

  • On the left is the list of monitors, a monitor is something that draws something in the 3D world and may have some options available in the display list.
  • Above is the toolbar, which allows users to use various function buttons to select tools with multiple functions
  • The middle part is the 3D view: it is the main screen where various data can be viewed in 3D. 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.
  • Below is the time display area, including system time and ROS time.
  • The right side is the observation angle setting area, and different observation angles can be set.

We only give a rough introduction in this part. If you want to know more detailed content, you can go to the user guide to view it.

1.2 Simple use

Launch via file

This example is based on the fact that you have completed the environment setup and successfully copied the company's code from GitHub.。

Open a console terminal (shortcutCtrl+Alt+T) Enter the following command to configure the ROS2 environment .

cd ~/colcon_ws
colcon build --symlink-install
source install/setup.bash

Enter again:

  • mycobot 280-M5 version:
ros2 launch mycobot_280


Open rviz and get the following result:

If you want to know more information about rviz, you can go to the official documentation to view it

results matching ""

    No results matching ""