How does one make a single link in Pybullet undamped?

Post Reply
ryan72
Posts: 3
Joined: Mon May 15, 2017 2:26 am

How does one make a single link in Pybullet undamped?

Post by ryan72 » Mon May 15, 2017 2:59 am

I am trying to make an object move at a constant velocity in pybullet. Attached are the txt files for a MWE that consists of a single link. A link which has no nodes (e.g. visual, inertial or collision nodes) is given an initial velocity. Its velocity decreases with time which makes me think there is an external damping force on this link. I think this might be solvable if I can use something like the "setDamping" function for rigid bodies (see: http://bulletphysics.org/Bullet/BulletF ... dd4d20114b), and set the damping to zero, but I do not know how to do this. I could find any information on the pybullet quickstart guide (currently online at https://docs.google.com/document/d/10sX ... hxVUA/edit#) about eliminating joint damping, but this robot has not joints.
Attachments
dampingIssueMWE.py.txt
Python script that shows the damped velocity vs time behavior for an object with no forces acting on it.
(735 Bytes) Downloaded 48 times
base.urdf.txt
URDF file that the Python script loads
(93 Bytes) Downloaded 86 times

User avatar
Erwin Coumans
Site Admin
Posts: 4093
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: How does one make a single link in Pybullet undamped?

Post by Erwin Coumans » Wed May 17, 2017 2:04 am

There is a very small amount of default damping, and this is not exposed at the moment. We can consider exposing the damping. With zero damping and no other forces, the simulation will likely accumulate energy over time and 'blow up'.

Since your model is very simple, why don't you use Matlab instead?

ryan72
Posts: 3
Joined: Mon May 15, 2017 2:26 am

Re: How does one make a single link in Pybullet undamped?

Post by ryan72 » Wed May 17, 2017 3:24 pm

Thank you for the reply. I eventually need to design an estimation and control law for an actual robot. This software will take in joint position, joint velocity and link 6DOF data. It will output a target torque which (it is assumed) that the motor driver can attain instantaneously. I was hoping to use pybullet for its physics modeling, inverse kinematics and ability to connect to Python compatible optimization/neural network software.

At the moment I am working on estimating the robot’s states (the 0th, 1st and 2nd derivatives of both the 6DOF base (chest) and all joints) with an EKF (extended Kalman Filter). I was validating my Featherstone EOM (to serve as the EKF “process”) against Bullet’s to confirm that mine are correct and the Bullet is doing what I think it is. The validation was unsuccessful (at least in part) due to Bullet was not conserving energy. I removed things from a copy of the pybullet simulation until I had the MWE mentioned above.

I want the only energy changes in the model to be induced by motors and foot contact; exposing the damping in the pybullet API might help in this regard. Control over this damping may be useful for robotic arm models that use computed-torque controllers or state estimation.

Post Reply