How to use canonical_scan_matcher with Kinect
I'm interested in using canonical_scan_matcher
to estimate odometry with just the Kinect sensor. Has anybody out there already tried that?
I'm using pointcloud_to_laserscan
with openni_kinect
to provide fake laser scans with this launchfile (I haven't made any changes to openni_node.launch nor kinect_frames.launch):
<launch>
<!-- kinect and frame ids -->
<include file="$(find openni_camera)/launch/openni_node.launch"/>
<!-- openni manager -->
<node pkg="nodelet" type="nodelet" name="openni_manager" output="screen" respawn="true" args="manager"/>
<!-- throttling -->
<node pkg="nodelet" type="nodelet" name="pointcloud_throttle" args="load pointcloud_to_laserscan/CloudThrottle openni_manager">
<param name="max_rate" value="2"/>
<remap from="cloud_in" to="/camera/depth/points"/>
<remap from="cloud_out" to="cloud_throttled"/>
</node>
<!-- fake laser -->
<node pkg="nodelet" type="nodelet" name="kinect_laser" args="load pointcloud_to_laserscan/CloudToScan openni_manager">
<param name="output_frame_id" value="/openni_depth_frame"/>
<remap from="cloud" to="cloud_throttled"/>
</node>
</launch>
This seems to work nicely, I haven't got a laser scanner to be able to compare the results, though. Naturally the big difference between a laser scanner and the fake laser scan I'm obtaining is the much narrower field of view (57 instead of 240 degrees).
How to configure the canonical_scan_matcher
to get the best of it with Kinect? I'm using the following launchfile:
<launch>
<node pkg="canonical_scan_matcher" type="csm_node" name="csm_node" output="screen" />
<node pkg="tf" type="static_transform_publisher" name="base_link_to_laser" args="0.0 0.0 0.0 0 0 0.0 /base_link /openni_depth_frame 40" />
<node pkg="rviz" type="rviz" name="rviz"/>
</launch>
but I guess I'm still missing something. AFAIK, /openni_depth_frame
is a right-handed Cartesian coordinate system with the z axis pointing out of the IR-camera's lens. /scan
is being published in the same tf.
Do you, nice people, see any mistakes in the files provided? canonical_scan_matcher
is publishing tf, but the results I can see in rviz
are definitely not satisfactory. In the room I'm testing it, the Kinect sees 3 walls, the 2 right angles between them and some other minor features, shouldn't it be enough?