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

How to spawn one robot onto another in gazebo?

asked 2019-06-17 03:49:31 -0600

akosodry gravatar image

updated 2019-06-17 06:44:02 -0600

Hello,

I have two different and independent robots. (TWO different URDF files)

In gazebo i want to spawn+attach the second robot to the top of the first robot (the top is defined by the eef_link of robot1).

Of course, in this way, i want these robots to be connected, i.e., if robot1 actuates/moves its eef then since robot2 is attached to it, therefore robot2 needs to move with robot1's eef.

Can you please provide a launch file that performs this spawning mechanism in gazebo?

Thank you in advance.

edit retag flag offensive close merge delete

Comments

The only way to accomplish what you're talking about that I can think if is to create a third URDF, and import the top URDF and bottom URDF files into it, then add a joint to connect the two. If you're fancy, you can parameterize this third urdf to accept two paths, and two links to join together. That way you can specify a top and bottom URDF, and the link in the top to joint to a link on the bottom...

ChuiV gravatar image ChuiV  ( 2019-06-17 09:22:07 -0600 )edit

I dont think that is correct if two independent robots are considered. if im not mistaken that way you described only one robot (robot1+robot2) will be spawned to gazebo. However i want to control robot1 and robot2 separately since those are independent robots.

akosodry gravatar image akosodry  ( 2019-06-17 11:13:25 -0600 )edit
2

I think your usage of "independent" is ambiguous. It sounds like you want to have the robots physically connected to each other, but you want to control each one separately. Am I correct in that interpretation? If so, my proposed solution will still work. Both robots will still be controllable independent from the other, but will be physically attached.

Perhaps more detail in your question would be helpful. What's the function of the top and bottom robots? Example URDFs?

ChuiV gravatar image ChuiV  ( 2019-06-18 09:10:08 -0600 )edit
gvdhoorn gravatar image gvdhoorn  ( 2019-06-18 15:31:30 -0600 )edit

@ChuiV Yes, you are right, your answer is actually correct... Originally, i wanted to totally separate these robots.I did not want to make them connected in the TF tree, because in that way if i check the coordinates of the base_link of the second robot, i am going to get the real xyz coordinates because of the TF tree. If these robots are independent, then robot2 doesn't know that its connected to robot1, and its xyz coordinates will be 0,0,0. But i assume everything is relative. Idk if my description was clear. But your answer can be accepted if an admin allows it.

akosodry gravatar image akosodry  ( 2019-06-19 07:29:29 -0600 )edit

@akosodry, glad I could I help. I'll just copy and paste my first comment into an actual answer then.

ChuiV gravatar image ChuiV  ( 2019-06-19 09:04:15 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-06-19 09:05:00 -0600

ChuiV gravatar image

Just a copy paste from my original comment:

The only way to accomplish what you're talking about that I can think if is to create a third URDF, and import the top URDF and bottom URDF files into it, then add a joint to connect the two. If you're fancy, you can parameterize this third urdf to accept two paths, and two links to join together. That way you can specify a top and bottom URDF, and the link in the top to joint to a link on the bottom...

edit flag offensive delete link more

Question Tools

4 followers

Stats

Asked: 2019-06-17 03:49:31 -0600

Seen: 1,174 times

Last updated: Jun 19 '19