11 #include "gocra/Solvers/OneLevelSolver.h" 20 int main(
int argc,
char** argv)
22 std::cout<<
"SET PARAMETERS\n";
27 gocra::OneLevelSolverWithQuadProg internalSolver;
30 std::cout<<
"INITIALIZE ISIR MODEL, CONTROLLER\n";
36 std::cout<<
"CREATE SOME TASKS\n";
51 ocra::SegmentFrame SF(
"frameTask.SFrame", model,
"Model3T.segment_3", Eigen::Displacementd());
74 MatrixXd param_priority(nt,nt);
77 param_priority<<0,1,0,0;
82 VectorXd q = Eigen::VectorXd::Constant(model.
nbInternalDofs(), 0.1);
88 std::cout<<
"SIMULATE\n";
89 for (
int i=0; i<1000; i++)
93 param_priority(0,1)=0;
94 param_priority(1,0)=1;
108 if (i==1||i==599||i==999)
110 std::cout<<
"- - --- - - - -- - - -- - "<<i<<
"\n";
112 std::cout<<
"pos seg3: "<< model.
getSegmentPosition(3).getTranslation().transpose()<<
"\n";
int getNbActiveTask() const
int nbInternalDofs() const
Classes that represent frames.
void setDamping(double B)
void setJointVelocities(const Eigen::VectorXd &q_dot)
int main(int argc, char **argv)
void set_q(const Eigen::VectorXd &q)
A class hierarchy to compute task errors based on control frames.
void setActiveTaskVector()
gOcra Controller based on LQP solver for the ocra framework.
virtual const Eigen::VectorXd & getGravityTerms() const
void setJointPositions(const Eigen::VectorXd &q)
Used to build positioning tasks.
Define the Generalized Hierarchical Controller based on Jacobian transpose (GHCJT) in quasi-static ca...
void setPosition(const Eigen::Displacementd &H)
Used to build tasks in the manikin configuration space.
A frame attached to a segment of a model.
A generic abstract task for the GHCJT controller.
void setAcceleration(const Eigen::Twistd &gamma)
void setTaskProjectors(Eigen::MatrixXd ¶m)
virtual const Eigen::Displacementd & getSegmentPosition(int index) const
void setVelocity(const Eigen::Twistd &T)
void setWeight(double weight)
void setStiffness(double K)
virtual const Eigen::MatrixXd & getInertiaMatrixInverse() const
virtual const Eigen::VectorXd & getNonLinearTerms() const
void computeOutput(Eigen::VectorXd &tau)
Computation of output torques based on the tasks added to the controller.
void addTask(std::shared_ptr< Task > task)
void activateAsObjective()
GHCJTTask & createGHCJTTask(const std::string &name, Feature::Ptr feature, Feature::Ptr featureDes) const
Represents a 'target', i.e. something that does not depend on a model but must match with another fra...
virtual const Eigen::VectorXd & getLinearTerms() const
Some enumerations for the control.