Output the image and depth image of keyframe

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

Output the image and depth image of keyframe

chaoqunzhuoyue
Hi,

    I can get the pose with standalone version RTABMAP with FIle-> Extract pose in the GUI. Now I would like to output the corresponding RGB image and depth image with these key pose. We have modified the RTABMAP.cpp in the standalone version and output these image successfully.

    Now we have record a rosbag and we want to output the RGB and depth image  with RTABmap-ros, now we have no idea where we can modified so as to achieve it. There is no such file as Rtabmap.cpp in ROS version. Any suggestions ? Or is there any other way that we can do that?

Best
Charle
Reply | Threaded
Open this post in threaded view
|

Re: Output the image and depth image of keyframe

matlabbe
Administrator
Hi,

Not sure what you are trying to do, but you may re-open the generated database from rtabmap_ros in standalone RTAB-Map and do the same thing you were doing. If you want to record online the pose + images, I suggest to use the output /rtabmap/mapData. The last image/depth added to graph is in the topic (last node). You can also have all the graph at the same time (which could change after loop closures).

Note that rtabmap_ros uses Rtabmap class (see CoreWrapper.cpp), so if rtabmap_ros is built against your modified rtabmap libraries, it will do the same thing.

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

Re: Output the image and depth image of keyframe

chaoqunzhuoyue
Hi,

    Thank you for your reply. I should  describe my question again. Currently I just have a ros bag file that record all the topics when I run rtabmap_ros.  Now using this bag file, I would like to output the pose.(With RTABMAP_ROS and File -> exportPose, I can do that. But I do not know how to achieve this using standalone version.) Now I want to get the rgb image and depth image (keyframe?) corresponding to these output poses. All I want to do is to get some images with poses. My question is , with standalone RTABMAP and a database (rgb image and depth image), I can get the pose and the corresponding images. But with RTABMAP ros and a databe (actually a bag file), I am not sure how I can do this.
    Thank you for help !

Best Regards
Reply | Threaded
Open this post in threaded view
|

Re: Output the image and depth image of keyframe

matlabbe
Administrator
Hi,

If you ran rtabmap_ros at the same time than recording the rosbag, you should have already a database of the final map. Using this database, you can extract what you want using standalone version or database viewer.

If you didn't keep the database after recording the rosbag, it depends on which topics are saved in the rosbag. Can you show what is in the rosbag?
$ rosbag info myBag.bag

cheers,
Mathieu