Control Libraries 7.4.0
|
Class to define a state in joint space. More...
#include <JointState.hpp>
Public Member Functions | |
JointState () | |
Empty constructor for a joint state. | |
JointState (const std::string &robot_name, unsigned int nb_joints=0) | |
Constructor with name and number of joints provided. | |
JointState (const std::string &robot_name, const std::vector< std::string > &joint_names) | |
Constructor with name and list of joint names provided. | |
JointState (const JointState &state) | |
Copy constructor of a joint state. | |
JointState & | operator= (const JointState &state) |
Copy assignment operator that has to be defined to the custom assignment operator. | |
unsigned int | get_size () const |
Getter of the size from the attributes. | |
const std::vector< std::string > & | get_names () const |
Getter of the names attribute. | |
unsigned int | get_joint_index (const std::string &joint_name) const |
Get joint index by the name of the joint, if it exists. | |
const Eigen::VectorXd & | get_positions () const |
Getter of the positions attribute. | |
double | get_position (const std::string &joint_name) const |
Get the position of a joint by its name, if it exists. | |
double | get_position (unsigned int joint_index) const |
Get the position of a joint by its index, if it exists. | |
const Eigen::VectorXd & | get_velocities () const |
Getter of the velocities attribute. | |
double | get_velocity (const std::string &joint_name) const |
Get the velocity of a joint by its name, if it exists. | |
double | get_velocity (unsigned int joint_index) const |
Get the velocity of a joint by its index, if it exists. | |
const Eigen::VectorXd & | get_accelerations () const |
Getter of the accelerations attribute. | |
double | get_acceleration (const std::string &joint_name) const |
Get the acceleration of a joint by its name, if it exists. | |
double | get_acceleration (unsigned int joint_index) const |
Get the acceleration of a joint by its index, if it exists. | |
const Eigen::VectorXd & | get_torques () const |
Getter of the torques attribute. | |
double | get_torque (const std::string &joint_name) const |
Get the torque of a joint by its name, if it exists. | |
double | get_torque (unsigned int joint_index) const |
Get the torque of a joint by its index, if it exists. | |
virtual Eigen::VectorXd | data () const |
Returns the data as the concatenation of all the state variables in a single vector. | |
Eigen::ArrayXd | array () const |
Returns the data vector as an Eigen array. | |
void | set_names (unsigned int nb_joints) |
Setter of the names attribute from the number of joints. | |
void | set_names (const std::vector< std::string > &names) |
Setter of the names attribute. | |
void | set_positions (const Eigen::VectorXd &positions) |
Setter of the positions attribute. | |
void | set_positions (const std::vector< double > &positions) |
Setter of the positions from std vector. | |
void | set_position (double position, const std::string &joint_name) |
Set the position of a joint by its name. | |
void | set_position (double position, unsigned int joint_index) |
Set the position of a joint by its index. | |
void | set_velocities (const Eigen::VectorXd &velocities) |
Setter of the velocities attribute. | |
void | set_velocities (const std::vector< double > &velocities) |
Setter of the velocities from std vector. | |
void | set_velocity (double velocity, const std::string &joint_name) |
Set the velocity of a joint by its name. | |
void | set_velocity (double velocity, unsigned int joint_index) |
Set the velocity of a joint by its index. | |
void | set_accelerations (const Eigen::VectorXd &accelerations) |
Setter of the accelerations attribute. | |
void | set_accelerations (const std::vector< double > &accelerations) |
Setter of the accelerations from std vector. | |
void | set_acceleration (double acceleration, const std::string &joint_name) |
Set the acceleration of a joint by its name. | |
void | set_acceleration (double acceleration, unsigned int joint_index) |
Set the acceleration of a joint by its index. | |
void | set_torques (const Eigen::VectorXd &torques) |
Setter of the torques attribute. | |
void | set_torques (const std::vector< double > &torques) |
Setter of the torques attributes. | |
void | set_torque (double torque, const std::string &joint_name) |
Set the torque of a joint by its name. | |
void | set_torque (double torque, unsigned int joint_index) |
Set the torque of a joint by its index. | |
virtual void | set_data (const Eigen::VectorXd &data) override |
Set the data of the state from all the state variables in a single Eigen vector. | |
virtual void | set_data (const std::vector< double > &data) override |
Set the data of the state from all the state variables in a single std vector. | |
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. | |
void | clamp_state_variable (const Eigen::ArrayXd &max_absolute_value_array, const JointStateVariable &state_variable_type, const Eigen::ArrayXd &noise_ratio_array) |
Clamp inplace the magnitude of the a specific joint state variable for each individual joint. | |
JointState | copy () const |
Return a copy of the joint state. | |
double | dist (const JointState &state, const JointStateVariable &state_variable_type=JointStateVariable::ALL) const |
Compute the distance to another state as the sum of distances between each attribute. | |
void | reset () override |
Reset the object to a post-construction state. | |
bool | is_incompatible (const State &state) const override |
Check if the joint state is incompatible for operations with the state given as argument. | |
void | set_zero () |
Set the joint state to a zero value. | |
std::vector< double > | to_std_vector () const |
Return the joint state as a std vector. | |
JointState & | operator*= (double lambda) |
Scale inplace by a scalar. | |
JointState | operator* (double lambda) const |
Scale a joint state by a scalar. | |
JointState & | operator/= (double lambda) |
Scale inplace by a scalar. | |
JointState | operator/ (double lambda) const |
Scale a joint state by a scalar. | |
JointState & | operator+= (const JointState &state) |
Add inplace another joint state. | |
JointState | operator+ (const JointState &state) const |
Add another joint sate. | |
JointState | operator- () const |
Negate a joint state. | |
JointState & | operator-= (const JointState &state) |
Compute inplace the difference with another joint state. | |
JointState | operator- (const JointState &state) const |
Compute the difference with another joint state. | |
Public Member Functions inherited from state_representation::State | |
State () | |
Empty constructor. | |
State (const std::string &name) | |
Constructor with name specification. | |
State (const State &state) | |
Copy constructor from another state. | |
virtual | ~State ()=default |
Virtual destructor. | |
State & | operator= (const State &state) |
Copy assignment operator that has to be defined to the custom assignment operator. | |
const StateType & | get_type () const |
Getter of the type attribute. | |
const std::string & | get_name () const |
Getter of the name attribute. | |
bool | is_empty () const |
Getter of the empty attribute. | |
const std::chrono::time_point< std::chrono::steady_clock > & | get_timestamp () const |
Getter of the timestamp attribute. | |
virtual void | set_name (const std::string &name) |
Setter of the name attribute. | |
void | reset_timestamp () |
Reset the timestamp attribute to now. | |
virtual void | set_data (const Eigen::MatrixXd &data) |
Set the data of the state from an Eigen matrix. | |
double | get_age () const |
Get the age of the state, i.e. the time since the last modification. | |
bool | is_deprecated (double time_delay) const |
Check if the state is deprecated given a certain time delay. | |
template<typename DurationT > | |
bool | is_deprecated (const std::chrono::duration< int64_t, DurationT > &time_delay) const |
Check if the state is deprecated given a certain time delay. | |
operator bool () const noexcept | |
Boolean operator for the truthiness of a state. | |
Static Public Member Functions | |
static JointState | Zero (const std::string &robot_name, unsigned int nb_joints) |
Constructor for a zero joint state. | |
static JointState | Zero (const std::string &robot_name, const std::vector< std::string > &joint_names) |
Constructor for a zero joint state. | |
static JointState | Random (const std::string &robot_name, unsigned int nb_joints) |
Constructor for a random joint state. | |
static JointState | Random (const std::string &robot_name, const std::vector< std::string > &joint_names) |
Constructor for a random joint state. | |
Protected Member Functions | |
void | multiply_state_variable (const Eigen::MatrixXd &lambda, const JointStateVariable &state_variable_type) |
Proxy function that scale the specified state variable by a matrix. | |
Eigen::VectorXd | get_state_variable (const JointStateVariable &state_variable_type) const |
Getter of the variable value corresponding to the input. | |
void | set_state_variable (const Eigen::VectorXd &new_value, const JointStateVariable &state_variable_type) |
Setter of the variable value corresponding to the input. | |
void | set_state_variable (const std::vector< double > &new_value, const JointStateVariable &state_variable_type) |
Setter of the variable value corresponding to the input. | |
void | set_state_variable (double new_value, unsigned int joint_index, const JointStateVariable &state_variable_type) |
Setter of the variable value corresponding to the input. | |
std::string | to_string () const override |
Convert the state to its string representation. | |
Protected Member Functions inherited from state_representation::State | |
void | set_type (const StateType &type) |
Setter of the state type attribute. | |
void | set_empty (bool empty=true) |
Setter of the empty attribute. | |
void | assert_not_empty () const |
Throw an exception if the state is empty. | |
Friends | |
void | swap (JointState &state1, JointState &state2) |
Swap the values of the two joint states. | |
double | dist (const JointState &s1, const JointState &s2, const JointStateVariable &state_variable_type) |
Compute the distance between two joint states. | |
JointState | operator* (double lambda, const JointState &state) |
Scale a joint state by a scalar. | |
JointState | operator* (const Eigen::MatrixXd &lambda, const JointState &state) |
Scale a joint state by a matrix. | |
std::ostream & | operator<< (std::ostream &os, const JointState &state) |
Overload the ostream operator for printing. | |
Class to define a state in joint space.
Definition at line 35 of file JointState.hpp.
state_representation::JointState::JointState | ( | ) |
Empty constructor for a joint state.
Definition at line 33 of file JointState.cpp.
|
explicit |
Constructor with name and number of joints provided.
robot_name | The name of the associated robot |
nb_joints | The number of joints for initialization |
Definition at line 37 of file JointState.cpp.
state_representation::JointState::JointState | ( | const std::string & | robot_name, |
const std::vector< std::string > & | joint_names | ||
) |
Constructor with name and list of joint names provided.
robot_name | The name of the associated robot |
joint_names | List of joint names |
Definition at line 48 of file JointState.cpp.
state_representation::JointState::JointState | ( | const JointState & | state | ) |
Copy constructor of a joint state.
state | The joint state to copy from |
Definition at line 53 of file JointState.cpp.
Eigen::ArrayXd state_representation::JointState::array | ( | ) | const |
Returns the data vector as an Eigen array.
Definition at line 194 of file JointState.cpp.
void state_representation::JointState::clamp_state_variable | ( | const Eigen::ArrayXd & | max_absolute_value_array, |
const JointStateVariable & | state_variable_type, | ||
const Eigen::ArrayXd & | noise_ratio_array | ||
) |
Clamp inplace the magnitude of the a specific joint state variable for each individual joint.
max_absolute_value_array | The maximum absolute value of the state variable for each joint individually |
state_variable_type | Name of the variable from the JointStateVariable structure to clamp |
noise_ratio_array | Those values will be used to apply a dead zone relative to the maximum absolute value under which the state variable will be set to 0 for each individual joint |
Definition at line 356 of file JointState.cpp.
void state_representation::JointState::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.
max_absolute_value | The maximum absolute value of the state variable |
state_variable_type | Name of the variable from the JointStateVariable structure to clamp |
noise_ratio | If provided, this value will be used to apply a dead zone relative to the maximum absolute value under which the state variable will be set to 0 |
Definition at line 385 of file JointState.cpp.
JointState state_representation::JointState::copy | ( | ) | const |
Return a copy of the joint state.
Definition at line 395 of file JointState.cpp.
|
virtual |
Returns the data as the concatenation of all the state variables in a single vector.
Reimplemented in state_representation::JointAccelerations, state_representation::JointPositions, state_representation::JointTorques, and state_representation::JointVelocities.
Definition at line 190 of file JointState.cpp.
double state_representation::JointState::dist | ( | const JointState & | state, |
const JointStateVariable & | state_variable_type = JointStateVariable::ALL |
||
) | const |
Compute the distance to another state as the sum of distances between each attribute.
state | The second state |
state_variable_type | Name of the variable from the JointStateVariable structure to apply the distance on (default ALL for full distance across all dimensions) |
Definition at line 400 of file JointState.cpp.
double state_representation::JointState::get_acceleration | ( | const std::string & | joint_name | ) | const |
Get the acceleration of a joint by its name, if it exists.
joint_name | The name of the joint @raises JointNotFoundException if the desired joint doesn't exist |
Definition at line 165 of file JointState.cpp.
double state_representation::JointState::get_acceleration | ( | unsigned int | joint_index | ) | const |
Get the acceleration of a joint by its index, if it exists.
joint_index | The index of the joint @raises JointNotFoundException if the desired joint doesn't exist |
Definition at line 169 of file JointState.cpp.
const Eigen::VectorXd & state_representation::JointState::get_accelerations | ( | ) | const |
Getter of the accelerations attribute.
Definition at line 160 of file JointState.cpp.
unsigned int state_representation::JointState::get_joint_index | ( | const std::string & | joint_name | ) | const |
Get joint index by the name of the joint, if it exists.
joint_name | The name of the desired joint @raises JointNotFoundException if the desired joint doesn't exist |
Definition at line 122 of file JointState.cpp.
const std::vector< std::string > & state_representation::JointState::get_names | ( | ) | const |
Getter of the names attribute.
Definition at line 118 of file JointState.cpp.
double state_representation::JointState::get_position | ( | const std::string & | joint_name | ) | const |
Get the position of a joint by its name, if it exists.
joint_name | The name of the joint @raises JointNotFoundException if the desired joint doesn't exist |
Definition at line 135 of file JointState.cpp.
double state_representation::JointState::get_position | ( | unsigned int | joint_index | ) | const |
Get the position of a joint by its index, if it exists.
joint_index | The index of the joint @raises JointNotFoundException if the desired joint doesn't exist |
Definition at line 139 of file JointState.cpp.
const Eigen::VectorXd & state_representation::JointState::get_positions | ( | ) | const |
Getter of the positions attribute.
Definition at line 130 of file JointState.cpp.
unsigned int state_representation::JointState::get_size | ( | ) | const |
Getter of the size from the attributes.
Definition at line 114 of file JointState.cpp.
|
protected |
Getter of the variable value corresponding to the input.
state_variable_type | The type of variable to get |
Definition at line 93 of file JointState.cpp.
double state_representation::JointState::get_torque | ( | const std::string & | joint_name | ) | const |
Get the torque of a joint by its name, if it exists.
joint_name | The name of the joint @raises JointNotFoundException if the desired joint doesn't exist |
Definition at line 180 of file JointState.cpp.
double state_representation::JointState::get_torque | ( | unsigned int | joint_index | ) | const |
Get the torque of a joint by its index, if it exists.
joint_index | The index of the joint @raises JointNotFoundException if the desired joint doesn't exist |
Definition at line 184 of file JointState.cpp.
const Eigen::VectorXd & state_representation::JointState::get_torques | ( | ) | const |
Getter of the torques attribute.
Definition at line 175 of file JointState.cpp.
const Eigen::VectorXd & state_representation::JointState::get_velocities | ( | ) | const |
Getter of the velocities attribute.
Definition at line 145 of file JointState.cpp.
double state_representation::JointState::get_velocity | ( | const std::string & | joint_name | ) | const |
Get the velocity of a joint by its name, if it exists.
joint_name | The name of the joint @raises JointNotFoundException if the desired joint doesn't exist |
Definition at line 150 of file JointState.cpp.
double state_representation::JointState::get_velocity | ( | unsigned int | joint_index | ) | const |
Get the velocity of a joint by its index, if it exists.
joint_index | The index of the joint @raises JointNotFoundException if the desired joint doesn't exist |
Definition at line 154 of file JointState.cpp.
|
overridevirtual |
Check if the joint state is incompatible for operations with the state given as argument.
state | The state to check compatibility with |
Reimplemented from state_representation::State.
Definition at line 432 of file JointState.cpp.
|
protected |
Proxy function that scale the specified state variable by a matrix.
lambda | The scaling matrix |
state_variable_type | The state variable on which to apply the scaling |
Definition at line 465 of file JointState.cpp.
JointState state_representation::JointState::operator* | ( | double | lambda | ) | const |
Scale a joint state by a scalar.
All joints in all the state variables are scaled by the same factor.
lambda | The scaling factor |
lambda | The scaling factor |
Definition at line 482 of file JointState.cpp.
JointState & state_representation::JointState::operator*= | ( | double | lambda | ) |
Scale inplace by a scalar.
All joints in all the state variables are scaled by the same factor.
lambda | The scaling factor |
Definition at line 477 of file JointState.cpp.
JointState state_representation::JointState::operator+ | ( | const JointState & | state | ) | const |
Add another joint sate.
state | A joint state with same name and same joint names |
Definition at line 523 of file JointState.cpp.
JointState & state_representation::JointState::operator+= | ( | const JointState & | state | ) |
Add inplace another joint state.
state | A joint state with same name and same joint names |
Definition at line 510 of file JointState.cpp.
JointState state_representation::JointState::operator- | ( | ) | const |
Negate a joint state.
Definition at line 529 of file JointState.cpp.
JointState state_representation::JointState::operator- | ( | const JointState & | state | ) | const |
Compute the difference with another joint state.
state | A joint state with same name and same joint names |
Definition at line 541 of file JointState.cpp.
JointState & state_representation::JointState::operator-= | ( | const JointState & | state | ) |
Compute inplace the difference with another joint state.
state | A joint state with same name and same joint names |
Definition at line 536 of file JointState.cpp.
JointState state_representation::JointState::operator/ | ( | double | lambda | ) | const |
Scale a joint state by a scalar.
All joints in all the state variables are scaled by the same factor.
lambda | The scaling factor |
lambda | The scaling factor |
Definition at line 504 of file JointState.cpp.
JointState & state_representation::JointState::operator/= | ( | double | lambda | ) |
Scale inplace by a scalar.
All joints in all the state variables are scaled by the same factor.
lambda | The scaling factor |
lambda | The scaling factor |
Definition at line 500 of file JointState.cpp.
JointState & state_representation::JointState::operator= | ( | const JointState & | state | ) |
Copy assignment operator that has to be defined to the custom assignment operator.
state | The state with value to assign |
Definition at line 87 of file JointState.cpp.
|
static |
Constructor for a random joint state.
robot_name | The name of the associated robot |
joint_names | List of joint names |
Definition at line 80 of file JointState.cpp.
|
static |
Constructor for a random joint state.
robot_name | The name of the associated robot |
nb_joints | The number of joints for initialization |
Definition at line 73 of file JointState.cpp.
|
overridevirtual |
Reset the object to a post-construction state.
Reimplemented from state_representation::State.
Definition at line 427 of file JointState.cpp.
void state_representation::JointState::set_acceleration | ( | double | acceleration, |
const std::string & | joint_name | ||
) |
Set the acceleration of a joint by its name.
acceleration | The acceleration of the joint |
joint_name | The name of the joint @raises JointNotFoundException if the desired joint doesn't exist |
Definition at line 324 of file JointState.cpp.
void state_representation::JointState::set_acceleration | ( | double | acceleration, |
unsigned int | joint_index | ||
) |
Set the acceleration of a joint by its index.
acceleration | The acceleration of the joint |
joint_index | The index of the joint @raises JointNotFoundException if the desired joint doesn't exist |
Definition at line 328 of file JointState.cpp.
void state_representation::JointState::set_accelerations | ( | const Eigen::VectorXd & | accelerations | ) |
Setter of the accelerations attribute.
accelerations | The joint accelerations as Eigen vector |
Definition at line 316 of file JointState.cpp.
void state_representation::JointState::set_accelerations | ( | const std::vector< double > & | accelerations | ) |
Setter of the accelerations from std vector.
accelerations | The joint accelerations as std vector |
Definition at line 320 of file JointState.cpp.
|
overridevirtual |
Set the data of the state from all the state variables in a single Eigen vector.
The | concatenated data vector |
Reimplemented from state_representation::State.
Reimplemented in state_representation::JointAccelerations, state_representation::JointPositions, state_representation::JointTorques, and state_representation::JointVelocities.
Definition at line 348 of file JointState.cpp.
|
overridevirtual |
Set the data of the state from all the state variables in a single std vector.
The | concatenated data vector |
Reimplemented from state_representation::State.
Reimplemented in state_representation::JointAccelerations, state_representation::JointPositions, state_representation::JointTorques, and state_representation::JointVelocities.
Definition at line 352 of file JointState.cpp.
void state_representation::JointState::set_names | ( | const std::vector< std::string > & | names | ) |
Setter of the names attribute.
names | The vector of strings containing the joint names |
Definition at line 274 of file JointState.cpp.
void state_representation::JointState::set_names | ( | unsigned int | nb_joints | ) |
Setter of the names attribute from the number of joints.
nb_joints | The number of joints of the joint state |
Definition at line 262 of file JointState.cpp.
void state_representation::JointState::set_position | ( | double | position, |
const std::string & | joint_name | ||
) |
Set the position of a joint by its name.
position | The position of the joint |
joint_name | The name of the joint @raises JointNotFoundException if the desired joint doesn't exist |
Definition at line 292 of file JointState.cpp.
void state_representation::JointState::set_position | ( | double | position, |
unsigned int | joint_index | ||
) |
Set the position of a joint by its index.
position | The position of the joint |
joint_index | The index of the joint @raises JointNotFoundException if the desired joint doesn't exist |
Definition at line 296 of file JointState.cpp.
void state_representation::JointState::set_positions | ( | const Eigen::VectorXd & | positions | ) |
Setter of the positions attribute.
positions | The joint positions as Eigen vector |
Definition at line 284 of file JointState.cpp.
void state_representation::JointState::set_positions | ( | const std::vector< double > & | positions | ) |
Setter of the positions from std vector.
positions | The joint positions as std vector |
Definition at line 288 of file JointState.cpp.
|
protected |
Setter of the variable value corresponding to the input.
new_value | The new value of the variable as Eigen vector |
state_variable_type | The type of variable to set |
Definition at line 204 of file JointState.cpp.
|
protected |
Setter of the variable value corresponding to the input.
new_value | The new value of the variable as std vector |
state_variable_type | The type of variable to set |
Definition at line 198 of file JointState.cpp.
|
protected |
Setter of the variable value corresponding to the input.
new_value | The new value of the variable as Eigen vector |
joint_index | The index at which to set the new value |
state_variable_type | The type of variable to set @raises JointNotFoundException if the desired joint doesn't exist |
Definition at line 236 of file JointState.cpp.
void state_representation::JointState::set_torque | ( | double | torque, |
const std::string & | joint_name | ||
) |
Set the torque of a joint by its name.
torque | The torque of the joint |
joint_name | The name of the joint @raises JointNotFoundException if the desired joint doesn't exist |
Definition at line 340 of file JointState.cpp.
void state_representation::JointState::set_torque | ( | double | torque, |
unsigned int | joint_index | ||
) |
Set the torque of a joint by its index.
torque | The torque of the joint |
joint_index | The index of the joint @raises JointNotFoundException if the desired joint doesn't exist |
Definition at line 344 of file JointState.cpp.
void state_representation::JointState::set_torques | ( | const Eigen::VectorXd & | torques | ) |
Setter of the torques attribute.
torques | The joint torques as Eigen vector |
Definition at line 332 of file JointState.cpp.
void state_representation::JointState::set_torques | ( | const std::vector< double > & | torques | ) |
Setter of the torques attributes.
torques | The joint torques as std vector |
Definition at line 336 of file JointState.cpp.
void state_representation::JointState::set_velocities | ( | const Eigen::VectorXd & | velocities | ) |
Setter of the velocities attribute.
velocities | The joint velocities as Eigen vector |
Definition at line 300 of file JointState.cpp.
void state_representation::JointState::set_velocities | ( | const std::vector< double > & | velocities | ) |
Setter of the velocities from std vector.
velocities | The joint velocities as std vector |
Definition at line 304 of file JointState.cpp.
void state_representation::JointState::set_velocity | ( | double | velocity, |
const std::string & | joint_name | ||
) |
Set the velocity of a joint by its name.
velocity | The velocity of the joint |
joint_name | The name of the joint @raises JointNotFoundException if the desired joint doesn't exist |
Definition at line 308 of file JointState.cpp.
void state_representation::JointState::set_velocity | ( | double | velocity, |
unsigned int | joint_index | ||
) |
Set the velocity of a joint by its index.
velocity | The velocity of the joint |
joint_index | The index of the joint @raises JointNotFoundException if the desired joint doesn't exist |
Definition at line 312 of file JointState.cpp.
void state_representation::JointState::set_zero | ( | ) |
Set the joint state to a zero value.
Definition at line 450 of file JointState.cpp.
std::vector< double > state_representation::JointState::to_std_vector | ( | ) | const |
Return the joint state as a std vector.
Definition at line 460 of file JointState.cpp.
|
overrideprotectedvirtual |
Convert the state to its string representation.
Reimplemented from state_representation::State.
Definition at line 547 of file JointState.cpp.
|
static |
Constructor for a zero joint state.
robot_name | The name of the associated robot |
joint_names | List of joint names |
Definition at line 66 of file JointState.cpp.
|
static |
Constructor for a zero joint state.
robot_name | The name of the associated robot |
nb_joints | The number of joints for initialization |
Definition at line 59 of file JointState.cpp.
|
friend |
Compute the distance between two joint states.
s1 | The first joint state |
s2 | The second joint state |
state_variable_type | Name of the field from the JointStateVariable structure to apply the distance on (default ALL for full distance across all dimensions) |
Definition at line 423 of file JointState.cpp.
|
friend |
Scale a joint state by a matrix.
lambda | The scaling matrix |
state | The joint state to be scaled |
Definition at line 494 of file JointState.cpp.
|
friend |
Scale a joint state by a scalar.
All joints in all the state variables are scaled by the same factor.
lambda | The scaling factor |
lambda | The scaling factor |
state | The joint state to be scaled |
Definition at line 488 of file JointState.cpp.
|
friend |
Overload the ostream operator for printing.
os | The ostream to append the string representing the state |
state | The state to print |
Definition at line 579 of file JointState.cpp.
|
friend |
Swap the values of the two joint states.
state1 | Joint state to be swapped with 2 |
state2 | Joint state to be swapped with 1 |
Definition at line 575 of file JointState.hpp.