32 #include "../action/ActionModelIK.h" 33 #include "../util/eigen_matnd.h" 35 #include <ControllerBase.h> 36 #include <Rcs_typedef.h> 37 #include <Rcs_macros.h> 38 #include <Rcs_VecNd.h> 47 actionModel(actionModel),
48 maxDistance(std::numeric_limits<double>::infinity())
51 RCHECK_MSG(amik,
"AMDynamicalSystemActivation must wrap an AMIKGeneric");
54 for (
auto tsk : amik->getController()->getTasks()) {
75 double* state,
double* velocity,
const MatNd* currentAction,
double dt)
const 78 Eigen::VectorXd x_curr = Eigen::VectorXd::Zero(
controller->getTaskDim());
84 for (
size_t i = 0; i < tasks.size(); ++i) {
86 double dist = tasks[i]->goalDistance(x_curr);
91 std::cout <<
"goal distance pos of task " << i << std::endl << state[i] << std::endl;
104 std::vector<std::string> result;
107 std::ostringstream os;
109 result.push_back(os.str());
virtual ~OMDynamicalSystemGoalDistance()
virtual std::vector< std::string > getStateNames() const
AMDynamicalSystemActivation * actionModel
Task activation action model, provides the tasks (not owned)
virtual void computeObservation(double *state, double *velocity, const MatNd *currentAction, double dt) const
virtual unsigned int getDim() const
Get the number of DS, i.e. entries in the dynamicalSystems vector, owned by the action model...
virtual unsigned int getVelocityDim() const
virtual void getLimits(double *minState, double *maxState, double *maxVelocity) const
double maxDistance
Limits.
virtual ActionModel * getWrappedActionModel() const
ControllerBase * controller
Controller to extract the task space state.
const std::vector< DynamicalSystem * > & getDynamicalSystems() const
Get a vector of the owned dynamical systems.
MatNd viewEigen2MatNd(M &src)
virtual unsigned int getStateDim() const
OMDynamicalSystemGoalDistance(AMDynamicalSystemActivation *actionModel)