|  | RobWorkProject
    23.9.11-
    | 
a convienience class for bridging RWSim body states with ode body states. Properties of the objects such as MaterialID, collision reduction threshold is kept per instance. More...
#include <ODEBody.hpp>
| Public Types | |
| enum | ODEBodyType { FIXED , KINEMATIC , RIGID , RIGIDODE , LINK , RigidDummy } | 
| Public Member Functions | |
| ODEBody (dBodyID odeBody, rw::kinematics::Frame *frame) | |
| constructor for rigid bodies  More... | |
| ODEBody (dBodyID odeBody, rw::core::Ptr< rwsim::dynamics::RigidBody > rwbody, rw::math::Vector3D<> offset, int matID, int conID) | |
| constructor for rigid bodies  More... | |
| ODEBody (dBodyID odeBody, dynamics::Body::Ptr body, rw::math::Vector3D<> offset, int matID, int conID, ODEBodyType type) | |
| constructor for user defined type, eg. body does not necesarilly need to by of RigidBody to create an ODEBody::RIGID  More... | |
| ODEBody (dBodyID odeBody, rw::core::Ptr< rwsim::dynamics::KinematicBody > rwbody, int matID, int conID) | |
| constructor for kinematic bodies  More... | |
| ODEBody (std::vector< dGeomID > geomId, dynamics::Body::Ptr body, int matID, int conID) | |
| constructor for fixed bodies  More... | |
| virtual | ~ODEBody () | 
| Destructor. | |
| void | update (const rwlibs::simulation::Simulator::UpdateInfo &dt, rw::kinematics::State &state) | 
| Called before collision checking and time stepping.  More... | |
| void | postupdate (rw::kinematics::State &state) | 
| This method updates the state with state info of this ode object. Which means that ode states are converted to rw states.  More... | |
| void | reset (const rw::kinematics::State &state) | 
| resets the ODE body to the values of the RW body  More... | |
| rwsim::dynamics::Body::Ptr | getRwBody () const | 
| returns the RobWork Body | |
| dBodyID | getBodyID () const | 
| get the ODE bodyId | |
| rw::math::Transform3D | getTransform () const | 
| get transform from world to bodyframe | |
| rw::math::Transform3D | getTransformCOM () const | 
| get transform from world to COM | |
| void | setTransform (const rw::kinematics::State &state) | 
| set transform of body, using bodyframe | |
| void | setTransform (const rw::math::Transform3D<> &wTbody) | 
| set transform of body, using bodyframe | |
| void | setTransformCOM (const rw::math::Transform3D<> &wTcom) | 
| set transform of body, using COM | |
| ODEBodyType | getType () const | 
| get type of ODEBody | |
| int | getMaterialID () | 
| get material id | |
| int | getContactID () | 
| get contact model id | |
| rw::kinematics::Frame * | getFrame () | 
| get body frame | |
| void | setCRTThres (double crtthres) | 
| set contact reduction parameter | |
| double | getCRThres () | 
| get contact reduction parameter | |
| rw::math::Vector3D | getLastForce () | 
| void | bodyChangedListener (dynamics::Body::BodyEventType eventtype) | 
| void | setTriGeomData (std::vector< ODEUtil::TriGeomData * > &data) | 
| std::vector< ODEUtil::TriGeomData * > & | getTriGeomData () | 
| Static Public Member Functions | |
| static ODEBody * | makeRigidBody (dynamics::Body::Ptr rwbody, dSpaceID spaceId, ODESimulator *sim) | 
| Construct a rigid body.  More... | |
| static ODEBody * | makeKinematicBody (dynamics::Body::Ptr kbody, dSpaceID spaceid, ODESimulator *sim) | 
| Construct a kinematic body.  More... | |
| static ODEBody * | makeFixedBody (dynamics::Body::Ptr kbody, dSpaceID spaceid, ODESimulator *sim) | 
| Construct a fixed body.  More... | |
a convienience class for bridging RWSim body states with ode body states. Properties of the objects such as MaterialID, collision reduction threshold is kept per instance.
| enum ODEBodyType | 
this enum determines how and what the ODEBody maps from (ODE) and into (RW).
| Enumerator | |
|---|---|
| FIXED | a fixed body | 
| KINEMATIC | a kinematic ode body and a kinematic RW body | 
| RIGID | a rigid ode body and a RigidBody RW | 
| RIGIDODE | a rigid ode body and a RW Body type (any other than RigidBody) | 
| ODEBody | ( | dBodyID | odeBody, | 
| rw::kinematics::Frame * | frame | ||
| ) | 
constructor for rigid bodies
| odeBody | [in] the id of the ode body. | 
| frame | [in] the body frame. | 
| ODEBody | ( | dBodyID | odeBody, | 
| rw::core::Ptr< rwsim::dynamics::RigidBody > | rwbody, | ||
| rw::math::Vector3D<> | offset, | ||
| int | matID, | ||
| int | conID | ||
| ) | 
constructor for rigid bodies
| odeBody | [in] the id of the ode body. | 
| rwbody | |
| offset | [in] offset of the center of mass relative to rwbody | 
| matID | [in] | 
| conID | [in] | 
| ODEBody | ( | dBodyID | odeBody, | 
| dynamics::Body::Ptr | body, | ||
| rw::math::Vector3D<> | offset, | ||
| int | matID, | ||
| int | conID, | ||
| ODEBodyType | type | ||
| ) | 
constructor for user defined type, eg. body does not necesarilly need to by of RigidBody to create an ODEBody::RIGID
| odeBody | [in] the id of the ode body. | 
| body | |
| offset | [in] offset of the center of mass relative to body | 
| matID | |
| conID | |
| type | 
| ODEBody | ( | dBodyID | odeBody, | 
| rw::core::Ptr< rwsim::dynamics::KinematicBody > | rwbody, | ||
| int | matID, | ||
| int | conID | ||
| ) | 
constructor for kinematic bodies
| odeBody | [in] | 
| rwbody | |
| matID | |
| conID | 
| ODEBody | ( | std::vector< dGeomID > | geomId, | 
| dynamics::Body::Ptr | body, | ||
| int | matID, | ||
| int | conID | ||
| ) | 
constructor for fixed bodies
| geomId | |
| body | |
| matID | |
| conID | 
| 
 | static | 
Construct a fixed body.
| kbody | [in] the RobWork body. | 
| spaceid | [in] the ODE space to construct body in. | 
| sim | [in] the ODE simulator. | 
| 
 | static | 
Construct a kinematic body.
| kbody | [in] the RobWork body. | 
| spaceid | [in] the ODE space to construct body in. | 
| sim | [in] the ODE simulator. | 
| 
 | static | 
Construct a rigid body.
| rwbody | [in] the RobWork body. | 
| spaceId | [in] the ODE space to construct body in. | 
| sim | [in] the ODE simulator. | 
| void postupdate | ( | rw::kinematics::State & | state | ) | 
This method updates the state with state info of this ode object. Which means that ode states are converted to rw states.
| state | 
| void reset | ( | const rw::kinematics::State & | state | ) | 
resets the ODE body to the values of the RW body
| state | 
| void update | ( | const rwlibs::simulation::Simulator::UpdateInfo & | dt, | 
| rw::kinematics::State & | state | ||
| ) | 
Called before collision checking and time stepping.
| dt | [in] info related to the timestep. | 
| state |