how rtabmap receive image via nodelet?

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

how rtabmap receive image via nodelet?

mantouRobot
Hi~
      i'm wondering how can i receive the image via nodelet for rtabmap_ros?
      Can u give me some advice? Thanks a lot~
Reply | Threaded
Open this post in threaded view
|

Re: how rtabmap receive image via nodelet?

matlabbe
Administrator
Hi,

rtabmap and rtabmapviz cannot be used like a nodelet. However, rgbd_odometry is (and other odometry nodelets):
    <node pkg="nodelet" type="nodelet" name="rgbd_odometry" args="load rtabmap_ros/rgbd_odometry camera_nodelet_manager">
      <remap from="depth/image"       to="depth_registered/image_raw"/>
      <remap from="rgb/camera_info"   to="rgb/camera_info"/>
      <remap from="rgb/image"         to="rgb/image_rect_mono"/>
	  
      <param name="frame_id"        type="string" value="camera_link"/>   
    </node>
This example assumes that a nodelet manager called "camera_nodelet_manager" already exist (generarly started from openni or freenect launch files). This way, there will be not message serialization/deserialization between openni/freenect camera and rgbd_odometry.

cheers
Reply | Threaded
Open this post in threaded view
|

Re: how rtabmap receive image via nodelet?

mantouRobot
Hi~
      I see the source code of CoreNode.cpp which has the main function. In the main function, first we erase the param and then new a class of CoreWrapper. Can I wrapp this into a nodelet?
      Thank u so much~
Reply | Threaded
Open this post in threaded view
|

Re: how rtabmap receive image via nodelet?

mantouRobot
In reply to this post by matlabbe
Hi~
     if can't, any advice for decrease the copy cost?
Reply | Threaded
Open this post in threaded view
|

Re: how rtabmap receive image via nodelet?

matlabbe
Administrator
Hi,

You could instantiate the CoreWrapper class in the onInit() method of a nodelet. However, the node handle getters should be modified to use the one for nodelets. Also, all ROS_INFO should be changed to NODELET_INFO.

I'll think about it today on how to make it clean. I'll post any advancements on https://github.com/introlab/rtabmap_ros/issues/96 

cheers
Reply | Threaded
Open this post in threaded view
|

Re: how rtabmap receive image via nodelet?

mantouRobot
Thanks~
      I try wrapped Core into a nodelet, but when i new the Core class something wrong. I sure the params to the construction of the class is right. I will try more.
      Thank u ~
Reply | Threaded
Open this post in threaded view
|

Re: how rtabmap receive image via nodelet?

matlabbe
Administrator
Hi,

As you can see in issue #96, I added rtabmap_ros/rtabmap nodelet in this commit. For an example of usage, see test_rtabmap_nodelets.launch.

cheers
Reply | Threaded
Open this post in threaded view
|

Re: how rtabmap receive image via nodelet?

mantouRobot
Thank u~
      But my ROS is indigo, can I directly use the master branch?
Reply | Threaded
Open this post in threaded view
|

Re: how rtabmap receive image via nodelet?

matlabbe
Administrator
Yes, I tested it in Indigo.
Reply | Threaded
Open this post in threaded view
|

Re: how rtabmap receive image via nodelet?

mantouRobot
Thank u~
      u mean I don't need to use the indigo-dev anymore, directly use the maset-branch? but my data.db is the version 0.11.8, will it work?
Reply | Threaded
Open this post in threaded view
|

Re: how rtabmap receive image via nodelet?

matlabbe
Administrator
Beside this occupancy grid issue, yes the databases are backward compatible.

cheers