#include <World.h>
Classes | |
struct | BodyInfo |
struct | LinkPairKey |
Public Member Functions | |
int | addBody (BodyPtr body) |
add body to this world More... | |
BodyPtr | body (int index) |
get body by index More... | |
BodyPtr | body (const std::string &name) |
get body by name More... | |
int | bodyIndex (const std::string &name) |
get index of body by name More... | |
virtual void | calcNextState () |
compute forward dynamics and update current state More... | |
void | clearBodies () |
clear bodies in this world More... | |
void | clearCollisionPairs () |
clear collision pairs More... | |
double | currentTime (void) const |
get current time More... | |
void | enableSensors (bool on) |
enable/disable sensor simulation More... | |
ForwardDynamicsPtr | forwardDynamics (int index) |
get forward dynamics computation method for body More... | |
const Vector3 & | getGravityAcceleration () |
get gravity acceleration More... | |
std::pair< int, bool > | getIndexOfLinkPairs (Link *link1, Link *link2) |
get index of link pairs More... | |
virtual void | initialize () |
initialize this world. This must be called after all bodies are registered. More... | |
unsigned int | numBodies () |
get the number of bodies in this world More... | |
void | setCurrentTime (double tm) |
set current time More... | |
void | setEulerMethod () |
choose euler method for integration More... | |
void | setGravityAcceleration (const Vector3 &g) |
set gravity acceleration More... | |
void | setRungeKuttaMethod () |
choose runge-kutta method for integration More... | |
void | setTimeStep (double dt) |
set time step More... | |
double | timeStep (void) const |
get time step More... | |
WorldBase () | |
virtual | ~WorldBase () |
Protected Attributes | |
std::vector< BodyInfo > | bodyInfoArray |
double | currentTime_ |
bool | sensorsAreEnabled |
double | timeStep_ |
Private Types | |
typedef std::map< BodyPtr, int > | BodyToIndexMap |
typedef std::map< LinkPairKey, int > | LinkPairKeyToIndexMap |
typedef std::map< std::string, int > | NameToIndexMap |
Private Member Functions | |
void | updateRangeSensor (RangeSensor *sensor) |
void | updateRangeSensors () |
Private Attributes | |
BodyToIndexMap | bodyToIndexMap |
Vector3 | g |
bool | isEulerMethod |
LinkPairKeyToIndexMap | linkPairKeyToIndexMap |
NameToIndexMap | nameToBodyIndexMap |
int | numRegisteredLinkPairs |
Definition at line 34 of file hrplib/hrpModel/World.h.
|
private |
Definition at line 185 of file hrplib/hrpModel/World.h.
|
private |
Definition at line 193 of file hrplib/hrpModel/World.h.
|
private |
Definition at line 182 of file hrplib/hrpModel/World.h.
WorldBase::WorldBase | ( | ) |
Definition at line 30 of file hrplib/hrpModel/World.cpp.
|
virtual |
Definition at line 43 of file hrplib/hrpModel/World.cpp.
add body to this world
body |
Definition at line 153 of file hrplib/hrpModel/World.cpp.
get body by index
index | of the body |
Definition at line 56 of file hrplib/hrpModel/World.cpp.
get body by name
name | of the body |
Definition at line 65 of file hrplib/hrpModel/World.cpp.
get index of body by name
name | of the body |
Definition at line 49 of file hrplib/hrpModel/World.cpp.
|
virtual |
compute forward dynamics and update current state
Definition at line 135 of file hrplib/hrpModel/World.cpp.
void WorldBase::clearBodies | ( | ) |
clear bodies in this world
Definition at line 166 of file hrplib/hrpModel/World.cpp.
void WorldBase::clearCollisionPairs | ( | ) |
clear collision pairs
Definition at line 173 of file hrplib/hrpModel/World.cpp.
|
inline |
void WorldBase::enableSensors | ( | bool | on | ) |
enable/disable sensor simulation
on | true to enable, false to disable |
Definition at line 93 of file hrplib/hrpModel/World.cpp.
|
inline |
get forward dynamics computation method for body
index | index of the body |
Definition at line 65 of file hrplib/hrpModel/World.h.
get gravity acceleration
Definition at line 128 of file hrplib/hrpModel/World.h.
get index of link pairs
link1 | link1 |
link2 | link2 |
Definition at line 192 of file hrplib/hrpModel/World.cpp.
initialize this world. This must be called after all bodies are registered.
Reimplemented in hrp::World< TConstraintForceSolver >, hrp::World< hrp::ConstraintForceSolver >, and ODE_World.
Definition at line 99 of file hrplib/hrpModel/World.cpp.
|
inline |
get the number of bodies in this world
Definition at line 44 of file hrplib/hrpModel/World.h.
void WorldBase::setCurrentTime | ( | double | tm | ) |
set current time
tm | current time[s] |
Definition at line 81 of file hrplib/hrpModel/World.cpp.
void WorldBase::setEulerMethod | ( | ) |
choose euler method for integration
Definition at line 180 of file hrplib/hrpModel/World.cpp.
set gravity acceleration
g | gravity acceleration[m/s^2] |
Definition at line 87 of file hrplib/hrpModel/World.cpp.
void WorldBase::setRungeKuttaMethod | ( | ) |
choose runge-kutta method for integration
Definition at line 186 of file hrplib/hrpModel/World.cpp.
void WorldBase::setTimeStep | ( | double | dt | ) |
|
inline |
|
private |
Definition at line 248 of file hrplib/hrpModel/World.cpp.
|
private |
Definition at line 234 of file hrplib/hrpModel/World.cpp.
|
protected |
Definition at line 174 of file hrplib/hrpModel/World.h.
|
private |
Definition at line 186 of file hrplib/hrpModel/World.h.
|
protected |
Definition at line 167 of file hrplib/hrpModel/World.h.
|
private |
Definition at line 198 of file hrplib/hrpModel/World.h.
|
private |
Definition at line 200 of file hrplib/hrpModel/World.h.
|
private |
Definition at line 194 of file hrplib/hrpModel/World.h.
|
private |
Definition at line 183 of file hrplib/hrpModel/World.h.
|
private |
Definition at line 196 of file hrplib/hrpModel/World.h.
|
protected |
Definition at line 176 of file hrplib/hrpModel/World.h.
|
protected |
Definition at line 168 of file hrplib/hrpModel/World.h.