audio alarm when odometry is lost

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

audio alarm when odometry is lost

gaelcazes
First post so first of all thanks for your amazing work!

I am using a D435i plugged to a laptop to run RTABMAP and would like to find a way to trigger an alarm when the odoemtry is lost or when a loop is completed, an equivalent to your color code (green, yelloz, red) but audio. (I plan to run RTABMAP with the laptop in a backpack, if I find a good enough usb cable...)

My codding skills are quite low so really sorry if this is a noob question but thought that this might interests other people here,

thks
Gael
Reply | Threaded
Open this post in threaded view
|

Re: audio alarm when odometry is lost

matlabbe
Administrator

With ROS, you could subscribe to /rtabmap/odom_info and /rtabmap/info topics to know when odometry is lost or when a loop closure is detected.

With the standalone app, the color code for loop closures is defined here:
https://github.com/introlab/rtabmap/blob/bdfab4e0beff904b93d8d7e651bddd5d5cb094b4/guilib/src/MainWindow.cpp#L2122-L2137

for odometry lost, the color is set here:
https://github.com/introlab/rtabmap/blob/bdfab4e0beff904b93d8d7e651bddd5d5cb094b4/guilib/src/MainWindow.cpp#L1032-L1050

You may use Qt directly to play a sound: https://stackoverflow.com/questions/4473608/how-to-play-sound-with-qt

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: audio alarm when odometry is lost

gaelcazes
Thank you! Will try that