ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

Soft body robot simulation with bullet physics

I have a bullet physics wrapper ros node that allows soft body structures to be anchored to rigid bodies and simulated, this example shows a skid steered vehicle with squishy cubical wheels (for no real reason other than the cubes are easier to generate):

The soft bodies in that example don’t have surfaces, in rviz the node points and the link lattice connecting them to each other is visualized, also the anchors to the ‘motor’ rigid bodies are shown as lines as well.

The rigid and soft body compounds are spawned through service calls, and in the example a python script generates the wheels and chassis. Every joint/constraint creates a rostopic that allows it to be controlled, in the video separate velocities are being published to each wheel.

The soft bodies don’t communicate anything other than rviz Markers to ros, though I think bullet provides a center of mass (and orientation?) that could be made into a tf frame. The rigid bodies positions are broadcast as tfs.

Currently face (3-node) and tetra (4-node) structures aren’t fully supported, just links (2-node).

The source is here:

The idea of the bullet wrapping is that it hides nothing about bullet (though only a small subset of the api is exposed) so it can be a platform to experiment with it (and also the simulation boots in about a second and dies with ctrl-c just as fast).

The main branch is pure rigid body simulation (https://www.youtube.com/watch?v=URoyLptHvCU shows off a Stewart platform, support for closed chains demonstrated), later it will be possible to specify whether the sim should support soft bodies or not at launch time.

2 Likes

I was inspired by the the grasping sandbox ROSCon talk to add more features to bullet_server to create a soft material grasping demonstration:

It takes about 60% of a cpu core so the ability to run faster than real time is limited (though running in parallel is easy). Running with a lower fidelity sphere or skimping on simulation steps isn’t recommended with soft body simulation, the most likely result is either instability, object penetration, or bodies that move without any external forces other than gravity.

A pure rigid body version takes much less cpu so can be made to run possibly at 10x real time.

Since I started this project the Bullet Physics Library has added a lot of python support and made a client server architecture that might make a lot of what I’ve done redundant, but there still needs to a be (an even more) thin layer to turn bodies into rviz Markers for visualization, publish their positions into tf, and spawn and manipulate them through service calls and topics.

I’d like to next turn the gripper into a five fingered hand, and try anchoring soft body finger tips to each to see how well grasping a soft body with another soft body works, as well as grasping a rigid object.

A Bullet feature unimplemented in bullet_server is the fracturing capability, it would be interesting to make rigid bodies that will shatter under too much strain and see how well the grasping works.

1 Like

Hi @lucasw. Great to see my talk inspired you to do something this cool :slight_smile:

I’d love to get in touch to see how we can collaborate on moving this forward!

Sure- you can pm me here on discourse if needed, also take a look at the github repo and feel free to make issues for anything big or small that is missing or broken. I imagine better motion control and force sensing are required to make this more usable.

1 Like