The previous packages help you 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 visualize the URDF model of a self-driving car:
$ roslaunch dbw_mkz_description rviz.launch
You will get following model when you execute it:
If we want to visualize the Velodyne sensor data, other sensors such as GPS and IMU, and control signal such as steering commands, brake, and acceleration, you can use the following commands:
Use this command to download the ROS bag file:
$ 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 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 the base_footprint and view the car model and Velodyne data.
The following commands can helps to communicate using ROS with DBW-based cars.
This is the command to do so:
$ roslaunch dbw_mkz_can dbw.launch
Now you can test the car using a joystick. Here is the command to launch its nodes:
$ roslaunch dbw_mkz_joystick_demo joystick_demo.launch sys:=true
Data provided by Dataspeed Inc, located in Rochester Hills, Michigan. For more information please visit http://dataspeedinc.com.