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

Revision history [back]

I'm assuming that the tf_prefix tag is active for each robot. r_l will append the tf_prefix to the frame_ids specified in its launch file, even if the parameter is specified outside its configuration (we use searchParam). For example, for husky1, it's going to be trying to transform velocities to husky1/base_link and pose data to husky1/odom. However, all the incoming messages lack any tf_prefix (look at your IMU message: the frame_id is just base_link), so r_l doesn't know how to transform from base_link to husky1/base_link. I don't know if Gazebo supports prefixing those frame_ids, so one thing you might try is setting the tf_prefix parameter inside your r_l configuration to the empty string.

I'm assuming that the tf_prefix tag is active for each robot. r_l will append the tf_prefix to the frame_ids specified in its launch file, even if the parameter is specified outside its configuration (we use searchParam). For example, for husky1, it's going to be trying to transform velocities to husky1/base_link and pose data to husky1/odom. However, all the incoming messages lack any tf_prefix (look at your IMU message: the frame_id is just base_link), so r_l doesn't know how to transform from base_link to husky1/base_link. I don't know if Gazebo supports prefixing those frame_ids, so one thing you might try is setting the tf_prefix parameter inside your r_l configuration to the empty string.

EDIT 1 in response to comment I get the three separate tf trees; what is publishing the fourth odom->base_link transform?

rviz is going to yell at you here, as it doesn't know how to transform from each world (huskyN/odom) frame to the other, so you won't be able to display more than one robot at a time. One way to get around this is to define a frame that is a parent to all N of the Husky frames, and then set that to the fixed frame in rviz. To do this, you can just add three static transforms (using static_transform_publisher in the tf or tf2 library), each with the same parent frame, and with the huskyN/odom frame as the child(ren).

I'm assuming that the tf_prefix tag is active for each robot. r_l will append the tf_prefix to the frame_ids specified in its launch file, even if the parameter is specified outside its configuration (we use searchParam). For example, for husky1, it's going to be trying to transform velocities to husky1/base_link and pose data to husky1/odom. However, all the incoming messages lack any tf_prefix (look at your IMU message: the frame_id is just base_link), so r_l doesn't know how to transform from base_link to husky1/base_link. I don't know if Gazebo supports prefixing those frame_ids, so one thing you might try is setting the tf_prefix parameter inside your r_l configuration to the empty string.

EDIT 1 in response to comment

I get the three separate tf trees; what is publishing the fourth odom->base_link transform?

rviz is going to yell at you here, as it doesn't know how to transform from each world (huskyN/odom) frame to the other, so you won't be able to display more than one robot at a time. One way to get around this is to define a frame that is a parent to all N of the Husky frames, and then set that to the fixed frame in rviz. To do this, you can just add three static transforms (using static_transform_publisher in the tf or tf2 library), each with the same parent frame, and with the huskyN/odom frame as the child(ren).