Issues with hector_mapping using lidar lite v3 on servo

asked 2018-04-22 14:32:54 -0500

roboguy gravatar image

I would like to use hector mapping to generate a map with a lidar lite v3 mounted on a servo motor panning 180 degrees back and forth. A node is publishing LaserScan data directly from the Arduino Mega 2560. I can visualize the data in rviz, but its only generating a straight line as the map. This tells me that there is a tf issue. The current angle of the servo is also published as angle_increment on the /scan topic and the distance is published every 1 degree.

When I run view_frames there is a transform from map->base_link->laser_link and also map->scanmatcher_frame

I still don't understand why I only see a single line generated in rviz.



<node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">

<!-- Frame names -->
<param name="map_frame" value="map" />
<param name="base_frame" value="base_link" />
<param name="odom_frame" value="base_link" />

<!-- Tf use -->
<param name="use_tf_scan_transformation" value="true"/>
<param name="use_tf_pose_start_estimate" value="false"/>
<param name="pub_map_odom_transform" value="true"/>

<!-- Map size / start point -->
<param name="map_resolution" value="0.05"/>
<param name="map_size" value="2048"/>
<param name="map_start_x" value="0.5"/>
<param name="map_start_y" value="0.5" />
<param name="map_multi_res_levels" value="2" />
<param name="laser_min_dist" value="-1.0"/>
<param name="laser_max_dist" value="1.0"/>

<!-- Map update parameters -->
<param name="update_factor_free" value="0.4"/>
<param name="update_factor_occupied" value="0.9" />    
<param name="map_update_distance_thresh" value="0.04"/>
<param name="map_update_angle_thresh" value="0.06" />
<param name="laser_z_min_value" value = "-1.0" />
<param name="laser_z_max_value" value = "1.0" />

<!-- Advertising config --> 
<param name="advertise_map_service" value="true"/>

<param name="scan_subscriber_queue_size" value="5"/>
<param name="scan_topic" value="scan"/>

<!-- Debug parameters -->
  <param name="output_timing" value="false"/>
  <param name="pub_drawings" value="true"/>
  <param name="pub_debug_output" value="true"/>
<param name="tf_map_scanmatch_transform_frame_name" value="scanmatcher_frame" />


<node pkg="tf" type="static_transform_publisher" name="base_lnk_to_laser_lnk" args="0 0 0.05 0 0 0 base_link laser_link 100"/>


Any recommendation would be much appreciated. Thanks.

edit retag flag offensive close merge delete