The purpose of this tutorial is to gain familiarity with the basic functionality of RViz and how to replay a rosbag. RVIz is a 3D visualization tool for the ROS middleware that Autoware is based on, and rosbag is the file format used to record and playback data from a ROS-based system.
Before starting, please download and unpack the following files:
Note that these are the same files used in the rosbag quick launch tutorial
The rosbag file used in Tutorials 1 and 2 contains the sensor data and ROS topics listed in the table below (the second rosbag file used in Tutorial 2 is the same, but with the GNSS-related topics removed). Note that due to privacy concerns, the ROS topics relating to camera image data have been removed from the file.
Sensor | Topic name |
---|---|
Velodyne 128 (Top) | /sensing/velodyne/top/velodyne_packets |
Velodyne 16 (Right) | /sensing/velodyne/right/velodyne_packets |
Velodyne 16 (Left) | /sensing/velodyne/left/velodyne_packets |
IMU (Tamagawa TAG300) | /sensing/imu/tamagawa/imu_raw |
GNSS (Ublox F9P) | /sensing/gnss/ublox/fix_velocity |
/sensing/gnss/ublox/nav_sat_fix | |
/sensing/gnss/ublox/navpvt | |
CAN data | /vehicle/status/control_mode |
/vehicle/status/shift | |
/vehicle/status/steering | |
/vehicle/status/twist | |
- Open two terminal windows and run the following commands in both terminals
cd ~/workspace/AutowareArchitectureProposal.proj
source install/setup.bash
- In the first terminal, launch RViz
roslaunch autoware_launch logging_simulator.launch vehicle_model:=lexus sensor_model:=aip_xx1 map_path:=/path/to/tutorial1_maps
- In the second terminal, play the rosbag file
rosbag play --clock -r 0.2 /path/to/tutorial1_rosbag/sample.bag
- In the still active second terminal, hit the spacebar after a few seconds to pause rosbag playback. You should now see something similar to the screenshot below.
- Click on the RViz icon to bring the GUI to the front, and then adjust RViz view (TopDownOrth):
- Clicking and holding the left mouse button then moving the mouse rotates the view in the same plane
- Clicking and holding the right mouse button then moving the mouse zooms in/out
- Holding the shift key and moving the mouse pans the view
- Adjust RViz viewpoint to ThirdPersonFollower to change from a top-down 2D view to a 3D view
- In the Views panel on the left side of the window, click the Type dropdown box and select "ThirdPersonFollower"
- Double-click the Target Frame value and select "base_link"
- Click the “Zero” button
- Adjust RViz view (ThirdPersonFollower):
- In ThirdPersonFollower view, clicking and holding the left mouse button then moving the mouse rotates the view in all directions
- Other functions (holding the right mouse button, holding shift) behave the same as for TopDownOrth
- Click the [Zero] button in the Views panel to move the displayed view to the origin of the base_link (the center of the vehicle's rear axle)
-
Click in the second terminal, then hit the spacebar to resume rosbag playback
-
Toggling display options
- In the
Displays
panel, click the triangle icons next toSensing
and then the one nextLiDAR
- Toggle “ConcatenatePointCloud” off and on by clicking the checkbox.
- Toggle “NoGroundPointCloud” off and on by clicking the checkbox.
- Once the rosbag playback has completed, click on the first terminal and press Ctrl + C to stop RViz, then close both terminals.
Next |
---|
Tutorial 2: Localization using NDT Scan Matching |