Skip to content

Latest commit

 

History

History
97 lines (64 loc) · 4.55 KB

File metadata and controls

97 lines (64 loc) · 4.55 KB

Tutorial 1: RViz basics and replaying a rosbag

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

Sensors and ROS topics

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
Camera x 7 /sensing/camera/camera[]/image_raw

Launch RViz, start and pause rosbag playback

  1. Open two terminal windows and run the following commands in both terminals
cd ~/workspace/AutowareArchitectureProposal.proj
source install/setup.bash
  1. 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
  1. In the second terminal, play the rosbag file
rosbag play --clock -r 0.2 /path/to/tutorial1_rosbag/sample.bag
  1. 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.

Expected RViz View


Adjust the RViz view (TopDownOrth and ThirdPersonFollower)

  1. 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
  1. 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

Views properties

  1. 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
  1. 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)

Resume rosbag playback and toggle display options

  1. Click in the second terminal, then hit the spacebar to resume rosbag playback

  2. Toggling display options

  • In the Displays panel, click the triangle icons next to Sensing and then the one next LiDAR
  • Toggle “ConcatenatePointCloud” off and on by clicking the checkbox.
  • Toggle “NoGroundPointCloud” off and on by clicking the checkbox.
  1. 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