3#include "state_representation/State.hpp"
4#include "state_representation/exceptions/IncompatibleSizeException.hpp"
5#include "state_representation/space/joint/JointTorques.hpp"
6#include "state_representation/space/joint/JointVelocities.hpp"
7#include "state_representation/space/cartesian/CartesianTwist.hpp"
8#include "state_representation/space/cartesian/CartesianWrench.hpp"
36 const std::string& robot_name,
unsigned int nb_joints,
const std::string& frame,
37 const std::string& reference_frame =
"world"
48 const std::string& robot_name,
const std::vector<std::string>& joint_names,
const std::string& frame,
49 const std::string& reference_frame =
"world"
60 const std::string& robot_name,
const std::string& frame,
const Eigen::MatrixXd&
data,
61 const std::string& reference_frame =
"world"
73 const std::string& robot_name,
const std::vector<std::string>& joint_names,
const std::string& frame,
74 const Eigen::MatrixXd&
data,
const std::string& reference_frame =
"world"
91 const std::string& robot_name,
unsigned int nb_joints,
const std::string& frame,
92 const std::string& reference_frame =
"world"
104 const std::string& robot_name,
const std::vector<std::string>& joint_names,
const std::string& frame,
105 const std::string& reference_frame =
"world"
125 unsigned int rows()
const;
132 Eigen::VectorXd
row(
unsigned int index)
const;
137 unsigned int cols()
const;
144 Eigen::VectorXd
col(
unsigned int index)
const;
164 const Eigen::MatrixXd&
data()
const;
179 void set_frame(
const std::string& frame);
204 void reset()
override;
212 Eigen::MatrixXd
inverse()
const;
221 Eigen::MatrixXd
inverse(
const Eigen::MatrixXd& matrix)
const;
249 Eigen::MatrixXd
pseudoinverse(
const Eigen::MatrixXd& matrix)
const;
276 Eigen::MatrixXd
operator*(
const Eigen::MatrixXd& matrix)
const;
327 std::vector<std::string> joint_names_;
329 std::string reference_frame_;
330 Eigen::MatrixXd data_;
334 swap(
static_cast<State&
>(jacobian1),
static_cast<State&
>(jacobian2));
335 std::swap(jacobian1.joint_names_, jacobian2.joint_names_);
336 std::swap(jacobian1.frame_, jacobian2.frame_);
337 std::swap(jacobian1.reference_frame_, jacobian2.reference_frame_);
338 std::swap(jacobian1.data_, jacobian2.data_);
Class to define Cartesian pose in Cartesian space as 3D position and quaternion based orientation.
Class to define twist in Cartesian space as 3D linear and angular velocity vectors.
Class to define wrench in Cartesian space as 3D force and torque vectors.
Class to define a robot Jacobian matrix.
friend void swap(Jacobian &jacobian1, Jacobian &jacobian2)
Swap the values of the two Jacobians.
Jacobian copy() const
Return a copy of the Jacobian.
const std::vector< std::string > & get_joint_names() const
Getter of the joint names attribute.
void reset() override
Reset the object to a post-construction state.
Eigen::VectorXd row(unsigned int index) const
Accessor of the row data at given index.
const Eigen::MatrixXd & data() const
Getter of the data attribute.
void set_frame(const std::string &frame)
Setter of the frame.
void set_zero()
Set the Jacobian matrix to a zero value.
Eigen::MatrixXd pseudoinverse() const
Return the pseudoinverse of the Jacobian matrix.
unsigned int cols() const
Getter of the number of columns attribute.
Eigen::MatrixXd transpose() const
Return the transpose of the Jacobian matrix.
const std::string & get_reference_frame() const
Getter of the reference frame attribute.
unsigned int rows() const
Getter of the number of rows attribute.
Eigen::MatrixXd inverse() const
Return the inverse of the Jacobian matrix.
const std::string & get_frame() const
Getter of the frame attribute.
friend Jacobian operator*(const Eigen::Matrix< double, 6, 6 > &matrix, const Jacobian &jacobian)
Overload the * operator with a 6x6 matrix on the left side.
void set_joint_names(unsigned int nb_joints)
Setter of the joint names attribute from the number of joints.
Jacobian & operator=(const Jacobian &jacobian)
Copy assignment operator that has to be defined to the custom assignment operator.
bool is_incompatible(const State &state) const override
Check if the Jacobian is incompatible for operations with the state given as argument.
void set_data(const Eigen::MatrixXd &data) override
Setter of the data attribute.
Jacobian()
Empty constructor for a Jacobian.
void set_reference_frame(const std::string &reference_frame)
Setter of the reference frame.
double & operator()(unsigned int row, unsigned int col)
Overload the () operator in a non const fashion to modify the value at given (row,...
Eigen::VectorXd col(unsigned int index) const
Accessor of the column data at given index.
friend std::ostream & operator<<(std::ostream &os, const Jacobian &jacobian)
Overload the ostream operator for printing.
static Jacobian Random(const std::string &robot_name, unsigned int nb_joints, const std::string &frame, const std::string &reference_frame="world")
Constructor for a random Jacobian.
Class to define torques of the joints.
Class to define velocities of the joints.
Abstract class to represent a state.
Core state variables and objects.
void swap(AnalogIOState &state1, AnalogIOState &state2)