|
Apologies upfront for I am a noob in rtabmap and ros. I am trying to perform mapping using rtabmap using sensor data from Microsoft Kinect. I am able to do this via RTABMAP GUI interface but I want to execute this from ROS for my project work.
I launched kinect using freenect via this command : roslaunch freenect_launch freenect.launch and launched code given below to launch rtab and its visualizer to map using kinect data. But I am just getting a blank screen on the visualizer though RQT map shows the node connections are proper and there is data published from the kinect node. Not sure what I am missing here. Any help would be highly appreciated. Launch File :
<launch>
<arg name="localization" default="false"/>
<arg name="rgbd_odometry" default="false"/>
<arg name="args" default="--delete_db_on_start"/>
<arg name="rtabmapviz" default="true"/>
<arg name="wait_for_transform" default="0.2"/>
<group ns="rtabmap">
<node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="$(arg args)">
<param name="frame_id" type="string" value="base_link"/>
<param name="odom_frame_id" type="string" value="odom"/>
<param name="wait_for_transform_duration" type="double" value="$(arg wait_for_transform)"/>
<param name="subscribe_depth" type="bool" value="true"/>
<param name="subscribe_scan" type="bool" value="false"/>
<remap from="odom" to="odom"/>
<remap from="rgb/image" to="/camera/rgb/image_raw"/>
<remap from="depth/image" to="/camera/depth_registered/image_raw"/>
<remap from="rgb/camera_info" to="/camera/rgb/camera_info"/>
<remap from="grid_map" to="/map"/>
<param name="RGBD/ProximityBySpace" type="string" value="true"/>
<param name="RGBD/OptimizeFromGraphEnd" type="string" value="false"/>
<param name="Kp/MaxDepth" type="string" value="4.0"/>
<param name="Reg/Strategy" type="string" value="1"/>
<param name="Icp/CoprrespondenceRatio" type="string" value="0.3"/>
<param name="Vis/MinInliers" type="string" value="5"/>
<param name="Vis/InlierDistance" type="string" value="0.1"/>
<param name="RGBD/AngularUpdate" type="string" value="0.1"/>
<param name="RGBD/LinearUpdate" type="string" value="0.1"/>
<param name="Rtabmap/TimeThr" type="string" value="700"/>
<param name="Mem/RehearsalSimilarity" type="string" value="0.30"/>
<param name="Optimizer/Slam2D" type="string" value="true"/>
<param name="Reg/Force3DoF" type="string" value="true"/>
<param if="$(arg localization)" name="Mem/IncrementalMemory" type="string" value="false"/>
<param unless="$(arg localization)" name="Mem/IncrementalMemory" type="string" value="true"/>
<param name="Mem/InitWMWithAllNodes" type="string" value="$(arg localization)"/>
</node>
<node if="$(arg rgbd_odometry)" pkg="rtabmap_ros" type="rgbd_odometry" name="rgbd_odometry" output="screen">
<param name="frame_id" type="string" value="base_link"/>
<param name="wait_for_transform_duration" type="double" value="$(arg wait_for_transform)"/>
<param name="Reg/Force3DoF" type="string" value="true"/>
<param name="Vis/InlierDistance" type="string" value="0.05"/>
<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/rgb/camera_info"/>
</node>
<node if="$(arg rtabmapviz)" 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_scan" type="bool" value="false"/>
<param name="frame_id" type="string" value="base_link"/>
<param name="wait_for_transform_duration" type="double" value="$(arg wait_for_transform)"/>
<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/rgb/camera_info"/>
</node>
</group>
</launch>
with regards Lenord Melvix lmelvix@ucsd.edu
with regards
Lenord Melvix lmelvix@ucsd.edu |
|
Administrator
|
Hi,
To get started on ROS, I recommend to read this small tutorial, which reproduces the same results as the standalone app but under ROS. From this tutorial: $ roslaunch freenect_launch freenect.launch depth_registration:=true $ roslaunch rtabmap_ros rgbd_mapping.launch rtabmap_args:="--delete_db_on_start" For RVIZ example, use this instead: $ roslaunch rtabmap_ros rgbd_mapping.launch rtabmap_args:="--delete_db_on_start" rviz:=true rtabmapviz:=false cheers, Mathieu |
|
Thanks Mathieu ! The issue was that : I was launching freenect without setting depth_registration to true. Fixing that works.
Really appreciate your help with regards Lenord Melvix
with regards
Lenord Melvix lmelvix@ucsd.edu |
| Free forum by Nabble | Edit this page |
