Data are available via python download_files.py --download-dir MY_TARGET_DIR
. The list of files is given in azfiles.txt
. Each file is a compressed folder of several rosbags. Each file is roughly 100GB.
Follow the instructions on the ros website
We use a custom message type for our shock travel, wheel RPM and pedal position data. The message descriptions can be found here. In order to install them, you need to do the following:
- from this directory ROS workspace's src folder
cp -r physics_atv_racepak <ROS workspace>/src
- Build the messages and source
cd ../
catkin_make
source devel/setup.bash
- Verify that messages are built
rosmsg show racepak/rp_controls
rosbag_to_dataset should be installed as a Python 3 package. From the base directory of this repo:
cd rosbag_to_dataset
pip3 install .
cd ../wheeledsim_rl
pip3 install .
pip3 install rospy
Modality | Dimension | Topic | Frequency |
---|---|---|---|
State | 7 | /odometry/filtered_odom | 50Hz |
Action | 2 | /cmd | 100Hz |
RGB Image | 1024 x 512 | /multisense/left/image_rect_color | 20Hz |
RGB Map | 501 x 501 | /local_rgb_map | 20Hz |
Heightmap | 501 x 501 | /local_height_map | 20Hz |
IMU | 6 | /multisense/imu/imu_data | 200Hz |
Shock Pos | 4 | /shock_pos | 50Hz |
Wheel RPM | 4 | /wheel_rpm | 50Hz |
Pedals | 2 | /controls | 50Hz |
Camera Param | Value |
---|---|
image_width | 1024 |
image_height | 544 |
focal_x | 477.605 |
focal_y | 477.605 |
center_x | 499.5 |
center_y | 252.0 |
baseline | 0.21 |
Visualization, evaluation and training require that the datasets be stored using torch. In order to generate torch training trajectories, one can use the multi_convert_bag.py
script in dataset
. The script takes the following arguments (also viewable via python3 multi_convert_bag.py -h
):
Argument | Description |
---|---|
--bag_dir |
The location of the directory containing all of the bag files |
--save_to |
The location to save the resulting torch trajectories |
--use_stamps |
Whther to use the mesage stamps for time or the stamp given in the rosbag message. Setting to True is recommended. |
--torch |
Whether to save the trajectory as a numpy or torch file. Setting to True is recommended. |
--zero_pose_init |
Whether to use the raw GPS state, or to initialize each trajectory to start at (0, 0, 0). Note that this does not rotate the trajectory. Setting to True is recommended. |
--config_spec |
Path to the YAML file that defines how the dataset is to be generated. To recreate the dataset used to train the models in the paper, use ../specs/2021_atv_3.yaml . |
The YAML file to parse datasets is generally a dictionary of {observation, action, dt}
, where observations and actions are themselves dictionaries of options. We provide specs/2021_atv_3.yaml
as a default.
dt:<rate>
gives the time (in s) between each step in the dataset.dt: 0.1
is recommended.action
is a dictionary of the following form:
action:
<topic>:
type:<rosmsg type>
options: <dict of topic-specific options>
observation
is also a dictionary of topics to be included in the dataset:
observation:
<topic>:
type: <rosmsg type>
remap: <name to call this topic in the dataset. Omit to use the rostopic name>
N_per_step: <For time-series data, stack this many messages into a single step>
options: <topic-specific options>
AckermannDriveStamped
Float64
Image
IMU
Odometry
PoseStamped
TwistStamped
We provide a script visualization/visualize_traj.py
that generates a video of the trajectory. Usage: python3 visualize_traj.py --traj_fp <path to torch traj>
.
We provide a script prob_world_model_viz.py
that produces a video of model predictions over the entire trajectory. Run python3 prob_world_model_viz.py -h
for usage. Alternatively, evaluation/eval_prob_world_model.py
can produce single-frame prediction visualizations.
The train/test split used in the paper can be created by running partition_dataset.py --dataset_fp <path to dir of all torch trajs> --save_to <where to move data>
. This will create folders train
, test-easy
and test-hard
in the location specified.
The script eval_prob_world_model
in evaluation
can be used to generate RMSE of a model over a directory of torch trajectories. Usage: eval_prob_world_model.py -h
.
We provide the script used to produce the t-SNE plots in our motivational experiment in visualization
. Usage: python3 tsne_cluster -h