onshape-to-robot icon indicating copy to clipboard operation
onshape-to-robot copied to clipboard

Closed kinematics chain

Open BrianKSchultz opened this issue 2 years ago • 8 comments

Hello there, thanks for this great tool. I'm trying to create a URDF for an ABB IRB8700 robot. This model has a few extra linkages compared to a normal 6 dof robot arm, due to the counterweight and linear actuators for link2. If I suppress the counterweight, link, and linear actuators along with their associated mates/joints, the script works perfectly. With everything active, I get an error about connecting to multiple child links (e.g. Link3 is a child of both Link2 AND the counterweight link).

Do you have a suggestion for the best way to handle this? Thanks for your help. - Brian

image

BrianKSchultz avatar Dec 08 '22 21:12 BrianKSchultz

Hello,

We dont handle kinematics loop currently. I think that it cant be described using UFDF unfortunately

One solution is to open the kinematic chain and use software to maintain the closure constraints true

Gregwar avatar Dec 09 '22 06:12 Gregwar

Just for clarification (as a non mech-e), does this limitation apply to something like Ackermann steering? I'm trying to model this, and I'm getting the following error:

Error, the relation ack_bar_right is connected a child that is already connected
Be sure you ordered properly your relations
image

Thanks

danem avatar Feb 23 '23 18:02 danem

Hello,

You can have multiple joint on one link, but the kinematic structure should be a tree currently. This is a current limitation of this tool.

The reason is that URDF doesnt support closed loops. SDF does though, so that would be interresting to have it.

Current workaround is to make your robot kinematics a tree and solving the closing of the chain manually on software

What is the purpose you have in mind?

Gregwar avatar Feb 23 '23 19:02 Gregwar

I am currently encountering a similar issue with a rudder. Do you have any suggestions? image

WARNING: joint dof_servo_arm1 of type revolute has no limits
+ Found DOF: servo_arm1 (revolute)
WARNING: joint dof_arm1_arm2 of type revolute has no limits
+ Found DOF: arm1_arm2 (revolute)
WARNING: joint dof_arm2_rudder of type revolute has no limits
+ Found DOF: arm2_rudder (revolute)
WARNING: joint dof_rudder_base of type revolute has no limits
+ Found DOF: rudder_base (revolute)

Error, the relation rudder_base is connected a child that is already connected
Be sure you ordered properly your relations, see:
https://onshape-to-robot.readthedocs.io/en/latest/design.html#specifying-degrees-of-freedom

atticusrussell avatar Feb 23 '23 20:02 atticusrussell

Just to be sure about your use cases so that I can write tutorials for them:

  • Is your goal to simulate the robots? Which simulator?
  • is your goal to use the description format? With what purpose?

Gregwar avatar Feb 24 '23 12:02 Gregwar

My goal is to use this tool to create URDF to simulate in Gazebo with ROS2. I wish to simulate the physical aspects of the robot so I can write control code for the electronics before fabricating the actual robot.

I have also been having some trouble getting an exported robot working with ROS2/Gazebo, even in a design without this closed kinematics error, so a tutorial/guidance on that would also be much appreciated.

atticusrussell avatar Feb 24 '23 14:02 atticusrussell

Hi, I've encountered similar issues. I discovered that you can use PyBullet to simulate this using constraints. Check out page 17 of the quick start guide for more information: https://dirkmittler.homeip.net/blend4web_ce/uranium/bullet/docs/pybullet_quickstartguide.pdf.

Sambertibus avatar Apr 25 '24 09:04 Sambertibus

Indeed, to handle loops in kinematics chain, you need to add runtime constraints.

When designing the robot, you can add mates with the name closing_something (prefixed with closing_). Onshape-to-robot will add a frame on each side See: https://onshape-to-robot.readthedocs.io/en/latest/design.html#closing-frames

You can then use pyBullet's createConstraint to add the constraint

If you think that would be relevant, I could write more documentation and provide some end-to-end example for this

Gregwar avatar Apr 29 '24 08:04 Gregwar

Plus one. I would be happy to see just a bit more documentation about it or a video showing exactly this. Thanks.

minched avatar Jun 01 '24 13:06 minched

I added a dedicated page on the documentation: https://onshape-to-robot.readthedocs.io/en/latest/kinematic_loops.html

Does it clarify on how it works ?

Gregwar avatar Jun 03 '24 09:06 Gregwar

Yes, this adds defiinitly the clarity I needed - especially the Onshape example. Working now as well. And Placo is new to me, but looks interesting as well! I will dig into that a bit more. Thanks!

minched avatar Jun 04 '24 17:06 minched

Yes, this adds defiinitly the clarity I needed - especially the Onshape example. Working now as well.

Great!

And Placo is new to me, but looks interesting as well! I will dig into that a bit more. Thanks!

Placo is the library we developped in my team, it is written in C++ with Python bindings and offers a task-space inverse kinematics API, do not hesitate to ping me for any question about it

Gregwar avatar Jun 04 '24 17:06 Gregwar