introlab / rtabmap_ros

RTAB-Map's ROS package.
http://wiki.ros.org/rtabmap_ros
BSD 3-Clause "New" or "Revised" License
974 stars 557 forks source link

NodeData.msg: userData #75

Closed KamalDSOberoi closed 8 years ago

KamalDSOberoi commented 8 years ago

Hello,

I am working with the package rtabmap_ros. In the message folder, there is a message file NodeData.msg, which contains an argument userData. This message file is used in MapData.msg and the mapData is sent to MapOptimizerNode.cpp.

My questions is: Which data is received in the argument userData. Is it relevant to optimize the map? Also is there any documentation to go through all the arguments for MapData.msg?

Thanks a lot for your guidance.

Best Regards, Kamal

Thanks for any guidance.

matlabbe commented 8 years ago

The userData field can contain custom data that were added to a node when it is created. However, the default ROS interface doesn't have the option to set this userData. Using the C++ API, we can modify it: example here, add userData (which is a cv::Mat) here to SensorData before it is processed by rtabmap.

Indeed, it would be nice to have for the ROS wrapper an input to rtabmap node including userData for convenience. For example, if you want to modify the code, you may add a fifth topic to depthCallback() and add the user data to SensorData used to update the map. The last argument of SensorData constructor is the userData. The userData will then be after published on the in nodeData field of mapData topic.

Unfortunately, there is no official documentation for these topics. MapData contains the graph (which contains poses and links) and a vector of node data. The node data contains RGB and depth images, raw odometry pose, laser scan, visual words used by loop closure detection, user data and some identification values.

Actually, NodeData message contains the same data as Signature class of RTAB-Map's library. You can see how conversion is done in nodeDataFromRos() method.

cheers

KamalDSOberoi commented 8 years ago

Thanks a lot for this information. You are awesome! :+1: :100:

Best Regards, Kamal