RGB-D camera Grabber will not start in OpenNI2

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

RGB-D camera Grabber will not start in OpenNI2

Jason
I can start the the standalone version and select the OpenNI2 camera from the drop down menu and begin recording an environment, however when I create a launch file the camera grabber stays in OpenNI-PCL. I have also created a .ini file hoping that would resolve the issue but have not reached success.

My current launch file:

<launch> 
  <include file="$(find rtabmap_ros)/launch/Pionner3dx/p3dx_openni.launch"/>

  <group ns="rtabmap">
    <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start">
          param name="frame_id" type="string" value="base_footprint"/>
          param name="subscribe_depth" type="bool" value="true"/>
          param name="subscribe_laserScan" type="bool" value="true"/>
       
          <remap from="odom" to="/base_controller/odom"/>
          <remap from="scan" to="/scan"/>

          <remap from="rgb/image"       to="/camera/rgb/image_rect_color"/>
          <remap from="depth/image"     to="/camera/depth_registered/image_raw"/>
          <remap from="rgb/camera_info" to="/camera/depth_registered/camera_info"/>
       
          param name="RGBD/LocalLoopDetectionSpace" type="string" value="false"/>
          param name="RGBD/LocalLoopDetectionTime" type="string" value="false"/>  
          param name="RGBD/OptimizeFromGraphEnd" type="string" value="false"/>
          param name="Kp/MaxDepth" type="string" value="4.0"/>
          param name="LccIcp/Type" type="string" value="2"/>                
          param name="LccIcp2/Iterations" type="string" value="100"/>
          param name="LccIcp2/VoxelSize" type="string" value="0"/>
          param name="LccIcp2/CorrespondenceRatio" type="string" value="0.5"/>
          param name="LccBow/MinInliers" type="string" value="3"/>      
          param name="LccBow/MaxDepth" type="string" value="4.0"/>  
          param name="LccBow/InlierDistance" type="string" value="0.05"/>
          param name="RGBD/AngularUpdate" type="string" value="0.01"/>
          param name="RGBD/LinearUpdate" type="string" value="0.01"/>  
          param name="Rtabmap/TimeThr" type="string" value="700"/>
          param name="Mem/RehearsalSimilarity" type="string" value="0.45"/>  
    </node>

    <node pkg="rtabmap_ros" type="rtabmapviz" name="rtabmapviz" args="-d $(find rtabmap_ros)/launch/config/rgbd_gui.ini" output="screen">
      param name="subscribe_depth" type="bool" value="true"/>
      param name="subscribe_laserScan" type="bool" value="true"/>
   
      <remap from="rgb/image" to="/camera/rgb/image_rect_color"/>
      <remap from="depth/image" to="/camera/depth_registered/image_raw"/>
      <remap from="rgb/camera_info" to="/camera/depth_registered/camera_info"/>
      <remap from="scan" to="/scan"/>
      <remap from="odom" to="/base_controller/odom"/>
     
    </node>
  </group>
</launch>


I can provide the .ini file as well as my openni launch file if needed, any input would greatly help.
Also, if it is important to note, I am using a primsense and a hokuyo urg.
Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: RGB-D camera Grabber will not start in OpenNI2

matlabbe
Administrator
In ROS, the source menu in rtabmap is not used (it is why it is disabled). The RGB-D images are coming from outside rtabmap. In your case, you should use openni2_launch to start your sensor.

Example with the rgbd_mapping.launch file:
$ roslaunch openni2_launch openni2.launch depth_registration:=true
$ roslaunch rtabmap_ros rgbd_mapping.launch

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

Re: RGB-D camera Grabber will not start in OpenNI2

matlabbe
Administrator
Note that in your setup, you can validate that all required topics are sent by doing this:
$ rostopic hz /base_controller/odom
$ rostopic hz /scan
$ rostopic hz /camera/rgb/image_rect_color
$ rostopic hz /camera/depth_registered/image_raw
$ rostopic hz /camera/depth_registered/camera_info
Reply | Threaded
Open this post in threaded view
|

Re: RGB-D camera Grabber will not start in OpenNI2

Jason
I see! Thank you for your help! Also, how would I integrate the Hokuyo laser with the rgbd mapping file? Would I need to create a tf and a node for that? If so what does the tf and node need to look like? Thank you again for you help!
Reply | Threaded
Open this post in threaded view
|

Re: RGB-D camera Grabber will not start in OpenNI2

matlabbe
Administrator
For an example of configuration using the laser, see sections 2-3-4 of this page.

For TF (please refer to ros wiki for more info), the example assumes that you have a tree like this:
                        -> "/base_laser_link"
                       /
"/odom" -> "/base_link"
                       \
                        -> "/camera_link"

The "/odom" -> "/base_link" is provided by your odometry node.
The "/base_link" -> XXXX are provided by URDF or using static transform publishers.                                  

hokuyo_node can be used to provide laser scan messages.

Cheers