[Solved] Amcl is not worked

I am currently doing https://husarion.com/tutorials/ros-tutorials/9-map-navigation/. when I run the file named “tutorial_9.launch”, a warning message is displayed.
I would appreciate it if you understand because I am not good at English.

[ WARN] [1598512422.385355499]: No laser scan received (and thus no pose updates have been published) for 1598512422.385183 seconds. Verify that data is being published on the /scan topic.
[ WARN] [1598512422.387494769]: MessageFilter [target=odom ]: Dropped 100.00% of messages so far. Please turn the [ros.amcl.message_notifier] rosconsole logger to DEBUG for more information.
tutorial_9.launch


<arg name="use_rosbot" default="true"/>
<arg name="use_gazebo" default="false"/>

<include if="$(arg use_gazebo)" file="$(find rosbot_gazebo)/launch/maze_world.launch"/>
<include if="$(arg use_gazebo)" file="$(find rosbot_description)/launch/rosbot_gazebo.launch"/>

<param if="$(arg use_gazebo)" name="use_sim_time" value="true"/>

<node if="$(arg use_rosbot)" pkg="rplidar_ros" type="rplidarNode" name="rplidar">
    <param name="angle_compensate" type="bool" value="true"/>
    <param name="serial_baudrate" type="int" value="115200"/><!--model A2 (ROSbot 2.0) -->
    <!--<param name="serial_baudrate" type="int" value="256000"/>--><!-- model A3 (ROSbot 2.0 PRO) -->
</node>

<!-- ROSbot 2.0 -->
<!--<include if="$(arg use_rosbot)" file="$(find rosbot_ekf)/launch/all.launch"/>-->

<!-- ROSbot 2.0 PRO -->
<!-- <include file="$(find rosbot_ekf)/launch/all.launch" >
  <arg name="rosbot_pro" value="true" />
</include> -->

<node if="$(arg use_rosbot)" pkg="tf" type="static_transform_publisher" name="laser_broadcaster" args="0 0 0 3.14 0 0 base_link laser 100" />

<node pkg="move_base" type="move_base" name="move_base" output="log">
	<param name="controller_frequency" value="10.0" />
	<rosparam file="$(find slam_tut)/config/costmap_common_params.yaml" command="load" ns="global_costmap" />
	<rosparam file="$(find slam_tut)/config/costmap_common_params.yaml" command="load" ns="local_costmap" />
	<rosparam file="$(find slam_tut)/config/local_costmap_params.yaml" command="load" />
	<rosparam file="$(find slam_tut)/config/global_costmap_params.yaml" command="load" />
	<rosparam file="$(find slam_tut)/config/trajectory_planner.yaml" command="load" />
</node>

<include file="$(find tutorial_pkg)/launch/map_server.launch"/>

<include file="$(find tutorial_pkg)/launch/amcl_only.launch"/>

Hi,

The patch fixing the issue is now applied at tutorial_pkg where you can see full launch file. And soon the web docs page will be updated.

The problem is with missing rplidar frame_id

You can change launch for rplidar_ros in your launch file to:

    <node if="$(arg use_rosbot)" pkg="rplidar_ros" type="rplidarNode" name="rplidar">
        <param name="angle_compensate" type="bool" value="true"/>
	<param name="frame_id" type="string" value="laser"/>
        <param name="serial_baudrate" type="int" value="115200"/><!--model A2 (ROSbot 2.0) -->
        <!--<param name="serial_baudrate" type="int" value="256000"/>--><!-- model A3 (ROSbot 2.0 PRO) -->
    </node>

Best,
Adam

Very thank you
Thanks to you, I solved this problem

1 Like