Download your rosbag and move it to src/odometry_optimizer/rosbag/odometries.bag
First, ensure catkin tools is installed (so you can catkin build)
sudo apt install ros-melodic-catkin python-catkin-toolsThen initialize the workspace and build
catkin init
catkin build --cmake-args -DCMAKE_BUILD_TYPE=Release
First, set up kindr, as explained here: https://github.com/ethz-asl/kindr.
Then do the following:
cd src
git clone git@github.com:ethz-asl/rovio.git
cd rovio
git submodule update --init --recursive # gets lightweight_filtering
cd ../..
catkin build --cmake-args -DCMAKE_BUILD_TYPE=Releaseroslaunch odometry_optimizer rovio_solution.launchThe node subscribes to odometries from the topic /rovio/odometry and publishes the optimized path on /optimized_pose. You can see the outgoing poses with the command
rostopic echo /optimized_poseYou can view the optimized path in rviz by adding a path visualization on the /optimized_pose topic.
To export a bag of optimized poses to rosbag/paths.bag, run
roslaunch odometry_optimizer record.launchYou can simulate failure of sensors by disabling the incoming sensor streams. Both rovio and lidar can be disabled. To disable one of the streams, run any of the following commands:
rosservice call /toggle_rovio
rosservice call /toggle_lidarAs the service names imply, this toggles the streams, so to turn them on again simply run the command once more.
Run tests with
catkin_make run_tests odometry_optimizerTo actually get a non-zero return code for failing tests, run the following command after running the tests
catkin_test_resultsIt will return 0 if all tests pass, and 1 otherwise.