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

transformPose Not Working in Multiple Robot Setup

asked 2020-03-15 18:25:13 -0500

cmcheung gravatar image

I am working on getting multiple Husky robots running in Gazebo and RVIZ. In the single robot instance, everything works as expected. in Costmap2DROS::getRobotPose, the following line functions properly:

tf_.transformPose(global_frame_, robot_pose, global_pose);

The global frame is "odom" and the robot frame is "base_link", and the global_pose is updated accordingly. At the highest level, this is the relationship between the frames: image description

Here's the robot in RVIZ after running through a 2D Nav Goal. Note that the green line is where it started at the origin. image description

The final values for the transform are:

global_frame_:  odom
robot_base_frame_:  base_link
robot_pose coordinates:  0, 0
global_pose coordinates:  0.918264, -5.45333

For my multi-robot setup, I have three Husky robots each running on their own name space, and it looks like this: image description

Each Husky is running its own RVIZ to pass 2D Nav Goals. Note that I only have one move_base running to simplify, which is why only one of the windows shows the costmap: image description

When I try to give 2D Nav Goals in this multi-robot/multi-RVIZ situation, the robot moves in Gazebo, and the costmap changes in RVIZ, but the robot never leaves the origin of the RVIZ grid. Accordingly, the robot never thinks it reaches it's destination because it thinks it's stuck at 0,0.

The values for the transform are stuck as follows, as the robot moves endlessly:

global_frame_:  husky_gamma_tf/odom
robot_base_frame_:  husky_gamma_tf/base_link
robot_pose coordinates:  0, 0
global_pose coordinates:  0, 0

This doesn't change no matter how far the vehicle moves in Gazebo.

This is the result of view_frames:

image description

Everything should be the same, with the exception of the added namespace per robot, yet transformPose keeps returning 0,0.

Any ideas why transformPose isn't working in this situation, or any suggestions on things to look at?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-03-16 22:52:51 -0500

cmcheung gravatar image
edit flag offensive delete link more

Comments

And the solution was?

gvdhoorn gravatar image gvdhoorn  ( 2020-03-17 04:14:50 -0500 )edit

Needed to make changes to control.yaml

https://answers.ros.org/answers/22893...

cmcheung gravatar image cmcheung  ( 2020-03-17 07:23:10 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-03-15 18:25:13 -0500

Seen: 363 times

Last updated: Mar 16 '20