gazebosim / gz-physics

Abstract physics interface designed to support simulation and rapid development of robot applications.
https://gazebosim.org
Apache License 2.0
65 stars 41 forks source link

Support of closed kinematic chains #25

Open osrf-migration opened 5 years ago

osrf-migration commented 5 years ago

Original report (archived issue) by Diego Ferigo (Bitbucket: dgferigo).


Doing some experiments with the SDF of Minitaur quadruped (taken from KodlabPenn/kodlab_gazebo), I noticed that the current state of the dart physics plugin does not yet support closed kinematic chains (parallel robot).

The four legs on Minitaur are composed of a five-bar linkage. The SDFs hosted in the GitHub repo work well in Gazebo 10 Classic. However, the simulation of the model in Ignition Gazebo does not apply the constraint to keep the linkage closed, and the links forming the legs fall apart as soon as they touch the ground.

I found this TODO in the code, therefore I open this issue to track the status of the missing support.

peci1 commented 4 years ago

I vouch for resolving this issue. It is in SDF spec that the models can contain closed kinematic chains.

Until this is resolved, I'd expect a note on https://ignitionrobotics.org/docs/citadel/comparison#physics or https://ignitionrobotics.org/docs/all/release-features.

peci1 commented 4 years ago

According to https://github.com/dartsim/dart/issues/465 and https://dartsim.github.io/#dynamics it should be possible with DART, maybe with some workarounds.

Other possibly useful resources: https://dartsim.github.io/tutorials_collisions.html.

peci1 commented 4 years ago

We have a possible use for closed kinematic chains in the SubT virtual challenge (with the Absolem robot).

chapulina commented 4 years ago

I'd expect a note on

@peci1 , we'd appreciate a PR against the docs adding more rows to the comparison table with high-level features that you identify as missing. Thanks!

peci1 commented 4 years ago

I'd expect a note on

@peci1 , we'd appreciate a PR against the docs adding more rows to the comparison table with high-level features that you identify as missing. Thanks!

https://github.com/ignitionrobotics/docs/pull/61

benediktkreis commented 2 years ago

Is this feature going to be implemented soon (e.g. in Garden)? This would help to simulate parallel kinematics e.g. for grippers such as the Robotiq 2F-85 or the OnRobot RG2.

benediktkreis commented 2 years ago

Are there any updates on this feature?

In Gazebo Classic there is the possibility to model 2-finger grippers with closed kinematic chains or use the mimic joints plugin (see here, here and here). Unfortunately, both doesn't work in Ignition Gazebo. That is why it would by of great help if there was the possibility to model closed kinematic chains in Ignition Gazebo.

scpeters commented 2 years ago

we have laid some groundwork for supporting closed kinematic chains in https://github.com/gazebosim/gz-physics/pull/352, though currently only the AttachFixedJoint feature has this support implemented. So one can dynamically create fixed joints that close a loop or create non-tree kinematics. It will need to be applied to the other Attach*Joint features and the ConstructSDF* features before it can be supported for other joints and for loops defined in SDFormat

benediktkreis commented 1 year ago

Is there some progress that allows to statically create closed kinematic chains?

Luczia commented 1 year ago

Hi ! Is there any progress on the subject ? May be there is a basic example of a 4 bar linkage with the workaround @scpeters mentions in this answer ? Like this one in Gazebo Classic ?

oKermorgant commented 9 months ago

Hi,

I am adapting parallel robots from Gazebo classic in order to upgrade Ubuntu (as classic will not be maintained).

As far as I get the state of parallel robots / closed kinematic chains, the solution seems to write an robot without loops and attach some links on spawn, through some plugin (e.g. https://github.com/osrf/mbzirc/pull/138). A DetachableJoint plugin exists in Gazebo but it here to attach several models. A similar plugin should be made for use in a single model, but to attach two links in order to close the loop.

Is this correct or is there any supported approach for closed kinematics already?

oKermorgant commented 9 months ago

I have reproduced the 4 bar linkage in this repo here: https://github.com/oKermorgant/gz_attach_links

This still cannot be done statically in the SDF file, the closing joint has to be attached on spawn. This may be done with a DetachableJoint or with a custom plugin provided in the repo (I only though of using DetachableJoint afterwards...)

The main trouble is that the SDF should still define the robot as a tree, especially no link can have two parents. This may lead to change the parent/child ordering, and thus the relative joint positions.