AMCL not publishing map->odom
Hi, I am trying to just localize my robot with amcl. I have a YDLidarX2L publishing to "scan" but i keep getting
No laser scan received (and thus no pose updates have been published) for 1643915311.541232 seconds. Verify that data is being published on the /scan topic.
I've read that AMCL is supposed to publish map->odom given the tf transform between frame_id of "scan" topic and base_frame_id? Am I supposed to edit my urdf to include odom? Or do I use something like robot_localization to publish a map->odom->base_link/footprint for AMCL to use?
The output of rosrun rqt_tf_tree rqt_tf_tree
has map -> base_footprint -> base_link -> lidar_link
But no map->odom after running AMCL
This is my launch file:
<launch>
<!-- Arguments -->
<arg name="initial_pose_x" default="0.0"/>
<arg name="initial_pose_y" default="0.0"/>
<arg name="initial_pose_a" default="0.0"/>
<!-- AMCL -->
<node pkg="amcl" type="amcl" name="amcl" output="screen">
<param name="min_particles" value="500"/>
<param name="max_particles" value="3000"/>
<param name="kld_err" value="0.02"/>
<param name="update_min_d" value="0.20"/>
<param name="update_min_a" value="0.20"/>
<param name="resample_interval" value="1"/>
<param name="transform_tolerance" value="0.5"/>
<param name="recovery_alpha_slow" value="0.00"/>
<param name="recovery_alpha_fast" value="0.00"/>
<param name="initial_pose_x" value="$(arg initial_pose_x)"/>
<param name="initial_pose_y" value="$(arg initial_pose_y)"/>
<param name="initial_pose_a" value="$(arg initial_pose_a)"/>
<param name="gui_publish_rate" value="50.0"/>
<param name="use_map_topic" value="true"/>
<param name="odom_model_type" value="omni-corrected"/>
<param name="odom_alpha1" value="0.1"/>
<param name="odom_alpha2" value="0.1"/>
<param name="odom_alpha3" value="0.1"/>
<param name="odom_alpha4" value="0.1"/>
<param name="odom_alpha5" value="0.1"/>
<param name="odom_frame_id" value="odom"/>
<param name="base_frame_id" value="base_footprint"/>
<param name="global_frame_id" value="map"/>
<param name="tf_broadcast" value="true"/>
</node>
</launch>
What is publishing the map -> base_footprint transform? Also, is something publishing odometry data? AMCL requires odometry.
ok i got it to work with laser_scan_matcher and ekf with IMU, did not know AMCL requires odom to be published before it can be used. Thanks!
Congratulations!