15#include <eigen3/Eigen/Dense>
16#include <unordered_map>
22typedef std::pair<std::string, Eigen::TransformationMatrix>
IndexedTMat;
61 ArmModel(
const std::string
id)
noexcept(
false);
150 virtual Eigen::MatrixXd
Jacobian(
const std::string& frameID)
noexcept(
false);
207 auto ID() const -> const std::
string& {
return id_; }
212 auto ID() -> std::string& {
return id_; }
Arm Model class for serial kinematic chains (manipulators).
Definition ArmModel.h:55
std::vector< unsigned int > movingJoints_
vector containing the indexes of the moving joints
Definition ArmModel.h:292
virtual void JointsVelocity(const Eigen::VectorXd qdot) noexcept(false)
Set the moving joints velocity.
unsigned int movingNumJoints_
moving joints number
Definition ArmModel.h:291
void AddFixedLink(const Eigen::TransformationMatrix &baseTransf)
Adds a fixed link to the kinematic chain of the model.
auto ID() const -> const std::string &
Method returning the arm id.
Definition ArmModel.h:207
Eigen::VectorXd q_ddot_moving_
Definition ArmModel.h:302
auto ControlVector() const -> const Eigen::VectorXd &
Method returning the arm control vector.
Definition ArmModel.h:181
void ControlVector(const Eigen::VectorXd controlRef) noexcept(false)
Method setting the arm control vector.
Eigen::MatrixXd EvaluateBase2JointJacobian(unsigned int jointIndex)
Evaluates the jacobian matrix (w.r.t. robot base) of the specified joint.
std::string GetEndEffectorFrameID() const noexcept
Method returning the end-effector frame ID.
virtual ~ArmModel()
Default destructor.
virtual void JointsPosition(const Eigen::VectorXd q) noexcept(false)
Set the joint position.
double Manipulability(const std::string &frameID)
Method returning the arm manipulability.
std::vector< std::string > GetRigidBodyFrameIDs() const noexcept
Method returning the list of rigid body frame IDs.
std::string id_
arm id
Definition ArmModel.h:314
Eigen::TransformationMatrix Tz_
transformation matrix for rotation or prismatic joint
Definition ArmModel.h:307
std::unordered_map< std::string, IndexedTMat > rigidBodyFrames_
Definition ArmModel.h:294
void EvaluateTotalForwardGeometry()
Method evaluating the total forward geometry for the arm.
std::vector< std::string > GetJacobianFrameIDs() const noexcept
Method returning the list of Jacobian frame IDs.
auto IsModelInitialized() const -> bool
Method returning true if the model is initialized false otherwise.
Definition ArmModel.h:176
ArmModel(const std::string id) noexcept(false)
Default constructor.
bool modelInitialized_
boolean stating whether the model is initialized
Definition ArmModel.h:288
std::vector< RobotLink > links_
vector of the arm links
Definition ArmModel.h:293
Eigen::TransformationMatrix TransformationMatrix(const std::string &frameID) noexcept(false)
Method returning the transformation matrix related to the input frameID wrt to the arm base.
virtual Eigen::MatrixXd Jacobian(const std::string &frameID) noexcept(false)
Method returning the jacobian related to the input frameID wrt to the arm base.
Eigen::VectorXd q_total_
Definition ArmModel.h:299
std::unordered_map< std::string, Eigen::MatrixXd > dexterityJacobians_
map of the manipulability jacobians
Definition ArmModel.h:315
bool modelReadFromFile_
boolean stating whether the model is read from file
Definition ArmModel.h:313
Eigen::TransformationMatrix EvaluateRigidBodyTransf(const std::string &frameID)
Method returning the attached body frame wrt to the arm base.
std::unordered_map< std::string, double > manipulability_
map of the manipulability values
Definition ArmModel.h:298
Eigen::VectorXd q_dot_moving_
Definition ArmModel.h:301
Eigen::TransformationMatrix TransformationMatrix(const std::string &frameID_j, const std::string &frameID_k)
Method returing a transformation matrix from frameID_j to frameID_k, i.e. jTk.
std::vector< Eigen::TransformationMatrix > baseTei_
Definition ArmModel.h:304
std::unordered_map< std::string, Eigen::MatrixXd > jacobians_
Definition ArmModel.h:295
void AddJointLink(JointType type, const Eigen::Vector3d &axis, const Eigen::TransformationMatrix &baseTransf, double jointLimMin, double jointLimMax)
Adds a link to the kinematic chain of the model.
std::unordered_map< std::string, Eigen::MatrixXd > manipulabilityJacobians_
map of the manipulability jacobians
Definition ArmModel.h:297
virtual Eigen::MatrixXd EvaluateManipulability(const std::string &frameID)
Evaluates the manipulability measure and its Jacobian This method returns the manipulability measure ...
Eigen::VectorXd q_moving_
Definition ArmModel.h:300
std::vector< Eigen::MatrixXd > dJdq_
dJdq evaluated numerically
Definition ArmModel.h:310
Eigen::MatrixXd Jdjdq_
jacobian * djdq
Definition ArmModel.h:317
void AttachRigidBodyFrame(std::string frameID, std::string attachedFrameID, Eigen::TransformationMatrix attachedFrameID_T_frameID) noexcept(false)
Method adding a rigid body frame to a joint.
RobotLink & Link(int jointIndex) noexcept(false)
Method returning the arm link.
auto dJdq() const -> const std::vector< Eigen::MatrixXd > &
Method returning dJdq evaluated numerically.
Definition ArmModel.h:166
virtual void EvaluatedJdqNumeric()
Evaluates numerically the Jacobian derivative w.r.t. joint variations.
virtual Eigen::MatrixXd EvaluateDexterity(const std::string &frameID)
Evaluates the dexterity measure and its Jacobian This method returns the dexterity measure and its Ja...
bool isMapInitialized_
boolean stating whether the transformation and jacobian maps are initialized
Definition ArmModel.h:289
Eigen::VectorXd controlRef_
Definition ArmModel.h:303
Eigen::MatrixXd djdqJpinv_
djdq * jacobian pseudoinverse
Definition ArmModel.h:311
Eigen::Vector3d base_ki_
Definition ArmModel.h:308
void BackwardDirectGeometry(unsigned int jointNumber, unsigned int endEffectorIndex)
Backward Direct Geometry from the input joint number to the input end effector index.
void JointsAcceleration(const Eigen::VectorXd qddot) noexcept(false)
Set the moving joints acceleration.
void ForwardDirectGeometry(unsigned int jointNumber)
Method performing the forward direct geometry untill the input joint number.
virtual auto NumJoints() const -> unsigned int
Method returning the arm number of moving joints.
Definition ArmModel.h:161
std::vector< Eigen::TransformationMatrix > biTei_
Definition ArmModel.h:305
Eigen::MatrixXd ManipulabilityJacobian(const std::string &frameID)
Method returning the manipulability jacobian related to the input frameID wrt to the arm base.
virtual auto JointsPosition() const -> const Eigen::VectorXd &
Get the moving joint position.
Definition ArmModel.h:95
auto JointsAcceleration() const -> const Eigen::VectorXd &
Get moving joints acceleration.
Definition ArmModel.h:115
Eigen::TransformationMatrix baseTbi_
Definition ArmModel.h:306
std::vector< std::string > GetJointFrameIDs() const noexcept
Method returning the list of joint frame IDs.
std::unordered_map< std::string, double > dexterity_
map of the manipulability values
Definition ArmModel.h:316
auto ID() -> std::string &
Method setting the arm id.
Definition ArmModel.h:212
Eigen::MatrixXd DexterityJacobian(const std::string &frameID)
Method returning the dexterity jacobian related to the input frameID wrt to the arm base.
double Dexterity(const std::string &frameID)
Method returning the arm dexterity.
virtual auto JointsVelocity() const -> const Eigen::VectorXd &
Get the moving joints velocity.
Definition ArmModel.h:105
Eigen::MatrixXd EvaluateRigidBodyJacobian(const std::string &frameID)
Method returning the attached body frame jacobian wrt to the arm base.
std::vector< Eigen::Vector6d > h_
Definition ArmModel.h:309
std::unordered_map< std::string, Eigen::TransformationMatrix > transformation_
Definition ArmModel.h:296
Eigen::MatrixXd Jpinvdjpinvdq_
jacobian pseudoinverse * djpinvdq
Definition ArmModel.h:318
Eigen::RotationMatrix I3_
identity matrix
Definition ArmModel.h:312
unsigned int totalNumJoints_
Definition ArmModel.h:290
Basic element of an ArmModel.
Definition RobotLink.h:55
This namespace is used to extend the Eigen Dense library functionalities.
Definition RotMatrix.h:13
Types and algorithms for robotic mobile manipulation.
Definition ArmModel.h:19
JointType
Used to describe the type of joint.
Definition RobotLink.h:21
std::pair< std::string, Eigen::TransformationMatrix > IndexedTMat
Definition ArmModel.h:22