Comments (1)
Thanks for creating this issue. Based on our discussion in the email I hope things are moving in a better direction. I shall paste the major points here for reference and then hopefully, very soon, I can create a new section in the WIKI detailing the scope and limitations of softbody simulations.
- As you rightly noticed, there are some flags that we can play with to improve the simulation. I would recommend using the following flags (-l , -p and -t) for soft-body simulation. As an example,
./ambf_simulation -l 22 -t 1 -p 60
These flags are defined as -l (L not I) as the index of the body to load. The 22 index is a primitive ''box'' shape acting as the ground rather than the default ''plane'' primitive shape. I find that the box primitive shape has better SB collision as it reduces ''tunneling'' for bodies that are freely moving in the simulation. The -t flag is to disable dynamic stepping and the -p flag is the frequency of the physics loop. The -t and -p flags are not necessary, but unless you want to do a real-time interaction with the soft-body, I would suggest that you use them, as they give much better solution convergence by not forcing the soft-body solver to terminate to match real-time stepping.
Now you can simply run your softbody example as:
./ambf_simulation -l 22 -t 1 -p 60 -a <path + filename to your .yaml file>
You can even add more bodies to the simulation by adding more indexes to the -l flag.
You can also use the -h flag to list all the command-line options.
I am attaching some examples of softbody examples as well.
softbody_examples.zip
- With the example of the cloth that you shared, it is indeed true that the collision is weird. This is because Bullet only handles the collisions at the vertices (softbody nodes) by default. As the cloth is made up of sparse and finite vertices, the PSM's tip just passes through the cloth. Now all hope is not lost. One option is to increase the collision "margin" parameter in the softbody which increases the collision radius of softbody nodes. As you can see, this is not ideal if your vertices are sparsely populated as it ends up giving thickness to the cloth, which might not be desirable.
So what else can we do? Well, the best solution so far is to use clustering. In a nutshell, clustering essentially forms deformable primitives from a sparse softbody mesh for collision purposes and enables whole body collision and even self collision. To do so, you can play around with some flags in a softbody. I need to document them better, but here is an example.
soft bodies: [BODY Cheese]
joints: []
high resolution path: ./high_res/
low resolution path: ./low_res/
ignore inter-collision: false
namespace: /ambf/env/cheese/
BODY Cheese:
name: Cheese
mesh: Cheese.STL
mass: 10.0
collision margin: 0.001
scale: 1.0
location:
orientation: {p: -0.0, r: 0.0, y: 0.0}
position: {x: -1.3, y: 0.0, z: -1.0}
color components:
ambient: {level: 1.0}
diffuse: {b: 0.0, g: 0.4941, r: 0.8}
specular: {b: 1.0, g: 1.0, r: 1.0}
transparency: 1.0
config: {
kDP: 0.001, # damping
kDF: 10.0, #
kMT: 0.001,
clusters: 0,
flags: 18,
}
The fields clusters
(integer) and flags
(integer converted to hex) are the relevant fields and they are internal parameters of Bullet. Based on the clustering, one requires appropriate collision flags. Again, we need to better document the meaning of these numbers in the wiki but this should be a good starting point.
- I would also suggest modifying the collision shapes of the PSM's links. You may use the newer version of the Blender Addon at https://github.com/WPI-AIM/ambf_addon to visually generate and place the collision shapes (Tutorial Comming Out Soon). For the moment, all the PSM collision shapes are meshes rather than primitives which isn't ideal. I do plan on addressing this myself and I shall update you once I have done so.
Finally, thanks for your patience. I am finally going to be working on improving the soft-body support and feature set as part of my new job so stay tuned :).
from ambf.
Related Issues (20)
- Store the Specification Data (i.e. ADF Raw Data) in the Attributes
- Setting the scale parameter in the ADF does not scale some joints
- Fix CMake out-of-source build HOT 3
- Systemwide access to ROS modules error: no such directory as ./devel HOT 11
- Geomagic Touch connection problem HOT 8
- ambf python client joint order can mismatch
- ambf python client mask joints up to last used idx HOT 4
- Joints fail to find parent or child if they have different namespace
- Specify whether a mesh has a texture enabled/assigned for a shader HOT 1
- No force feedback and showing 2 objects instead of one
- Frames are oriented differently (unit quaternion) when AMBF is launched in headless mode HOT 2
- Error with raven2 launch file HOT 1
- Add graphics update rate to World/State rostopic message HOT 1
- Can't import ambf_client HOT 5
- [Mac OS Build fail] Error: use of undeclared identifier 'GL_RGBA32F'
- Ubuntu 20.04 Build Error HOT 1
- ERROR! FAILED TO INITIALIZE GLFW LIBRARY HOT 1
- Latest build broken HOT 1
- AMBF Python Client Quaternion Order
- Issue in Raven2 controller HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ambf.