Adapting SD-SLAM

2 minute read

On the previous entry I discover that SD-SLAM didnt publish any pose. I was wrong, I had an outdated version of SD-SLAM. The latest version do publish the pose on a ROS topic.

Anyways the odometry_evaluation_file_creator ros package works with odometry, so there are two possible paths. Either I changed odometry_evaluation_file_creator to work with Pose, either I change SD-SLAM to publish odometry messages.

The later has been done since I also have to make a change to SD-SLAM regarding the timestamps as stated in the previous entry.

rosify_difodo

Rosify difodo has a new parameter in his launch file called use_depth_images_timestamp that if true will make rosify_difodo to publish in the odometry messages the timestamps of the last depth image received. Check ros_difodo.launch and ros_difodo_TUM.launch to see this parameter.

SD-SLAM

For SD-SLAM the Pose message being publish has being change to an Odometry message (which has the pose on it). Although the covariance of the Pose and the twist havent been filled (to be done in the future ideally).

Now the odometry is publish on /sdslam/odom

Also a parameter like in rosidy_difodo has been added called ROS.UseImagesTimeStamps which as the parameter from rosify difodo allows to use timestamps from the latest image received instead of the real timestamp.

odometry_evalaution_file_creator

Ive created two launch files one to work with rosify_difodo and another one to work with SD-SLAM.

Right now the way to work is launch rosify_difodo or SD-SLAM and the odometry_evaluation_file_creator separately. But Ill create two launch files, one for rosify_difodo and another one for SD-SLAM in a way that they also launch odometry_evaluation_file_creator with their respective configuration, to make it simple.

Results

Once this changes has being applied, finally we can use SD-SLAM along with odometry_evaluation_file_creator, and the first results were pretty good for TUM dataset.

One launch file to launch everything

As I previously said Ive created a launch file that allows to launch SD-SLAM and rosify_difodo configured properly to work with TUM dataset and also launch odometry_evaluation_file_creator to generate the evaluations files. One command to create an evaluation file.

rosify_difodo

Use this to launch odometry_evaluator_file_creator and also rosify_difodo. Both of them ready to work with each other.

roslaunch rosify_difodo ros_difodo_TUM_evaluation_file.launch

Change the parameter output_file_dir located on odometry_evaluator_file_creator/launch/config/rosify_difodo_evaluator_config.yaml directly on the configuration file or by using:

roslaunch rosify_difodo ros_difodo_TUM_evaluation_file.launch output_file_dir:=/home/myDirectory  (NOT WORKING CURRENTLY CHANGE ON CONFIGURATION FILE DIRECTLY)

SD-SLAM

Run SD-SLAM alone:

This is the way to run RGBD from SD-SLAM package with arguments (TODO: this has to be done on a launch level)

rosrun SD-SLAM RGBD /home/omar/Programs/SDslam/Examples/ROS/SD-SLAM/config/ROS_TUM1.yaml

Or if you want to use it a a launchfile just:

roslaunch SD-SLAM sdslam_TUM1.launch

Now to launch SD-SLAM with odometry_evalaution_file_creator all at once execute this launchfile:

roslaunch SD-SLAM sdslam_TUM1_evaluation_file.launch

NOTE: If you want to test TUM freidburg2 or freidburg3 sequences use the correspondent launch files.

If you want to change the output dir for SD-SLAM: Change the parameter output_file_dir located on odometry_evaluator_file_creator/launch/config/sdslam_evaluator_config.yaml directly on the configuration file.

Next steps

The next steps are simple: Run on the different sequences of TUM both rosify_difodo and SD-SLAM to compare both on different scenarios.