Double-precision support and Physics Engines

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Double-precision support and Physics Engines

Rosen Diankov-2
Good news is that with recent changes (rev >= 167) OpenRAVE supports
the double precision mode of ODE. This allows users to do much higher
physics simulations with much more stable matrix inversions,
jacobians, etc. To enable it, just compile ode with double precision,
and reinstall OpenRAVE.

Support for being able to change to a custom physics simulator
provided by a plugin is almost complete. Just derive from the
PhysicsEngineBase class and provide implementations for all the
members. Note that each KinBody has a special physics data pointer
that allows physics engine to store extra internal data like torques,
velocities, and other dynamic properties. ODE simulation support is
now provided through the PhysicsEngineBase class, so you can check it
out for as an example implementation.... and for the record, i *do
not* recommend ODE for any serious simulation unless your timestep is
really really small.

For those people that are doing kinodynamic planning, you can set and
use simulation in the following way:

before calling PlanPath:

physics = g_pEnviron->CreatePhysicsEngine(L"myenginename");


g_pEnviron->SetPhysicsEngine(NULL); // disable

Inside the planner, you can set the entire dynamic state of the robot through:

robot->SetActiveDOFValues(values); // set joint positions
robot->SetActiveDOFVelocities(values); // set joint velocities
robot->SetControlTorques(torques); // set the torques for each of the joints

note that OpenRAVE does not require you to have a one-to-one mapping
between active degrees of freedom and controllable degrees of freedom.
You can query the control degrees of freedom by

Then to simulate for 0.0123 seconds, do

then query the robot state with: