How to start an external program from RTAB-Map

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

How to start an external program from RTAB-Map

koba
I want to run another program in synchronization with RTAB-Map.
What kind of method is there?
Specifically, in RTAB-Map, we are thinking of moving RealSense and acquiring images
with a 360-degree camera (RICOH THETA) in synchronization with it.

I look forward to your reply.
Reply | Threaded
Open this post in threaded view
|

Re: How to start an external program from RTAB-Map

matlabbe
Administrator
Hi,

For synchonization, RTAB-Map use MessageFilters of ROS with either approximate time or exact time policy selected by approx_sync parameter set to true or false respectively.

However, if you want to record another image along realsense RGB-D data in the database, you would have to use user_data input (see this tutorial). When reading back the user_data, you have to convert it back in format your need, rtabmap won't know what kind of data is saved in this field.

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

Re: How to start an external program from RTAB-Map

koba
Thank you for your reply.

I am a beginner on the source code of rtabmap_ros.
Is there any sample source code calling an external program while synchronizing?

Thanks,
koba
Reply | Threaded
Open this post in threaded view
|

Re: How to start an external program from RTAB-Map

matlabbe
Administrator
I am not sure what you are referring by "calling an external program while synchronizing". What is the application? If you need to call an external program after the map is updated, the ROS way is make your external program subscribing to rtabmap output topics (e.g., /rtabmap/mapData) and do what you need to do.
Reply | Threaded
Open this post in threaded view
|

Re: How to start an external program from RTAB-Map

koba
Hi matlabbe,

Thank you for your answer.

Currently I am connecting RealSenseD435 (Intel) to RTAB-Map.
I also want to connect 360 degree camera THETA(RICHO) additionally.
In that case, what kind of method can be considered?

Many Thanks,
koba
Reply | Threaded
Open this post in threaded view
|

Re: How to start an external program from RTAB-Map

matlabbe
Administrator
Hi,

Assuming that realsense camera is used for RGB-D SLAM, the 360 cannot be used for mapping but we could attach the 360 image to nodes created in the map (as user_data) and query them from the database afterwards. The synchonized user_data approach would be used if the frame rate is similar to realsense. What kind of ROS topic is sent from the 360 camera? Is it sensor_msgs/Image data?

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

Re: How to start an external program from RTAB-Map

koba
Hi  matlabbe,

Thank you for your answer.

I want to release the 360 camera shutter when updating the map of RTAB-Map.
It seems that there is an API to release the 360 camera shutter.
I do not think about returning the data of the 360 camera to RTAB-Map.
How can I know that the map of RTAB-Map has been updated?
Please let me know if the sample code.

Many Thanks,
koba
Reply | Threaded
Open this post in threaded view
|

Re: How to start an external program from RTAB-Map

matlabbe
Administrator
Under ROS or directly with rtabmap C++ API? It is easier with ROS, just subscribe to /rtabmap/info topic.
Reply | Threaded
Open this post in threaded view
|

Re: How to start an external program from RTAB-Map

koba
Thank you for your reply.I will try under ROS.