|
| ODESimulator () |
| empty constructor
|
|
| ODESimulator (dynamics::DynamicWorkCell::Ptr dwc, rw::common::Ptr< rwsim::contacts::ContactDetector > detector=NULL) |
| constructor More...
|
|
virtual | ~ODESimulator () |
| destructor
|
|
void | load (rwsim::dynamics::DynamicWorkCell::Ptr dwc) |
| adds dynamic workcell More...
|
|
bool | setContactDetector (rw::common::Ptr< rwsim::contacts::ContactDetector > detector) |
| Change the contact detector used by the engine. More...
|
|
void | setStepMethod (StepMethod method) |
| sets the ODE step method that should be used for stepping
|
|
void | step (double dt, rw::kinematics::State &state) |
|
void | resetScene (rw::kinematics::State &state) |
|
void | initPhysics (rw::kinematics::State &state) |
|
void | exitPhysics () |
|
double | getTime () |
|
void | DWCChangedListener (dynamics::DynamicWorkCell::DWCEventType type, boost::any data) |
|
void | setEnabled (dynamics::Body::Ptr body, bool enabled) |
|
void | setDynamicsEnabled (dynamics::Body::Ptr body, bool enabled) |
|
drawable::SimulatorDebugRender::Ptr | createDebugRender () |
|
virtual rw::common::PropertyMap & | getPropertyMap () |
|
void | emitPropertyChanged () |
|
void | addController (rwlibs::simulation::SimulatedController::Ptr controller) |
|
bool | isInitialized () |
|
void | addBody (rwsim::dynamics::Body::Ptr body, rw::kinematics::State &state) |
|
void | addConstraint (rwsim::dynamics::Constraint::Ptr constraint) |
| Add a Constraint between two bodies. More...
|
|
void | addDevice (rwsim::dynamics::DynamicDevice::Ptr device, rw::kinematics::State &state) |
|
void | addSensor (rwlibs::simulation::SimulatedSensor::Ptr sensor, rw::kinematics::State &state) |
| add a simulated sensor to this simulator
|
|
void | removeController (rwlibs::simulation::SimulatedController::Ptr controller) |
|
void | removeSensor (rwlibs::simulation::SimulatedSensor::Ptr sensor) |
| add a simulated sensor to this simulator
|
|
const rw::kinematics::FramePairMap< std::vector< dynamics::ContactManifold > > & | getContactManifoldMap () |
|
std::vector< ODEBody * > & | getODEBodies () |
|
dynamics::DynamicWorkCell::Ptr | getDynamicWorkCell () |
|
std::vector< rwlibs::simulation::SimulatedSensor::Ptr > | getSensors () |
| get the list of simulated sensors More...
|
|
void | attach (rwsim::dynamics::Body::Ptr b1, rwsim::dynamics::Body::Ptr b2) |
|
void | detach (rwsim::dynamics::Body::Ptr b1, rwsim::dynamics::Body::Ptr b2) |
|
void | disableCollision (rwsim::dynamics::Body::Ptr b1, rwsim::dynamics::Body::Ptr b2) |
|
void | enableCollision (rwsim::dynamics::Body::Ptr b1, rwsim::dynamics::Body::Ptr b2) |
|
rw::math::Vector3D | getGravity () |
| get current gravity
|
|
dWorldID | getODEWorldId () const |
|
void | addODEJoint (ODEJoint *odejoint) |
|
ODEJoint * | getODEJoint (rw::models::Joint *joint) |
|
void | addODEBody (ODEBody *odebody) |
|
void | addODEBody (dBodyID body) |
|
void | addODEJoint (dJointID joint) |
|
ODEBody * | getODEBody (rw::kinematics::Frame *frame) |
|
dBodyID | getODEBodyId (rw::kinematics::Frame *frame) |
|
dBodyID | getODEBodyId (rwsim::dynamics::Body *body) |
|
std::vector< ODEDevice * > | getODEDevices () |
|
void | addEmulatedContact (const rw::math::Vector3D<> &pos, const rw::math::Vector3D<> &force, const rw::math::Vector3D<> &normal, dynamics::Body *b) |
|
void | setContactLoggingEnabled (bool enable) |
| Enables logging of the contact points.
|
|
boost::unordered_map< std::pair< std::string, std::string >, bool > | getContactingBodies () |
| Returns a map of contacting body frame names and their contact points.
|
|
void | handleCollisionBetween (dGeomID o0, dGeomID o1) |
| Returns a vector of all contact points. More...
|
|
const std::vector< ODEUtil::TriGeomData * > & | getTriMeshs () |
|
std::vector< dynamics::ContactPoint > | getContacts () |
|
int | getContactCnt () |
|
double | getMaxSeperatingDistance () |
|
dSpaceID | getODESpace () |
|
void | addContacts (std::vector< dContact > &contacts, size_t nr_con, ODEBody *dataB1, ODEBody *dataB2) |
|
std::vector< ODETactileSensor * > | getODESensors (dBodyID odebody) |
|
dynamics::MaterialDataMap & | getMaterialMap () |
|
dynamics::ContactDataMap & | getContactMap () |
|
virtual | ~PhysicsEngine () |
| destructor
|
|
virtual void | load (rw::common::Ptr< rwsim::dynamics::DynamicWorkCell > dwc)=0 |
| adds dynamic workcell
|
|
virtual void | setEnabled (rw::common::Ptr< rwsim::dynamics::Body > body, bool enabled)=0 |
|
virtual void | setDynamicsEnabled (rw::common::Ptr< rwsim::dynamics::Body > body, bool enabled)=0 |
| disables the dynamics of a body. More...
|
|
virtual void | addController (rw::common::Ptr< rwlibs::simulation::SimulatedController > controller)=0 |
| add a simulated controller to this simulator
|
|
virtual void | removeController (rw::common::Ptr< rwlibs::simulation::SimulatedController > controller)=0 |
| removes a simulated controller from this simulator More...
|
|
virtual void | addBody (rw::common::Ptr< rwsim::dynamics::Body > body, rw::kinematics::State &state)=0 |
| add a body to the physics engine More...
|
|
virtual void | addDevice (rw::common::Ptr< rwsim::dynamics::DynamicDevice > dev, rw::kinematics::State &state)=0 |
| add a dynamic device to the physics engine More...
|
|
virtual void | attach (rw::common::Ptr< rwsim::dynamics::Body > b1, rw::common::Ptr< rwsim::dynamics::Body > b2)=0 |
| creates a 6dof dynamic constraint between the two bodies b1 and b2 More...
|
|
virtual void | detach (rw::common::Ptr< rwsim::dynamics::Body > b1, rw::common::Ptr< rwsim::dynamics::Body > b2)=0 |
| removes the 6dof constraint between bodies b1 and b2 if there is any More...
|
|
virtual void | setSimulatorLog (rw::common::Ptr< rwsim::log::SimulatorLogScope > log) |
| Store internal info during simulation. More...
|
|
an implementation that use the physics engine ODE to implement the Simulator interface of RWSim. All information into the simulator is derived through RWSim classes.
Supported objects types include Rigid, Kinematic and fixed Supported device types include Rigid and Kinematic
The simulation step looks like this
1 updateControllers() 2 updateDevices() // sets the target velocity of devices 3 performContactDetection() 4 performConstraintSolving() 5 updateSensorStates() 6 updateDeviceStates() 7 updateBodyStates()
The ODE physics engine support several engine specific properties. These can be tweaked to obtain higher performance or robustness. ODE specific options:
Only used when RobWork contact generation is used (its the default). MaxSepDistance - float - All triangles within a distance MaxSepDistance is used in the contact generation.
object specific:
SoftLayer - float -
example:
* <Property name="StepMethod">WorldStep</Property>
* <Property name="WorldCFM" type="float">0.000001</Property>
* <Property name="WorldERP" type="float">0.2</Property>
* <Property name="MaxIterations" type="int">100</Property>
* <Property name="ContactSurfaceLayer" type="float">0.001</Property>
*
* <Property name="MaxSepDistance" type="float">0.01</Property>
* <Property name="MaxCorrectingVelocity" type="float">0.1</Property>
*