When working with two robots (UR5) is it advisable to keep the base_link frame of each robot at the origin?
Hello, I am working with two robots (UR5)...using arg init_pose
I have set the robot 1 at x1, y1 and z1 position and robot 2 at x2y2 and z2 position. Since the baselink to world joint in the urdf `ur5robot.urdf.xacrois 0.0 0.0 0.0 therefore, when I run
rosrun rviz rviz` I see that both the baselink of the two robots are at the same origin (0,0,0) even though in gazebo they are at different positions because of the arg initpose.
My question is whether it is advisable to have multiple robots with a base link set at the origin so that it can increase the scalability to real-world applications? Or should I set the robots baselinks at different positions in the urdf itself (i.e. hard-code the exact position of the baselink joint of each robot in the urdf itself) which option is better?
Or is there any other better solution?
Asked by mkb_10062949 on 2019-10-07 17:35:59 UTC
Answers
When working with two robots (UR5) is it advisable to keep the base_link frame of each robot at the origin?
No. There is no need for this, in general or with the UR5 models (from ros-industrial/universal_robot
that is).
There is a world
frame in the ur5_robot.urdf.xacro
file, which should actually not be there. See here.
This is also a known issue with these .xacro
s: ros-industrial/universal_robot#284.
I'd recommend to read the comments on that PR and use a custom top-level .xacro
which does not include that world
frame for composite scenes (ie: scenes consisting of multiple robots, spawned individually).
See also #q334644.
Asked by gvdhoorn on 2019-10-08 03:53:03 UTC
Comments
Okay I followed that page and incorporated the changes in the urdf and also in the virtual joint but now the base of the robots are not fixed to the ground it just keeps moving
Asked by mkb_10062949 on 2019-10-08 04:15:20 UTC
For Gazebo, you'll still have to attach the robots to its world
link. What the linked PR is meant to fix is that not every robot should include a world
link in its base .xacro
macro.
Asked by gvdhoorn on 2019-10-08 04:50:26 UTC
Comments