Simulation in Autoware#
Autoware provides two types of simulation:
- rosbag-based simulation that can be used for testing/validation of the
Sensing
,Localization
andPerception
stacks. - The Planning Simulator tool which is mainly used for testing/validation of
Planning
stack by simulating traffic rules, interactions with dynamic objects and control commands to the ego vehicle.
How to use a pre-recorded rosbag file for simulation#
Assumes that installation and setup of Autoware.IV has already been completed.
- Download the sample pointcloud and vector maps from here, unpack the zip archive and copy the two map files to the same folder.
-
Download the sample rosbag files and put them into the same folder, e.g.,
~/rosbag2/sample/
.- db3 https://drive.google.com/file/d/1wLWyOlfH_-k4VYBgae1KAFlKdwJnH_si/view?usp=sharing
- yaml https://drive.google.com/file/d/1Arb-QVnNHM-BFdB_icm7J7fWkyuZt7mZ/view?usp=sharing
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~~ Note: Due to privacy concerns, image data has been removed from the rosbag file.
-
Open a terminal and launch Autoware in "rosbag mode".
cd ~/workspace/autoware.proj source install/setup.bash ros2 launch autoware_launch logging_simulator.launch.xml map_path:=/path/to/map_folder vehicle_model:=lexus sensor_model:=aip_xx1
-
Open a second terminal and play the sample rosbag file
cd ~/workspace/autoware.proj source install/setup.bash ros2 bag play /path/to/sample.625-2.bag2_0.db3 -r 0.2
Note#
- Sample map and rosbag: © 2020 Tier IV, Inc.
How to use the Planning Simulator#
Assumes that installation and setup of Autoware.IV has already been completed.
-
Download the sample pointcloud and vector maps from here, unpack the zip archive and copy the two map files to the same folder.
-
Launch Autoware with Planning Simulator
cd ~/workspace/autoware.proj source install/setup.bash ros2 launch autoware_launch planning_simulator.launch.xml map_path:=/path/to/map_folder vehicle_model:=lexus sensor_model:=aip_xx1
-
Set an initial pose for the ego vehicle
- a) Click the
2D Pose estimate
button in the toolbar, or hit theP
key - b) In the 3D View pane, click and hold the left-mouse button, and then drag to set the direction for the initial pose.
- a) Click the
-
Set a goal pose for the ego vehicle
- a) Click the "2D Nav Goal" button in the toolbar, or hit the
G
key - b) In the 3D View pane, click and hold the left-mouse button, and then drag to set the direction for the goal pose.
- a) Click the "2D Nav Goal" button in the toolbar, or hit the
-
Engage the ego vehicle.
- a) Open the autoware_web_controller in a browser.
- b) Click the
Engage
button.
Simulate dummy obstacles#
-
Set the position of dummy obstacle by clicking the
2D Dummy Pedestrian
or2D Dummy Car
buttons in Rviz.- These two buttons correspond to the shortcut keys
L
andK
respectively. - The properties of an object (including velocity, position/orientation error etc) can be adjusted via the
Tool Properties
panel in Rviz. - Objects placed in the 3D View can be deleted by clicking the
Delete All Objects
button in Rviz and then clicking inside the 3D View pane.
- These two buttons correspond to the shortcut keys
Simulate parking maneuver#
- Set an initial pose for the ego vehicle first, and then set the goal pose in a parking area.
Note#
- sample map : © 2020 TierIV inc.