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

pose mismatch between RVIZ and Gazebo with AMCL

asked 2021-06-23 08:10:38 -0600

wbadry gravatar image

updated 2021-06-23 09:36:26 -0600

Hello, I am learning a ROS course with Gazebo. During applying the AMCL, I noticed that the Laser scan is off by some degrees. I read about the AMCL initial poses which are included in the launch file

<node pkg="amcl" type="amcl" name="amcl" output="screen">

            .
            .
            .

        <param name="initial_pose_x" value="0.0"/>
        <param name="initial_pose_y" value="0.0"/>
        <param name="initial_pose_a" value="0.0"/>

</node>

image description

Is there any way to get the difference between the two poses and apply it to stay in sync between the Gazebo and RViz? I believe this is very important to not rely on 2D pose estimate especially if Gazebo might be replaced by a real-world robot.

I looked for the AMCL topics and found amcl_pose

$ rostopic list | grep amcl
/amcl/parameter_descriptions
/amcl/parameter_updates
/amcl_pose

When I tried it out at the current rotated pose, I received "as expected" both poses and covariance of amcl

$ rostopic echo /amcl_pose
header: 
  seq: 0
  stamp: 
    secs: 4547
    nsecs: 966000000
  frame_id: "map"
pose: 
  pose: 
    position: 
      x: 0.0035147701830781273
      y: 0.014127498618076101
      z: 0.0
    orientation: 
      x: 0.0
      y: 0.0
      z: 0.003202069927745266
      w: 0.9999948733609477
  covariance: [0.2245754790525376, -0.003158366121491816, 0.0, 0.0, 0.0, 0.0, -0.0031583661214918124, 0.23894487468367523, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.06575617702179823]

This problem happens when I use ateleop node to rotate the robot. The initial pose at the start is not that bad

image description

My robot is in URDF (xacro) files for some wheels macros and the main robot structure.

All help is appreciated.

Update: I think the problem came from the default values of the odom_alpha noise parameters as I didn't add it to set it to a lower value (than the default of 0.2)

<param name="odom_alpha1" value="0.01"/>
<param name="odom_alpha2" value="0.01"/>
<param name="odom_alpha3" value="0.01"/>
<param name="odom_alpha4" value="0.01"/>
<param name="odom_alpha4" value="0.01"/>

image description

I am leaving it for others that may encounter the same issue. If there is any additional steps I should consider, please comment and I would always appreciate it.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-06-24 15:14:14 -0600

bob-ROS gravatar image

This problem happens when I use ateleop node to rotate the robot. The initial pose at the start is not that bad

What is your update_min_a parameter? It decides the minimal rotation needed based on the odometry to trigger and update of the pose estimate from AMCL. I would probably lower it but I would not recommend setting it too low, risk having the pose estimate oscillate away off the map.

edit flag offensive delete link more

Comments

<param name="update_min_d" value="0.2"/><param name="update_min_a" value="0.5"/>

wbadry gravatar image wbadry  ( 2021-06-24 15:55:24 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2021-06-23 08:10:38 -0600

Seen: 540 times

Last updated: Jun 24 '21