AMCL / Hector_Slam problem
Hello !
Actually I'm working on a SLAM robot using a Raspberry PI3B with Ubuntu Mate 16.04 et ROS Kinetic.
I started with the mapping (using Hector_Slam) and the result was pretty good.
For the localization, I use in a first time a laserscanmatcher node to get the pose and rotation of the robot and the result was pretty good without any IMU data and ACML or EKF techniques.
But using the scan_matching I have big problems when I make big rotation with my robot and the rotation drift and my mapping is wrong.
So I search how to use AMCL to make better localisation/rotation prediction. But the result is even worse ! And I get a drift instantly when I rotate the robot.
Below you will see all my information, do you see any problems in my using of AMCL ?
Do I strictly need an IMU for get good rotations predictions ? Can I just do not use the rotation for my SLAM project and just use the pose prediction ?
Lidar ( RPLIDAR A1)
<launch>
<node name="rplidarNode" pkg="rplidar_ros" type="rplidarNode" output="screen">
<param name="serial_port" type="string" value="/dev/ttyUSB0"/>
<param name="serial_baudrate" type="int" value="115200"/>
<param name="frame_id" type="string" value="laser"/>
<param name="inverted" type="bool" value="false"/>
<param name="angle_compensate" type="bool" value="true"/>
</node>
</launch>
Mapping / Localization
<launch>
<arg name="trajectory_source_frame_name" default="/laser"/>
<arg name="trajectory_update_rate" default="1"/>
<arg name="trajectory_publish_rate" default="1"/>
<arg name="map_file_path" default="$(find hector_geotiff)/maps"/>
<arg name="map_file_base_name" default="hector_slam_map"/>
<node pkg="hector_trajectory_server" type="hector_trajectory_server" name="hector_trajectory_server" output="screen">
<param name="target_frame_name" type="string" value="/map" />
<param name="source_frame_name" type="string" value="$(arg trajectory_source_frame_name)" />
<param name="trajectory_update_rate" type="double" value="$(arg trajectory_update_rate)" />
<param name="trajectory_publish_rate" type="double" value="$(arg trajectory_publish_rate)" />
</node>
<node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="0 0 0 0 0 0 base_link laser 100" />
<node pkg="laser_scan_matcher" type="laser_scan_matcher_node"
name="laser_scan_matcher_node" output="screen">
<param name="base_frame" value="base_link"/>
<param name="fixed_frame" value="odom"/>
<param name="use_alpha_beta" value="false"/>
<param name="use_odom" value="true"/>
<param name="use_imu" value="false"/>
<param name="max_iterations" value="4"/>
<param name="publish_pose" value="true"/>
<param name="publish_tf" value="true"/>
</node>
<node pkg="hector_mapping" type="hector_mapping" name="hector_height_mapping" output="screen">
<param name="scan_topic" value="scan" />
<param name="base_frame" value="base_link" />
<param name="odom_frame" value="base_link" />
<param name="output_timing" value="false"/>
<param name="advertise_map_service" value="true"/>
<param name="use_tf_scan_transformation" value="false"/>
<param name="use_tf_pose_start_estimate" value="false"/>
<param name="pub_map_odom_transform" value="false"/>
<param name="map_with_known_poses" value="false"/>
<param name="pub_map_scanmatch_transform" value="false"/>
<param name="map_pub_period" value="0.9"/>
<param name="update_factor_free" value="0.45"/>
<param name="laser_max_dist" value="12"/>
<param name="map_update_distance_thresh" value="0.4"/>
<param name="map_update_angle_thresh" value="1"/>
<param name="map_resolution" value="0.05"/>
<param name="map_size" value="1024"/>
<param name="map_start_x" value="0.5"/>
<param name="map_start_y" value="0.5"/>
<param name="pub_odometry" value="true"/>
</node>
<node pkg="amcl" type="amcl" name="amcl" output="screen">
<param name="use_map_topic " value="true"/>
<param name="odom_model_type" value="diff"/>
<param name="odom_alpha5" value="0.1"/>
<param name="transform_tolerance" value="0.2" />
<param name="gui_publish_rate" value="10.0"/>
<param name="laser_max_beams" value="30"/>
<param name="min_particles" value="500"/>
<param name="max_particles" value="5000"/>
<param name="kld_err" value="0.01"/>
<param name="kld_z" value="0.99"/>
<param name="odom_alpha1" value="0.2"/>
<param name="odom_alpha2" value="0.2"/>
<param name="odom_alpha3" value="0.8"/>
<param name="odom_alpha4" value="0.2"/>
<param name="laser_z_hit" value="0.5"/>
<param name="laser_z_short" value="0.05"/>
<param name="laser_z_max" value="0.05"/>
<param name="laser_z_rand" value="0.5"/>
<param name="laser_sigma_hit" value="0.2"/>
<param name="laser_lambda_short" value="0.1"/>
<param name="laser_lambda_short" value="0.1"/>
<param name="laser_model_type" value="beam"/>
<param name="laser_likelihood_max_dist" value="2.0"/>
<param name="update_min_d" value="0.2"/>
<param name="update_min_a" value="0.1"/>
<param name="odom_frame_id" value="odom"/>
<param name="resample_interval" value="1"/>
<param name="transform_tolerance" value="0.1"/>
<param name="recovery_alpha_slow" value="0.0"/>
<param name="recovery_alpha_fast" value="0.0"/>
</node>
</launch>
Asked by JankenGatsu on 2019-02-12 18:30:44 UTC
Answers
By 'big rotation'... Does it work OK with rotations having a low angular velocity? ie. does the problem only appear when the robot turns quickly? If yes, then the problem might be the scan match failing due to exceeding the angular search range. You may need to limit the angular velocity of the robot, or perhaps get a faster LiDAR. If anyone knows how to expand the scan matching to tolerate larger rotations between scans (at the cost of CPU load?) in hector... that might be interesting too.
Asked by jordan on 2019-02-12 21:21:40 UTC
Comments
Yeah I suppose that my LIDAR is maybe too slow. Perhaps by reducing the angular velocity of the robot can resolve the problem.
I just tried to rotate slowly and whitout ACML i got good results, not perfect but still ok.
Strangely when I use ACML all goes mad when I move the robot.
Asked by JankenGatsu on 2019-02-13 08:16:21 UTC
Hi, How did you get amcl to work? i have my hector map, but i cant wrap myh head around amcl... Please help Thanks
Asked by femitof on 2020-01-23 00:25:34 UTC
Comments
I finished this project a long time ago but if I remember well, I stopped to use amcl because its too bad performances with hector.
At the end, I combined Hector_SLAM with a "laser scan matcher" node : -> http://wiki.ros.org/laser_scan_matcher
With these two, I got sufficient results ! That was not bad at all !
Warning : with this method, it is more than possible that you get very bad results if your system make too many high speed rotations so be smooth !
Have fun !
Asked by JankenGatsu on 2020-01-23 02:04:17 UTC
Thanks for your response.. How did you sue the Laser scan matcher with your already created map? Do you still have your launch files? If yes, please share...Thanks
Asked by femitof on 2020-01-23 02:50:56 UTC
Comments