Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chain of bodies that looks like a loop, is this possible? #2922

Closed
DarioUrbina opened this issue Jul 9, 2020 · 2 comments
Closed

Chain of bodies that looks like a loop, is this possible? #2922

DarioUrbina opened this issue Jul 9, 2020 · 2 comments

Comments

@DarioUrbina
Copy link
Contributor

I want to join a child link (i.e. Link #10), to the base link (i.e. link #-1). This is generating discrepancies when trying to run the simulation.

Since I cannot accomplish this with declared joints in my .urdf files, I have opted to restrict the motion of a body with a artificial joint (I am relying on collisions to do so). This is apparently a good solution. But when working with very complex bodies the collisions are not respected and the models behaves like in a chaotic way.

Here you can see my code: Pendulum_exercise/Inverted_pendulum_tendon_actuation.py

@erwincoumans
Copy link
Member

erwincoumans commented Jul 9, 2020

You can create a fixed constraint (or point-to-point constraint etc) to create loops, using pybullet.createConstraint.
See for example: https://github.com/bulletphysics/bullet3/blob/master/examples/pybullet/examples/constraint.py
You can pass in a parent body unique id, link index and child body unique, link index. For a loop the parent and child body unique id can be the same.

We use this for example in the Minitaur quadruped robot to create a loop for each leg (5-bar linkage):
https://github.com/bulletphysics/bullet3/blob/master/examples/pybullet/gym/pybullet_envs/minitaur/envs/minitaur.py#L378

There are no links to your code (Pendulum_exercise/Inverted_pendulum_tendon_actuation.py), can you attach them as zipfile?

@DarioUrbina
Copy link
Contributor Author

DarioUrbina commented Jul 10, 2020

Thank you for the reply,

In the zip file you can find the files, the first to the Python code, the second to the URDF code:

I just updated the file to the version you should see, the file you saw a minute ago is not the right one, please open this one:

Inverted_pendulum_tendon_actuation.zip

You will see that even though the model looks right, when moving the pulley (wheels), it can enter into a chaotic behavior.

@bulletphysics bulletphysics locked and limited conversation to collaborators Apr 26, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants