26 #include "Qontrol/Utils/Log.hpp"
27 #include "Qontrol/Utils/Exception.hpp"
28 #include <Eigen/Dense>
29 #include "Qontrol/Problem/ReferenceFrame.hpp"
38 Eigen::VectorXd joint_position;
39 Eigen::VectorXd joint_velocity;
40 Eigen::VectorXd joint_acceleration;
41 Eigen::VectorXd joint_torque;
42 Eigen::VectorXd external_joint_torque;
46 joint_position.resize(size);
47 joint_velocity.resize(size);
48 joint_acceleration.resize(size);
49 joint_torque.resize(size);
50 external_joint_torque.resize(size);
68 std::string robot_name_;
258 virtual auto getJointGravityTorques() -> Eigen::VectorXd = 0;
269 virtual auto getJointFrictionAndDamping() -> Eigen::VectorXd = 0;
280 void setVelocityGain(Eigen::VectorXd v);
282 auto getVelocityGain() -> Eigen::VectorXd;
284 auto getVelocityGainDiag() -> Eigen::MatrixXd;
286 auto getVelocityGainDiagInv() -> Eigen::MatrixXd;
321 -> Eigen::Isometry3d = 0;
335 virtual auto getJacobian(
const std::string &body_name) -> Eigen::MatrixXd = 0;
342 virtual auto getJacobian(
const std::string &body_name,
343 const Eigen::Isometry3d &frame)
344 -> Eigen::MatrixXd = 0;
346 virtual auto getJacobian(
const std::string &body_name, ReferenceFrame ref_frame)
347 -> Eigen::MatrixXd = 0;
356 -> Eigen::VectorXd = 0;
365 const Eigen::Isometry3d &frame)
366 -> Eigen::VectorXd = 0;
369 -> Eigen::VectorXd = 0;
378 -> Eigen::Matrix<double, 6, 1> = 0;
387 const Eigen::Isometry3d &frame)
388 -> Eigen::Matrix<double, 6, 1> = 0;
397 virtual auto getJointAccelerationFromTorques(Eigen::VectorXd torque) -> Eigen::VectorXd = 0;
408 -> Eigen::Matrix<double, 6, 1> = 0;
419 const Eigen::Isometry3d &frame)
420 -> Eigen::Matrix<double, 6, 1> = 0;
430 -> Eigen::Matrix<double, 6, 1> = 0;
440 const Eigen::Isometry3d &frame)
441 -> Eigen::Matrix<double, 6, 1> = 0;
453 -> Eigen::Matrix<double, 6, 1> = 0;
456 const Eigen::Isometry3d &frame)
457 -> Eigen::Matrix<double, 6, 1> = 0;
465 static auto skew(Eigen::Vector3d vector) -> Eigen::Matrix3d;
467 auto integrate(Eigen::VectorXd q, Eigen::VectorXd v,
double dt) -> Eigen::VectorXd;
470 Eigen::VectorXd lower_joint_position_limits;
471 Eigen::VectorXd upper_joint_position_limits;
472 Eigen::VectorXd joint_velocity_limits;
473 Eigen::VectorXd joint_torque_limits;
475 Eigen::VectorXd velocity_gains;
476 Eigen::MatrixXd velocity_gains_diag;
477 Eigen::MatrixXd velocity_gains_diag_inv;
487 template <ModelImpl model_lib>
virtual auto getJointVelocity() -> Eigen::VectorXd
Get the robot current joint velocity.
Definition: GenericModel.cpp:57
void setLowerJointPositionLimits(Eigen::VectorXd lim)
Set the robot lower joint position limits.
Definition: GenericModel.cpp:32
virtual auto getLowerJointPositionLimits() -> Eigen::VectorXd
Get the robot lower joint position limits.
Definition: GenericModel.cpp:42
virtual auto getTipFramePose() -> Eigen::Isometry3d=0
Get the pose of the tip frame wrt. the root frame.
virtual auto getRootFrameName() -> std::string=0
Get the name of the root frame in the model.
Robot state.
Definition: GenericModel.hpp:35
virtual auto getJacobianTimeDerivativeQdot(const std::string &body_name) -> Eigen::VectorXd=0
Get the vector representing the terme in the equation .
void setUpperJointPositionLimits(Eigen::VectorXd lim)
Set the robot upper joint position limits.
Definition: GenericModel.cpp:37
virtual void setJointAcceleration(Eigen::VectorXd joint_acceleration)
Set the robot current joint acceleration.
Definition: GenericModel.cpp:72
virtual auto getFramePose(const std::string &body_name) -> Eigen::Isometry3d=0
Get the pose of the frame called in the URDF wrt. the root frame.
virtual void setJointPosition(Eigen::VectorXd joint_position)
Set the robot current joint position.
Definition: GenericModel.cpp:21
void setJointVelocityLimits(Eigen::VectorXd lim)
Set the robot joint velocity limts.
Definition: GenericModel.cpp:62
auto getJointTorqueLimits() -> Eigen::VectorXd
Get the robot joint torque limits.
Definition: GenericModel.cpp:98
virtual auto getJacobian(const std::string &body_name) -> Eigen::MatrixXd=0
Get the Jacobian matrix expressed at the frame name in the URDF wrt. the root frame.
virtual auto getNrOfDegreesOfFreedom() -> int=0
Get the robot number of degrees of freedom.
static auto skew(Eigen::Vector3d vector) -> Eigen::Matrix3d
compute the skew symetry matrix of a vector. Usefull to perform cross products
Definition: GenericModel.cpp:139
virtual auto getFrameAccelerationFromJointAcceleration(const std::string &body_name) -> Eigen::Matrix< double, 6, 1 >=0
Get the acceleration of the frame named in the URDF wrt. the root frame given the robot current join...
virtual auto getTipFrameVelocity() -> Eigen::Matrix< double, 6, 1 >=0
The twist representing the velocity of the tip frame wrt. the root frame.
virtual auto getInverseJointInertiaMatrix() -> Eigen::MatrixXd=0
Get the matrix representing the inverse of the joint space inertia matrix associated to the term in ...
void setJointTorqueLimits(Eigen::VectorXd lim)
Set the robot joint torque limits.
Definition: GenericModel.cpp:93
void setRobotState(const RobotState &robot_state)
Load the robot model given a urdf path.
Definition: GenericModel.cpp:10
virtual void setJointTorque(Eigen::VectorXd joint_torque)
Set the robot current joint torque.
Definition: GenericModel.cpp:83
virtual auto getJointInertiaMatrix() -> Eigen::MatrixXd=0
Get the matrix representing the joint space inertia matrix associated to the term in the equation of...
virtual void setExternalJointTorque(Eigen::VectorXd external_joint_torque)
Set the robot current external joint torque.
Definition: GenericModel.cpp:104
virtual auto getJointAcceleration() -> Eigen::VectorXd
Get the robot current joint acceleration.
Definition: GenericModel.cpp:77
auto getJointVelocityLimits() -> Eigen::VectorXd
Get the robot joint velocity limts.
Definition: GenericModel.cpp:67
virtual auto getJointPosition() -> Eigen::VectorXd
get the robot current joint position
Definition: GenericModel.cpp:26
virtual void setJointVelocity(Eigen::VectorXd joint_velocity)
Set the robot current joint velocity.
Definition: GenericModel.cpp:52
virtual auto getTipFrameName() -> std::string=0
Get the name of the tip frame in the model.
virtual auto getExternalJointTorque() -> Eigen::VectorXd
Get the robot current external joint torque.
Definition: GenericModel.cpp:133
auto getRobotState() -> RobotState
Get the robot state (position, velocity, acceleration, and external torque)
Definition: GenericModel.cpp:15
virtual auto getUpperJointPositionLimits() -> Eigen::VectorXd
Get the robot upper joint position limits.
Definition: GenericModel.cpp:47
Decalaration of a template specialization for the model library.
Definition: GenericModel.hpp:488
virtual auto getExternalWrench(const std::string &body_name) -> Eigen::Matrix< double, 6, 1 >=0
Get the external wrench applied on the named in the URDF wrt. the root frame given the external join...
virtual auto getFrameAccelerationFromTorques(const std::string &body_name) -> Eigen::Matrix< double, 6, 1 >=0
Get the acceleration of the frame named in the URDF wrt. the root frame given the robot current join...
virtual auto getFrameVelocity(const std::string &body_name) -> Eigen::Matrix< double, 6, 1 >=0
Get the twist representing the velocity of the frame named in the URDF wrt. the root frame.
virtual auto getJointTorque() -> Eigen::VectorXd
Get the robot current joint torque.
Definition: GenericModel.cpp:88
virtual auto getJointCoriolisTorques() -> Eigen::VectorXd=0
Get the vector representing the gravity effect associated to the term in the equation of motion: ....
A virtual implementation of a model base library.
Definition: GenericModel.hpp:65