ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

AMCL not update robot position

asked 2021-02-04 03:59:58 -0500

nmd gravatar image

updated 2021-02-05 21:34:06 -0500

miura gravatar image

Hi everyone, i am new with ROS, i got a trouble that amcl not working like i expect. I was succesful to create a map, save the map and re open it. My next step is use amcl to locate my robot on map but Amcl Particales dose not change at all, even though i move my robot around. Any body please help me about this situation. And sorry because my English

Detail of trouble:

  1. Robot: build from my self. Lidar: RPLIDAR A1, running on jetson nano

  2. System: Ros Noetic on Ubutu 20.04.

  3. Launch file: customize from turtlebot3_navigation.launch:

    <launch> <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/> <arg name="map_file" default="$(find turtlebot3_navigation)/maps/mymap.yaml"/> <arg name="open_rviz" default="true"/> <arg name="move_forward_only" default="false"/>

    <include file="$(find turtlebot3_bringup)/launch/turtlebot3_remote.launch"> <arg name="model" value="$(arg model)"/> </include>

    <node pkg="map_server" name="map_server" type="map_server" args="$(arg map_file)"/>

    <include file="$(find turtlebot3_navigation)/launch/amcl.launch"/>

    <include file="$(find turtlebot3_navigation)/launch/move_base.launch"> <arg name="model" value="$(arg model)"/> <arg name="move_forward_only" value="$(arg move_forward_only)"/> </include>

    <group if="$(arg open_rviz)"> <node pkg="rviz" type="rviz" name="rviz" required="true" args="-d $(find turtlebot3_navigation)/rviz/turtlebot3_navigation.rviz"/> </group> <node pkg="tf" type="static_transform_publisher" name="map_to_odom" args="0 0 0 0 0 0 map odom 50"/> <node pkg="tf" type="static_transform_publisher" name="odom_to_base_footprint" args="0 0 0 0 0 0 odom base_footprint 50"/> </launch>

  4. My tf tree: map->odom->base_footprint->base_link->base_scan

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-02-05 06:22:29 -0500

miura gravatar image

updated 2021-02-05 21:41:33 -0500

From the published information, I guess the cause is that the frame name of odometry is unmatched. amcl requires odom, not odom_base_footprint.

ref : http://wiki.ros.org/amcl#Parameters

Here is a link to https://github.com/ROBOTIS-GIT/turtle...

<param name="odom_frame_id"             value="odom"/>
<param name="base_frame_id"             value="base_footprint"/>

so base_link and base_footprint are also mismatched.

Therefore, you need to modify amcl.launch to align the above parameters with the current tf, or modify the tf.


Update:

Also tf related, but the frame_id of RPLIDAR seems to be laser_frame.

http://wiki.ros.org/rplidar#Parameters

The frame_id of RPLIDAR seems to be laser_frame, which is unmatched by base_scan. So, you may not be able to use the scanned result properly.

edit flag offensive delete link more

Comments

Thank you Miura san. Sorry, that was my mistake, my tf tree was My tf tree: map->odom->base_footprint->base_link->base_scan. That was a typing mistake, i can not post picture cause i am new in this forum. Do you have any other guess. Thank you Dang

nmd gravatar image nmd  ( 2021-02-05 08:42:29 -0500 )edit

I updated it.

miura gravatar image miura  ( 2021-02-05 21:42:00 -0500 )edit

Thank you Miura san. I got it, let me check

nmd gravatar image nmd  ( 2021-02-06 21:08:50 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-02-04 03:54:58 -0500

Seen: 974 times

Last updated: Feb 05 '21