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

Add noise and miscalibration to amcl odometry

asked 2016-10-28 08:05:53 -0600

Miguel Velez gravatar image

updated 2016-10-28 08:33:09 -0600

I am trying to add noise and miscalibration the odometry while using amcl to make the turtlebot move from point A to point B. I wrote a subscriber to the odom topic and a publisher called new_odom that changes the values of the original topic. My question is: how can I make amcl use my new topic for localization? I am not sure if I need to modify a launch file, remap a parameter, or change something after the turtlebot has started. More general, how can make any amcl to one of my topics instead of the default topic.

Thanks!

edit retag flag offensive close merge delete

Comments

Hi, how did you add noise and miscalibration the odometry in your robot? Could you please share the implementation with me?

MIN LATT gravatar image MIN LATT  ( 2017-09-15 02:39:09 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-10-30 01:20:18 -0600

DavidN gravatar image

updated 2016-10-30 01:21:56 -0600

It is a bit trickier than just remapping odom topic to your new_odom topic, because amcl uses tf instead of odom. You will have to:

  1. Disable transform from odom to base_link published by turtle bot (by remapping tf topic. Something like this would work: http://answers.ros.org/question/22972... )
  2. Create a node to publish transform from odom to base_link using your new odom data (follow this tutorial: http://wiki.ros.org/navigation/Tutori... )

After you have done all these, you should check if tf tree is correct by following http://wiki.ros.org/tf#view_frames

edit flag offensive delete link more

Comments

Thanks! I will give it a try and let you know if this approach works.

Miguel Velez gravatar image Miguel Velez  ( 2016-10-30 15:34:52 -0600 )edit

Thanks for the insights! I have been reading the links and for step 2, they create the /odom message from scratch, whereas I want to modify the incoming /odom and republish them. I think this might not be the complete approach for what I want

Miguel Velez gravatar image Miguel Velez  ( 2016-11-09 19:51:53 -0600 )edit

In the link in step 2, you just need to pay attention to the code from line 40 to 55 because that is how you can broadcast tf from known x, y, th values (which you obtain from your new odom msg). So you can put this code into a callback of a subscriber of odom topic, that should do the trick

DavidN gravatar image DavidN  ( 2016-11-09 20:40:04 -0600 )edit

Thanks for the quick response. I'll give it a shot.

Miguel Velez gravatar image Miguel Velez  ( 2016-11-12 14:54:30 -0600 )edit

This worked! The only difference is that I had to publish transform from odom to base_footprint, not base_link. I am not sure if that makes a difference. However, it worked and we got the behavior we wanted.

Miguel Velez gravatar image Miguel Velez  ( 2016-11-15 08:48:37 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-10-28 08:05:53 -0600

Seen: 1,084 times

Last updated: Oct 30 '16