Klamp't
0.9.0
|
A robot simulated in an ODE "world". More...
#include <ODERobot.h>
Public Member Functions | |
ODERobot (RobotModel &robot) | |
void | Create (int index, dWorldID worldID, bool useBoundaryLayer=true) |
void | Clear () |
void | EnableSelfCollisions (bool enabled) |
bool | SelfCollisionsEnabled () const |
void | SetConfig (const Config &q) |
void | GetConfig (Config &q) const |
void | SetVelocities (const Config &dq) |
void | GetVelocities (Config &dq) const |
void | AddTorques (const Vector &t) |
Real | GetJointAngle (int joint) const |
Real | GetJointVelocity (int joint) const |
void | AddJointTorque (int joint, Real t) |
void | SetJointDryFriction (int joint, Real coeff) |
void | SetJointFixedVelocity (int joint, Real vel, Real tmax) |
Real | GetLinkAngle (int link) const |
Real | GetLinkVelocity (int link) const |
void | AddLinkTorque (int link, Real t) |
void | SetLinkDryFriction (int link, Real coeff) |
void | SetLinkFixedVelocity (int link, Real vel, Real tmax) |
Real | GetDriverValue (int driver) const |
Real | GetDriverVelocity (int driver) const |
void | AddDriverTorques (const Vector &t) |
void | AddDriverTorque (int driver, Real t) |
void | SetDriverFixedVelocity (int driver, Real vel, Real tmax) |
void | SetLinkTransform (int link, const RigidTransform &T) |
void | GetLinkTransform (int link, RigidTransform &T) const |
void | SetLinkVelocity (int link, const Vector3 &w, const Vector3 &v) |
void | GetLinkVelocity (int link, Vector3 &w, Vector3 &v) const |
Real | GetKineticEnergy () const |
Real | GetKineticEnergy (int link) const |
bool | ReadState (File &f) |
bool | WriteState (File &f) const |
dSpaceID | space () const |
dBodyID | body (int link) const |
dGeomID | geom (int link) const |
dJointID | joint (int link) const |
ODEGeometry * | triMesh (int link) const |
dBodyID | baseBody (int link) const |
dJointFeedback | feedback (int link) const |
Public Attributes | |
RobotModel & | robot |
Static Public Attributes | |
static double | defaultPadding |
static ODESurfaceProperties | defaultSurface |
A robot simulated in an ODE "world".
Collision detection geom is a list of ODEGeometry objects. The ODE "geom" of geom[i] contains user data = (void*)body_index. This can be used for collision identification. spaceID is a pointer to an ODE "space" containing all the robot's geometry.
If self-collisions should be tested, the EnableSelfCollisions function must be called first. It appears that the space has to be a dSimpleSpace which is somewhat less efficient than the default dHashSpace.
Note: if you manually set the robot's velocities, make sure to disable instability correction in the simulator for that time step.