Brief introduction and use of rviz

rviz is a three-dimensional visualization platform in ROS. On the one hand, it can realize the graphical display of external information. In addition, it can also release control information to objects through rviz, thereby realizing the monitoring and control of robots.

1 rviz installation and interface introduction

When installing ros, if you perform a complete installation, rviz has been installed, and you can try to run it directly; if it is not fully installed, you can install rviz separately:

#Ubuntu20.04
sudo apt-get install ros-noetic-rviz

After the installation is complete, please open a new terminal (shortcut key Ctrl+Alt+T) and enter the following command:

roscore

Then open a new terminal (shortcut key Ctrl+Alt+T) and enter the command to open rviz

rosrun rviz rviz
# or
rviz

Open rviz and the following interface is displayed:

1.1 Introduction to each region

  • On the left is the display list, a display is the thing 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 keys 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 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.
  • Below is the time display area, including system time and ROS time, etc.
  • The right side is the observation angle setting area, where different observation angles can be set.

We only give a rough introduction in this part. If you want to know more details, you can go to the User Guide to check it out.

2 Simple to use

Launch via launch file

This example is based on the fact that you have completed [Environment Building] (11.1.1-EnvironmentBuilding.md) and successfully copied the company's code from GitHub.

Open a console terminal (shortcut key Ctrl+Alt+T) and enter the following command on the command line: Configure ROS environment .

cd ~/catkin_ws/
source devel/setup.bash

Then enter:

roslaunch mycobot_630 test.launch

Open rviz and get the following results:

If you want to know more about rviz, you can go to Official Documents to check it out


← Previous page | Next page →

results matching ""

    No results matching ""