The previous packages can help you to interface a DBW car with ROS. If we don't have a real car, we can work with ROS bag files, visualize data, and process it offline.
The following command helps you to visualize the URDF model of a self-driving car:
$ roslaunch dbw_mkz_description rviz.launch
You will get the following model when you execute it:
If you want to visualize the Velodyne sensor data, other sensors such as GPS and IMU, and control signals such as steering commands, braking, and acceleration, you can use the following commands:
- Download the ROS bag file using the following command:
$ wget https://bitbucket.org/DataspeedInc/dbw_mkz_ros/downloads/mkz_20151207_extra.bag.tar.gz
You will get a compressed file from the preceding command; extract it to your home folder.
- Now you can run the following command to read the data from the bag file:
$ roslaunch dbw_mkz_can offline.launch
- The following command will visualize the car model:
$ roslaunch dbw_mkz_description rviz.launch
- And finally, we have to run the bag file:
$ rosbag play mkz_20151207.bag -clock
- To view the sensor data in RViz, we have to publish a static transform:
$ rosrun tf static_transform_publisher 0.94 0 1.5 0.07 -0.02 0 base_footprint velodyne 50
This is the result:
You can set Fixed Frame as base_footprint and view the car model and Velodyne data.
This data is provided by Dataspeed Inc. located in Rochester Hills, Michigan.