Ask Your Question
1

Husky perfect localization (Gazebo Positioning System)

asked 2016-10-25 18:18:35 -0500

alexsb92 gravatar image

Hey folks,

I've got a Husky in a Gazebo world that's been generated from an existing floor plan. The floor plan is also published using map_server. For my purposes right now, it's fine if the robot is perfectly localized in Gazebo and I was planning on using /gazebo/model_states to set the required transformations of the robot so that the map in RVIZ stays fixed and doesn't slide when the robot runs up against walls.

I'm still figuring out ROS, so I'm not sure what exactly would be needed for that. In RVIZ the map visualization tells me there's an error saying that "No transform from [map] to [odom]" but to be honest I'm not sure what this transformation would entail for the Husky.

I really appreciate any help with this. Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2016-10-26 07:50:02 -0500

The libgazebo_ros_p3d plugin as used here provides ground truth pose information as a nav_msgs/Odometry message. That topic could be fed into message_to_tf or a robot_localization node to generate the appropriate tf data.

Another related approach is using the ground truth information as odometry and then just adding a static publisher that publishes a additional identity map->odom transform. This is for instance done here: spawn_tracker_with_ground_truth.launch, publish_ground_truth_state.launch

edit flag offensive delete link more

Comments

+1, ros_p3d and message_to_tf works great

paulbovbel gravatar imagepaulbovbel ( 2016-10-27 11:03:48 -0500 )edit

Thanks! I tried the second method first. It's actually similar to something that I had tried. The problem that still exists with that method is that if the robot runs into a wall, while it doesn't move in Gazebo it goes through the wall in RVIZ. Is that related to odom being the fixed frame in rviz?

alexsb92 gravatar imagealexsb92 ( 2016-11-02 10:59:08 -0500 )edit

I will also attempt the first method. Maybe that will solve the issue i still have, although it would be fantastic if you could shed some light on why the running in the wall problem still exists. Thanks!

alexsb92 gravatar imagealexsb92 ( 2016-11-02 11:00:36 -0500 )edit

It really depends on your configuration. In the 'odom' frame of reference, then normally driving 'through the wall' in rviz would be expected, since the wheels would slim and the /odom frame is calculated primarily from wheel odometry.

paulbovbel gravatar imagepaulbovbel ( 2016-11-03 15:12:27 -0500 )edit

If you unhook the wheel odometry from husky's robot_localization instance, and feed in the 'perfect odometry' from gazebo instead, then driving through the wall would not be expected.

paulbovbel gravatar imagepaulbovbel ( 2016-11-03 15:12:50 -0500 )edit

Hi do you mind please explaining when you say "Another related approach is using the ground truth information as odometry and then just adding a static publisher that publishes a additional identity map->odom transform," do we have to manually determine what the static transformation is from map->odom to be able to visualize the robot's true path in Rviz? e.g. guess the translational and rotational offset? Thanks

bc12345 gravatar imagebc12345 ( 2019-07-22 16:21:45 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2016-10-25 18:18:35 -0500

Seen: 3,881 times

Last updated: Oct 26 '16