transformPose Not Working in Multiple Robot Setup
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:
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.
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:
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:
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:
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?