Using hector_slam with high frequency Lidar

asked 2018-07-16 04:28:37 -0500

Ganesh_Kumar gravatar image

updated 2018-07-16 04:32:54 -0500

Hello, I am trying to make hector_slam work on a dataset generated by a high frequency lidar (300kHZ and scan time 5ms). I am having difficulty to see any meaningful 2D map generated from the laser data. So, I want to understand if the problem lies in tuning the parameter OR the ros laser scan topic generated from the dataset is meaningless or both. So, I try to explain my setup below and give datafile and launch files if someone wants to reproduce the problem: The laser is not mounted on the vehicle horizontally but at a particular angle. While creating the laser scan or pointcloud topics from the dataset, I also generate the tf tree to correspond to this orientation of the lidar with respect to the vehicle. Below is my launch file which converts the dataset into laserscan ros topic with tf trees. dataset to laserscan:

<launch> <arg name="rxp_file" default="/home/my_ws/catkin_ws/data/180322_102655_Scanner_1.rxp"/> <arg name="time_period" default="5"/>

<node pkg="pointcloud2_riegl" type="pointcloudcpp2" name="pointcloudfromrxp" args="$(arg rxp_file)" output="screen">

</node>

<node pkg="tf" type="static_transform_publisher" name="body_to_laser_broadcaster" args="0.0772 -0.3409 -0.1009 0.443505416 0.7681739 -0.399886 -0.2308743 body_link bodymed_link $(arg time_period)"/> <node pkg="tf" type="static_transform_publisher" name="base_to_body" args="0.0 0.0 0.0 0 0 3.141593 base_link body_link $(arg time_period)"/> <node pkg="tf" type="static_transform_publisher" name="bodymed_to_laser_broadcaster" args="0 0 0 -1.5707965 0.0 0.0 bodymed_link horizontal_laser_link $(arg time_period)"/>

<node pkg="tf" type="static_transform_publisher" name="nav_to_base_broadcaster" args="0 0 1.0 0 0 0 1 nav base_link $(arg time_period)"/> <node pkg="tf" type="static_transform_publisher" name="map_nav_broadcaster" args="0 0 0 0 0 0 1 map nav $(arg time_period) "/>

<node pkg="rviz" type="rviz" name="display_rviz" output="screen"/> </launch>

Hector_slam launch file

<launch> <arg name="geotiff_map_file_path" default="$(find hector_geotiff)/maps"/>

<node pkg="rviz" type="rviz" name="rviz" args="-d $(find hector_slam_launch)/rviz_cfg/mapping_demo.rviz"/>

<include file="$(find hector_mapping)/launch/mapping_riegl.launch"/>

<include file="$(find hector_geotiff)/launch/geotiff_mapper.launch"> <arg name="trajectory_source_frame_name" value="scanmatcher_frame"/> <arg name="map_file_path" value="$(arg geotiff_map_file_path)"/> </include>

</launch>

Hector_mapping launch file

<launch> <arg name="tf_map_scanmatch_transform_frame_name" default="scanmatcher_frame"/> <arg name="base_frame" default="base_link"/> <arg name="odom_frame" default="nav"/> <arg name="pub_map_odom_transform" default="true"/> <arg name="scan_subscriber_queue_size" default="5"/> <arg name="scan_topic" default="rxp/laserscan"/> <arg name="map_size" default="2048"/> <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="$(arg base_frame)" />
<param name="odom_frame" value="$(arg odom_frame)" />

<!-- 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="$(arg pub_map_odom_transform)"/>

<!-- Map size / start point -->
<param name="map_resolution" value="0.050"/>
<param name="map_size" value="$(arg map_size)"/>
<param name="map_start_x" value="0.50"/>
<param name="map_start_y" value="0.50" />
<param name="map_multi_res_levels" value="2" />

<!-- 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.4"/>
<param name="map_update_angle_thresh" value="0.06" />
<param name="laser_z_min_value" value = "-1.0" />
<param ...
(more)
edit retag flag offensive close merge delete