3#include "state_representation/space/cartesian/CartesianState.hpp"
4#include "state_representation/space/cartesian/CartesianPose.hpp"
5#include "state_representation/space/cartesian/CartesianAcceleration.hpp"
9class CartesianAcceleration;
21 const Eigen::Vector3d& get_position()
const =
delete;
22 const Eigen::Quaterniond& get_orientation()
const =
delete;
23 Eigen::Vector4d get_orientation_coefficients()
const =
delete;
24 Eigen::Matrix<double, 7, 1> get_pose()
const =
delete;
25 Eigen::Matrix4d get_transformation_matrix()
const =
delete;
26 const Eigen::Vector3d& get_linear_acceleration()
const =
delete;
27 const Eigen::Vector3d& get_angular_acceleration()
const =
delete;
28 Eigen::Matrix<double, 6, 1> get_acceleration()
const =
delete;
29 const Eigen::Vector3d& get_force()
const =
delete;
30 const Eigen::Vector3d& get_torque()
const =
delete;
31 Eigen::Matrix<double, 6, 1> get_wrench()
const =
delete;
32 void set_position(
const Eigen::Vector3d& position) =
delete;
33 void set_position(
const std::vector<double>& position) =
delete;
34 void set_position(
const double& x,
const double& y,
const double& z) =
delete;
35 void set_orientation(
const Eigen::Quaterniond& orientation) =
delete;
36 void set_orientation(
const Eigen::Vector4d& orientation) =
delete;
37 void set_orientation(
const std::vector<double>& orientation) =
delete;
38 void set_orientation(
const double& w,
const double& x,
const double& y,
const double& z) =
delete;
39 void set_pose(
const Eigen::Vector3d& position,
const Eigen::Quaterniond& orientation) =
delete;
40 void set_pose(
const Eigen::Matrix<double, 7, 1>& pose) =
delete;
41 void set_pose(
const std::vector<double>& pose) =
delete;
42 void set_linear_acceleration(
const Eigen::Vector3d& linear_acceleration) =
delete;
43 void set_linear_acceleration(
const std::vector<double>& linear_acceleration) =
delete;
44 void set_linear_acceleration(
const double& x,
const double& y,
const double& z) =
delete;
45 void set_angular_acceleration(
const Eigen::Vector3d& angular_acceleration) =
delete;
46 void set_angular_acceleration(
const std::vector<double>& angular_acceleration) =
delete;
47 void set_angular_acceleration(
const double& x,
const double& y,
const double& z) =
delete;
48 void set_acceleration(
const Eigen::Matrix<double, 6, 1>& acceleration) =
delete;
49 void set_acceleration(
const std::vector<double>& acceleration) =
delete;
50 void set_force(
const Eigen::Vector3d& force) =
delete;
51 void set_force(
const std::vector<double>& force) =
delete;
52 void set_force(
const double& x,
const double& y,
const double& z) =
delete;
53 void set_torque(
const Eigen::Vector3d& torque) =
delete;
54 void set_torque(
const std::vector<double>& torque) =
delete;
55 void set_torque(
const double& x,
const double& y,
const double& z) =
delete;
56 void set_wrench(
const Eigen::Matrix<double, 6, 1>& wrench) =
delete;
57 void set_wrench(
const std::vector<double>& wrench) =
delete;
72 explicit CartesianTwist(
const std::string& name,
const std::string& reference =
"world");
98 const std::string& name,
const Eigen::Vector3d& linear_velocity,
const std::string& reference =
"world"
105 const std::string& name,
const Eigen::Vector3d& linear_velocity,
const Eigen::Vector3d& angular_velocity,
106 const std::string& reference =
"world"
113 const std::string& name,
const Eigen::Matrix<double, 6, 1>& twist,
const std::string& reference =
"world"
122 static CartesianTwist Zero(
const std::string& name,
const std::string& reference =
"world");
200 CartesianTwist& operator*=(
const Eigen::Matrix<double, 6, 6>& lambda);
225 void clamp(
double max_linear,
double max_angular,
double linear_noise_ratio = 0,
double angular_noise_ratio = 0);
238 double max_linear,
double max_angular,
double noise_ratio = 0,
double angular_noise_ratio = 0
251 Eigen::VectorXd
data()
const override;
263 void set_data(
const std::vector<double>&
data)
override;
277 norms(
const CartesianStateVariable& state_variable_type = CartesianStateVariable::TWIST)
const override;
Class to define acceleration in cartesian space as 3D linear and angular acceleration vectors.
Class to define CartesianPose in cartesian space as 3D position and quaternion based orientation.
Class to represent a state in Cartesian space.
virtual std::vector< double > norms(const CartesianStateVariable &state_variable_type=CartesianStateVariable::ALL) const
Compute the norms of the state variable specified by the input type (default is full state)
CartesianState normalized(const CartesianStateVariable &state_variable_type=CartesianStateVariable::ALL) const
Compute the normalized state at the state variable given in argument (default is full state)
void clamp_state_variable(double max_norm, const CartesianStateVariable &state_variable_type, double noise_ratio=0)
Clamp inplace the norm of the a specific state variable.
Class to define twist in cartesian space as 3D linear and angular velocity vectors.
friend CartesianTwist operator*(const CartesianState &state, const CartesianTwist &twist)
Overload the * operator with a CartesianState.
CartesianTwist & operator+=(const CartesianTwist &twist)
Overload the += operator.
CartesianTwist operator-(const CartesianTwist &twist) const
Overload the - operator with a twist.
friend std::ostream & operator<<(std::ostream &os, const CartesianTwist &twist)
Overload the ostream operator for printing.
std::vector< double > norms(const CartesianStateVariable &state_variable_type=CartesianStateVariable::TWIST) const override
Compute the norms of the state variable specified by the input type (default is full twist)
Eigen::VectorXd data() const override
Returns the twist data as an Eigen vector.
CartesianTwist clamped(double max_linear, double max_angular, double noise_ratio=0, double angular_noise_ratio=0) const
Return the clamped twist.
static CartesianTwist Random(const std::string &name, const std::string &reference="world")
Constructor for a random twist.
CartesianTwist & operator-=(const CartesianTwist &twist)
Overload the -= operator.
static CartesianTwist Zero(const std::string &name, const std::string &reference="world")
Constructor for the zero twist.
void set_data(const Eigen::VectorXd &data) override
Set the twist data from an Eigen vector.
void clamp(double max_linear, double max_angular, double linear_noise_ratio=0, double angular_noise_ratio=0)
Clamp inplace the magnitude of the twist to the values in argument.
CartesianTwist operator+(const CartesianTwist &twist) const
Overload the + operator with a twist.
CartesianTwist copy() const
Return a copy of the CartesianTwist.
CartesianTwist()
Empty constructor.
CartesianTwist normalized(const CartesianStateVariable &state_variable_type=CartesianStateVariable::TWIST) const
Compute the normalized twist at the state variable given in argument (default is full twist)
CartesianTwist operator/(double lambda) const
Overload the / operator with a scalar.
CartesianTwist inverse() const
Compute the inverse of the current CartesianTwist.
CartesianTwist & operator=(const CartesianTwist &twist)=default
Copy assignment operator that have to be defined to the custom assignment operator.
CartesianTwist & operator/=(double lambda)
Overload the /= operator with a scalar.
Core state variables and objects.