#include <OMJointState.h>
Public Member Functions | |
OMJointState (RcsGraph *graph, const char *jointName, bool wrapJointAngle) | |
OMJointState (RcsGraph *graph, const char *jointName) | |
virtual | ~OMJointState () |
virtual unsigned int | getStateDim () const |
virtual unsigned int | getVelocityDim () const |
virtual void | computeObservation (double *state, double *velocity, const MatNd *currentAction, double dt) const |
virtual void | getLimits (double *minState, double *maxState, double *maxVelocity) const |
virtual std::vector< std::string > | getStateNames () const |
![]() | |
virtual | ~ObservationModel () |
MatNd * | computeObservation (const MatNd *currentAction, double dt) const |
void | computeObservation (MatNd *observation, const MatNd *currentAction, double dt) const |
virtual void | reset () |
virtual std::vector< std::string > | getVelocityNames () const |
virtual void | getMinMax (double *min, double *max) const final |
virtual unsigned int | getDim () const final |
virtual std::vector< std::string > | getNames () const final |
template<typename OM > | |
OM * | findModel () |
template<typename OM > | |
Offsets | findOffsets () |
virtual std::vector< ObservationModel * > | getNested () const |
![]() | |
BoxSpaceProvider () | |
virtual | ~BoxSpaceProvider () |
BoxSpaceProvider (const BoxSpaceProvider &)=delete | |
BoxSpaceProvider & | operator= (const BoxSpaceProvider &)=delete |
BoxSpaceProvider (BoxSpaceProvider &&)=delete | |
BoxSpaceProvider & | operator= (BoxSpaceProvider &&)=delete |
const BoxSpace * | getSpace () const |
Static Public Member Functions | |
static ObservationModel * | observeAllJoints (RcsGraph *graph) |
static ObservationModel * | observeUnconstrainedJoints (RcsGraph *graph) |
Private Member Functions | |
OMJointState (RcsGraph *graph, RcsJoint *joint) | |
Private Attributes | |
RcsGraph * | graph |
RcsJoint * | joint |
bool | wrapJointAngle |
Observes joint positions and velocities for a single joint.
Definition at line 42 of file OMJointState.h.
Rcs::OMJointState::OMJointState | ( | RcsGraph * | graph, |
const char * | jointName, | ||
bool | wrapJointAngle | ||
) |
Constructor
graph | graph to observe |
jointName | name of joint to observe |
wrapJointAngle | whether to wrap the state of a rotational joint into the [-pi, pi] range. Use for unlimited rotation joints. |
Definition at line 54 of file OMJointState.cpp.
Rcs::OMJointState::OMJointState | ( | RcsGraph * | graph, |
const char * | jointName | ||
) |
Constructor Decides to wrap the joint angle if the joint's movement range is exactly [-pi, pi].
graph | graph to observe |
jointName | name of joint to observe |
Definition at line 70 of file OMJointState.cpp.
|
virtual |
Definition at line 82 of file OMJointState.cpp.
|
private |
Definition at line 75 of file OMJointState.cpp.
|
virtual |
Implement to fill the observation vector with the observed values.
[out] | state | state observation vector to fill, has getStateDim() elements. |
[out] | velocity | velocity observation vector to fill, has getVelocityDim() elements. |
[in] | currentAction | action in current step. May be NULL if not available. |
[in] | dt | time step since the last observation has been taken |
Implements Rcs::ObservationModel.
Definition at line 98 of file OMJointState.cpp.
|
virtual |
Provides the minimum and maximum observable values. Since the velocity is symmetric, only the maximum needs to be provided. The default implementation uses -inf and inf.
[out] | minState | minimum state vector to fill, has getStateDim() elements. |
[out] | maxState | maximum state vector to fill, has getStateDim() elements. |
[out] | maxVelocity | maximum velocity vector to fill, has getVelocityDim() elements. |
Reimplemented from Rcs::ObservationModel.
Definition at line 108 of file OMJointState.cpp.
|
virtual |
The number of state variables.
Implements Rcs::ObservationModel.
Definition at line 88 of file OMJointState.cpp.
|
virtual |
Provides names for each state entry.
Reimplemented from Rcs::ObservationModel.
Definition at line 116 of file OMJointState.cpp.
|
virtual |
The number of velocity variables. The default implementation assumes that for each state there is a velocity.
Reimplemented from Rcs::ObservationModel.
Reimplemented in Rcs::OMJointStatePositions.
Definition at line 93 of file OMJointState.cpp.
|
static |
Definition at line 121 of file OMJointState.cpp.
|
static |
Definition at line 130 of file OMJointState.cpp.
|
private |
Definition at line 85 of file OMJointState.h.
|
private |
Definition at line 87 of file OMJointState.h.
|
private |
Definition at line 89 of file OMJointState.h.