Replies: 9 comments
-
Almost all the pybullet APIs are assuming a multibody. There is some effort to add softbody/deformable, and the quickstart guide will explicitly mention if an API supports soft/deformables. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the response! Understood. I have also attempted this by adding an anchor to a rigid body with createSoftBodyAnchor, and then apply a force to that body. Do you know if there is a way to remove an anchor after it has been created? |
Beta Was this translation helpful? Give feedback.
-
@rlee3359 Not sure if this would be useful but this paper seems to have used PyBullet (see Section 4): https://arxiv.org/abs/1806.07851 about deformable cloth manipulation, and talks about adding "anchors". @erwincoumans Thank you for your work on PyBullet. I'm curious if you were aware of the paper from Matas et al, which was able to use PyBullet for cloth. I'm guessing the author had to wrestle deep inside PyBullet. (I contacted him and looked briefly at his code.) |
Beta Was this translation helpful? Give feedback.
-
Ah! Found the code base: https://github.com/JanMatas/bullet3 It's a fork of this repo. Edit: here's the other repo for the paper linked below: https://github.com/Zackory/bullet3 (this is more recent and may be easier to work with) |
Beta Was this translation helpful? Give feedback.
-
Thanks for the links, I've been in touch with Jan Matas but didn't have the time to help out a lot. This paper also use PyBullet with deformables: Xuchen Han is implementing FEM and mass-spring systems in PyBullet, next to the existing position based dynamics (PBD) and Chuyuan Fu is also contributing in this area. Let's re-open and see if we can add the feature. |
Beta Was this translation helpful? Give feedback.
-
@DanielTakeshi Thanks for the response! Yes, I have read that paper and that was my inspiration for exploring Bullet's softbody capabilities. I have also attempted to apply anchors and got some success, however I was unable to remove these anchors to "release" the fabric after graspsing. I found a few of the authors pull requests, and it appears he did indeed modify the python API to add the cloth features. Digging into the repository you just linked (thanks for that!), I found at line 8292:
Which doesn't appear in the original codebase, so perhaps he was able to remove softbody constraints. |
Beta Was this translation helpful? Give feedback.
-
@erwincoumans Thank you! I understand that softbody is not the main focus at the moment. I'm not much of C++ developer but I'd love to help contribute if I can. Super awesome locomotion work by the way! Regarding applying forces directly to the soft body, I've been attempting to add this feature into the python API for my research as a workaround for being unable to remove anchors. I realised the
It does indeed apply the forces to the correct link, but the behaviour is a little strange (oscillating movements). I realise this is probably not the ideal way to achieve this behaviour, I'd love any advice on this. Thanks guys! EDIT: |
Beta Was this translation helpful? Give feedback.
-
I implemented the removeConstraint for soft body anchors here: For example:
Also, applied your patch, @rlee3359, can you modify a soft body example to show the oscillating movements? Are the forces too high? Do you apply them right before each stepSimulation command? I tried your initial script (modified), it seems to work fine:
|
Beta Was this translation helpful? Give feedback.
-
Thanks @erwincoumans I did a test by running
(There are a few things in the git diff that aren't relevant to this discussion, for example I commented out the I am using a python 3.7 conda environment, and with installing using Pardon the extreme lag in the GIF above, I was using a laptop without much computational power. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am trying to manipulate soft objects directly by applying forces. For example, I would like to manipulate a cloth by applying a force directly to one of the links of the mesh.
However, applying a force with the applyExternalForce function has no effect.
Here is a simple example, I am applying a small Z force to both a rigid and soft body cube. The soft cube does not appear to be effected. Here I am applying it to the base link but I've tried applying it to the other links also.
I noticed that the C++ addForce function works with soft bodies, is this functionality not yet available in pybullet?
Cheers!
Beta Was this translation helpful? Give feedback.
All reactions