3#include "state_representation/space/joint/JointState.hpp"
4#include "state_representation/space/joint/JointVelocities.hpp"
18 const Eigen::VectorXd& get_positions()
const =
delete;
19 double get_position(
unsigned int joint_index)
const =
delete;
20 double get_position(
const std::string& joint_name)
const =
delete;
21 void set_positions(
const Eigen::VectorXd& positions) =
delete;
22 void set_positions(
const std::vector<double>& positions) =
delete;
23 void set_position(
double position,
unsigned int joint_index)
const =
delete;
24 void set_position(
double position,
const std::string& joint_name)
const =
delete;
25 const Eigen::VectorXd& get_velocities()
const =
delete;
26 double get_velocity(
unsigned int joint_index)
const =
delete;
27 double get_velocity(
const std::string& joint_name)
const =
delete;
28 void set_velocities(
const Eigen::VectorXd& accelerations) =
delete;
29 void set_velocities(
const std::vector<double>& accelerations) =
delete;
30 void set_velocity(
double velocity,
unsigned int joint_index)
const =
delete;
31 void set_velocity(
double velocity,
const std::string& joint_name)
const =
delete;
32 const Eigen::VectorXd& get_torques()
const =
delete;
33 double get_torque(
unsigned int joint_index)
const =
delete;
34 double get_torque(
const std::string& joint_name)
const =
delete;
35 void set_torques(
const Eigen::VectorXd& torques) =
delete;
36 void set_torques(
const std::vector<double>& torques) =
delete;
37 void set_torque(
double torque,
unsigned int joint_index)
const =
delete;
38 void set_torque(
double torque,
const std::string& joint_name)
const =
delete;
50 explicit JointAccelerations(
const std::string& robot_name,
unsigned int nb_joints = 0);
57 explicit JointAccelerations(
const std::string& robot_name,
const std::vector<std::string>& joint_names);
64 explicit JointAccelerations(
const std::string& robot_name,
const Eigen::VectorXd& accelerations);
73 const std::string& robot_name,
const std::vector<std::string>& joint_names,
const Eigen::VectorXd& accelerations
106 static JointAccelerations Zero(
const std::string& robot_name,
const std::vector<std::string>& joint_names);
232 Eigen::VectorXd
data()
const override;
238 virtual void set_data(
const Eigen::VectorXd&
data)
override;
244 virtual void set_data(
const std::vector<double>&
data)
override;
252 void clamp(
double max_absolute_value,
double noise_ratio = 0.);
269 void clamp(
const Eigen::ArrayXd& max_absolute_value_array,
const Eigen::ArrayXd& noise_ratio_array);
279 const Eigen::ArrayXd& max_absolute_value_array,
const Eigen::ArrayXd& noise_ratio_array
Class to define accelerations of the joints.
JointAccelerations copy() const
Return a copy of the JointAccelerations.
JointAccelerations & operator-=(const JointAccelerations &accelerations)
Overload the -= operator.
JointAccelerations()
Empty constructor.
JointAccelerations & operator+=(const JointAccelerations &accelerations)
Overload the += operator.
JointAccelerations operator+(const JointAccelerations &accelerations) const
Overload the + operator.
Eigen::VectorXd data() const override
Returns the accelerations data as an Eigen vector.
JointAccelerations clamped(double max_absolute_value, double noise_ratio=0.) const
Return the acceleration clamped to the values in argument.
JointAccelerations & operator/=(double lambda)
Overload the /= operator with a scalar.
JointAccelerations operator-(const JointAccelerations &accelerations) const
Overload the - operator.
friend JointAccelerations operator*(double lambda, const JointAccelerations &accelerations)
Overload the * operator with a scalar.
virtual void set_data(const Eigen::VectorXd &data) override
Set the accelerations data from an Eigen vector.
static JointAccelerations Zero(const std::string &robot_name, unsigned int nb_joints)
Constructor for the zero JointAccelerations.
void clamp(double max_absolute_value, double noise_ratio=0.)
Clamp inplace the magnitude of the acceleration to the values in argument.
JointAccelerations operator/(double lambda) const
Overload the / operator with a scalar.
JointAccelerations & operator*=(double lambda)
Overload the *= operator with a double gain.
JointAccelerations & operator=(const JointAccelerations &accelerations)=default
Copy assignment operator that have to be defined to the custom assignment operator.
friend std::ostream & operator<<(std::ostream &os, const JointAccelerations &accelerations)
Overload the ostream operator for printing.
static JointAccelerations Random(const std::string &robot_name, unsigned int nb_joints)
Constructor for the random JointAccelerations.
Class to define a state in joint space.
void clamp_state_variable(double max_absolute_value, const JointStateVariable &state_variable_type, double noise_ratio=0)
Clamp inplace the magnitude of the a specific joint state variable.
Class to define velocities of the joints.
Core state variables and objects.