How to implement cartographer with kinect sensor?

asked 2017-04-23 20:52:25 -0600

gw963.l gravatar image

updated 2017-04-24 03:57:48 -0600

Humpelstilzchen gravatar image

Many thanks for your help!!!! I'm still pretty new to ROS and turtlebot so I need some advice on setting the launch and configuration files so as to build a map from a bag file containing the /scan /odom and / tf topics, unless i've missed out on other topics.

Currently I can view the turtlebot's odom and tf in the rviz but not the point clouds with the current configuration below:

include "map_builder.lua"

   options = {
     map_builder = MAP_BUILDER,
     map_frame = "map",
     tracking_frame = "imu_link",
     published_frame = "odom",
     odom_frame = "odom",
     provide_odom_frame = true,
     use_odometry = true,
     use_laser_scan = true,
     use_multi_echo_laser_scan = false,
     num_point_clouds = 1,
     lookup_transform_timeout_sec = 0.2,
     submap_publish_period_sec = 0.3,
     pose_publish_period_sec = 5e-3,
   }

   MAP_BUILDER.use_trajectory_builder_3d = true
   TRAJECTORY_BUILDER_2D.use_imu_data = true 

   return options

The launch file:

<launch>

 <node name="cartographer_node" pkg="cartographer_ros"
     type="cartographer_node" args="
         -configuration_directory
             $(find cartographer_turtlebot)/configuration_files
         -configuration_basename turtlebot_depth_cam_3d_2.lua"
     output="screen" />

 <node name="flat_world_imu_node" pkg="cartographer_turtlebot"
     type="cartographer_flat_world_imu_node" output="screen">
   <remap from="imu_in" to="/mobile_base/sensors/imu_data_raw" />
   <remap from="imu_out" to="/imu" />
 </node>

 <node name="dropper" pkg="topic_tools" type="drop"
       args="/camera/depth/image_raw 1 2" />

 <node pkg="nodelet" type="nodelet" name="image_processing_manager"
       args="manager" />
 <node pkg="nodelet" type="nodelet" name="metricizer"
       args="load depth_image_proc/convert_metric image_processing_manager">
   <remap from="image_raw" to="/camera/depth/image_raw_drop" />
   <remap from="image" to="/image" />
 </node>
 <node pkg="nodelet" type="nodelet" name="rectifier"
       args="load image_proc/rectify image_processing_manager">
   <remap from="image_mono" to="/image" />
   <remap from="camera_info" to="/camera/depth/camera_info" />
   <remap from="image_rect" to="/image_rect" />
 </node>
 <node pkg="nodelet" type="nodelet" name="cloudifier"
       args="load depth_image_proc/point_cloud_xyz image_processing_manager">
   <remap from="camera_info" to="/camera/depth/camera_info" />
   <remap from="image_rect" to="/image_rect" />
   <remap from="points" to="/points2" />
 </node>

 <node name="rviz" pkg="rviz" type="rviz" required="true"
     args="-d $(find cartographer_turtlebot
         )/configuration_files/demo_turtlebot.rviz" />
 <node name="playbag" pkg="rosbag" type="play"
     args="--clock $(arg bag_filename)" />

</launch>

edit retag flag offensive close merge delete

Comments

I've tried to reformat your post for better readability. Please check that I have not broken anything.

Humpelstilzchen gravatar imageHumpelstilzchen ( 2017-04-24 03:56:42 -0600 )edit