These steps assume you have already set up the system according to the instructions.
Setup:
-
WARNING: Keep the LIDAR unplugged when not in use to avoid overheating (and potential damage).
-
Set up the terminal (in the
rover/lidar
directory):source /opt/ros/noetic/setup.bash source catkin_ws/devel/setup.bash
-
Start
roscore
,xsens_ros_mti_driver
. In thelidar
directory:screen -S roscore -dm bash -c "roscore" screen -S imu -dm bash -c "roslaunch xsens_mti_driver xsens_mti_node.launch"
On each data collection:
-
Plug in the LIDAR. Wait until you can hear the LIDAR spinning; then, start the LIDAR in ROS.
screen -S lidar -dm bash -c "roslaunch data_collection lidar.launch"
-
Start collecting data.
rosbag record -O out.bag /imu/data /ouster/imu /ouster/points
- Data collection will create around 3.5GB of data per minute.
-
When finished:
- Use
ctrl+C
(onrosbag record...
) to kill data collection when finished. - Unplug the LIDAR.
- Kill the
lidar
ROS process withctrl+C
or, if usingscreen
, sendctrl+C
to the screen without attaching it with the commandscreen -S lidar -p 0 -X stuff "^C"
- Inspect the created bag with
rosbag info out.bag
.
- Use
Setup:
-
Launch mmWave Studio, and wait for the initialization script to finish.
-
Select the
radar/scripts/manual_init.lua
script in the bottom dropdown, and clickrun
on the left.- This configures the radar and capture card. Due to software jankiness in mmWave studio, both must be re-flashed each time mmWave studio is restarted.
On each data collection:
-
Start the data collection script. This "steals" the radar socket from mmWave studio.
python collect.py
-
In mmWave studio, select
radar/scripts/manual_start.lua
in the bottom dropdown, and clickrun
. The data collection script should show status messages as data is collected:[t=1.104s] Flushing 8192 packets. [t=1.838s] Flushing 8192 packets. ...
- Data collection will create around 1GB of data per minute.
-
When finished, select
radar/scripts/manual_stop.lua
in the bottom dropdown, and clickrun
.- This will create a temporary file at the path specified in
build.py
(default:rover/radar/tmp.bin
) which you can delete. - The data collection setup should raise an error (or time out).
- This will create a temporary file at the path specified in
Cartographer:
- Copy the output Lidar and Radar data to the same folder, and name them
lidar.bag
andradarpackets.h5
respectively. - Run cartographer:
roslaunch slam offline_cart_3d.launch bag_filenames:=lidar.bag
- NOTE: you may need to manually kill the process by closing the rviz window with
ctrl+c
after it completes. - This step took ~6 minutes for a 9:15 trace.
- NOTE: you may need to manually kill the process by closing the rviz window with
- Generate point cloud / occupancy grid:
roslaunch slam assets_writer_cart_3d.launch \ bag_filenames:=lidar.bag pose_graph_filename:=lidar.bag.pbstream
- This step also creates several output map images (
lidar.bag_xray_{xy, yz, xz}_all.png
,lidar.bag_probability_grid.png
); verify that these images look about right for the scene you've captured. - This step took ~24 minutes for a 9:15 trace.
- This step also creates several output map images (
- Output poses:
rosrun cartographer_ros cartographer_dev_pbstream_trajectories_to_rosbag \ --input lidar.bag.pbstream --output pose.bag rostopic echo -b pose.bag -p trajectory_0 > trajectory.csv
Radar Processing:
-
Only the
radarpackets.h5
andtrajectory.csv
files are needed for radar processing. -
Process radar data:
python process.py fft -p <dataset_folder>
- Pass
<dataset_folder>
as the name of the folder containingradarpackets.h5
andtrajectory.csv
(i.e. the dataset path). - This should create a
radar.h5
file in the<dataset_folder>
. - You may need to reduce
--batch
if your GPU does not have enough memory (default:--batch 1000000
)
- Pass
-
Process trajectory:
python process.py trajectory -p <dataset_folder>
- This should create a
trajectory.h5
file. - Parameters to tune:
--smooth -1
: gaussian smoothing width (higher--smooth
== more smoothing) to be applied to the velocity; disabled by default (if<0
).--min_speed 0.2
: minimum speed threshold for dataset inclusion--max_accel 2.0
: maximum acceleration threshold for relocalization jitter rejectionaccel_excl 15
: number of samples to exclude on either side of each detected jitter eventspeed_excl 5
: number of samples to exclude on either side when the minimum or maximum speed is exceeded
- This should create a
-
Create "ground truth" lidar map:
python process.py map pl <dataset_folder>
- This should create a
map.npz
file.
- This should create a
-
(Optional) Verify time synchronization:
python speed_report.py <dataset_folder>
- This creates a
speed_report.pdf
file showing the SLAM-measured and radar-inferred speed (in m/s) over time (seconds). - Check that the inferred speed mostly matches the measured/processed speed. In particular, pay attention to any large offsets which may indicate a time synchronization issue.
- Make sure that not too much of the dataset is invalid (due to speeds outside the specified window).
- This creates a