Control Libraries 6.3.4
|
Class to define a state in joint space. More...
#include <JointState.hpp>
Public Member Functions | |
JointState () | |
Empty constructor for a JointState. More... | |
JointState (const std::string &robot_name, unsigned int nb_joints=0) | |
Constructor with name and number of joints provided. More... | |
JointState (const std::string &robot_name, const std::vector< std::string > &joint_names) | |
Constructor with name and list of joint names provided. More... | |
JointState (const JointState &state)=default | |
Copy constructor of a JointState. More... | |
JointState & | operator= (const JointState &state) |
Copy assignment operator that have to be defined to the custom assignment operator. More... | |
unsigned int | get_size () const |
Getter of the size from the attributes. More... | |
const std::vector< std::string > & | get_names () const |
Getter of the names attribute. More... | |
void | set_names (unsigned int nb_joints) |
Setter of the names attribute from the number of joints. More... | |
void | set_names (const std::vector< std::string > &names) |
Setter of the names attribute. More... | |
unsigned int | get_joint_index (const std::string &joint_name) const |
Get joint index by the name of the joint, if it exists. More... | |
const Eigen::VectorXd & | get_positions () const |
Getter of the positions attribute. More... | |
double | get_position (const std::string &joint_name) const |
Get the position of a joint by its name, if it exists. More... | |
double | get_position (unsigned int joint_index) const |
Get the position of a joint by its index, if it exists. More... | |
void | set_positions (const Eigen::VectorXd &positions) |
Setter of the positions attribute. More... | |
void | set_positions (const std::vector< double > &positions) |
Setter of the positions from std vector. More... | |
void | set_position (double position, const std::string &joint_name) |
Set the position of a joint by its name. More... | |
void | set_position (double position, unsigned int joint_index) |
Set the position of a joint by its index. More... | |
const Eigen::VectorXd & | get_velocities () const |
Getter of the velocities attribute. More... | |
double | get_velocity (const std::string &joint_name) const |
Get the velocity of a joint by its name, if it exists. More... | |
double | get_velocity (unsigned int joint_index) const |
Get the velocity of a joint by its index, if it exists. More... | |
void | set_velocities (const Eigen::VectorXd &velocities) |
Setter of the velocities attribute. More... | |
void | set_velocities (const std::vector< double > &velocities) |
Setter of the velocities from std vector. More... | |
void | set_velocity (double velocity, const std::string &joint_name) |
Set the velocity of a joint by its name. More... | |
void | set_velocity (double velocity, unsigned int joint_index) |
Set the velocity of a joint by its index. More... | |
const Eigen::VectorXd & | get_accelerations () const |
Getter of the accelerations attribute. More... | |
double | get_acceleration (const std::string &joint_name) const |
Get the acceleration of a joint by its name, if it exists. More... | |
double | get_acceleration (unsigned int joint_index) const |
Get the acceleration of a joint by its index, if it exists. More... | |
void | set_accelerations (const Eigen::VectorXd &accelerations) |
Setter of the accelerations attribute. More... | |
void | set_accelerations (const std::vector< double > &accelerations) |
Setter of the accelerations from std vector. More... | |
void | set_acceleration (double acceleration, const std::string &joint_name) |
Set the acceleration of a joint by its name. More... | |
void | set_acceleration (double acceleration, unsigned int joint_index) |
Set the acceleration of a joint by its index. More... | |
const Eigen::VectorXd & | get_torques () const |
Getter of the torques attribute. More... | |
double | get_torque (const std::string &joint_name) const |
Get the torque of a joint by its name, if it exists. More... | |
double | get_torque (unsigned int joint_index) const |
Get the torque of a joint by its index, if it exists. More... | |
void | set_torques (const Eigen::VectorXd &torques) |
Setter of the torques attribute. More... | |
void | set_torques (const std::vector< double > &torques) |
Setter of the torques attributes. More... | |
void | set_torque (double torque, const std::string &joint_name) |
Set the torque of a joint by its name. More... | |
void | set_torque (double torque, unsigned int joint_index) |
Set the torque of a joint by its index. More... | |
bool | is_compatible (const State &state) const |
Check if the state is compatible for operations with the state given as argument. More... | |
void | initialize () |
Initialize the State to a zero value. More... | |
void | set_zero () |
Set the JointState to a zero value. More... | |
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. More... | |
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. More... | |
JointState | copy () const |
Return a copy of the JointState. More... | |
virtual Eigen::VectorXd | data () const |
Returns the data as the concatenation of all the state variables in a single vector. More... | |
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. More... | |
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. More... | |
Eigen::ArrayXd | array () const |
Returns the data vector as an Eigen Array. More... | |
JointState & | operator+= (const JointState &state) |
Overload the += operator. More... | |
JointState | operator+ (const JointState &state) const |
Overload the + operator. More... | |
JointState & | operator-= (const JointState &state) |
Overload the -= operator. More... | |
JointState | operator- (const JointState &state) const |
Overload the - operator. More... | |
JointState & | operator*= (double lambda) |
Overload the *= operator with a double gain. More... | |
JointState | operator* (double lambda) const |
Overload the * operator with a double gain. More... | |
JointState & | operator*= (const Eigen::ArrayXd &lambda) |
Overload the *= operator with an array of gains. More... | |
JointState | operator* (const Eigen::ArrayXd &lambda) const |
Overload the * operator with an array of gains. More... | |
JointState & | operator*= (const Eigen::MatrixXd &lambda) |
Overload the *= operator with a matrix of gains. More... | |
JointState | operator* (const Eigen::MatrixXd &lambda) const |
Overload the * operator with a matrix of gains. More... | |
JointState & | operator/= (double lambda) |
Overload the /= operator with a scalar. More... | |
JointState | operator/ (double lambda) const |
Overload the / operator with a scalar. More... | |
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. More... | |
std::vector< double > | to_std_vector () const |
Return the joint state as a std vector of floats. More... | |
Public Member Functions inherited from state_representation::State | |
State () | |
Empty constructor. More... | |
State (const StateType &type) | |
Constructor only specifying the type of the state from the StateType enumeration. More... | |
State (const StateType &type, const std::string &name, const bool &empty=true) | |
Constructor with name specification. More... | |
State (const State &state) | |
Copy constructor from another State. More... | |
virtual | ~State ()=default |
Virtual destructor. | |
State & | operator= (const State &state) |
Copy assignment operator that have to be defined to the custom assignment operator. More... | |
const StateType & | get_type () const |
Getter of the type attribute. More... | |
bool | is_empty () const |
Getter of the empty attribute. More... | |
void | set_empty (bool empty=true) |
Setter of the empty attribute. More... | |
void | set_filled () |
Setter of the empty attribute to false and also reset the timestamp. More... | |
const std::chrono::time_point< std::chrono::steady_clock > & | get_timestamp () const |
Getter of the timestamp attribute. More... | |
void | set_timestamp (const std::chrono::time_point< std::chrono::steady_clock > &timepoint) |
Setter of the timestamp attribute. More... | |
void | reset_timestamp () |
Reset the timestamp attribute to now. More... | |
const std::string & | get_name () const |
Getter of the name as const reference. More... | |
virtual void | set_name (const std::string &name) |
Setter of the name. More... | |
template<typename DurationT > | |
bool | is_deprecated (const std::chrono::duration< int64_t, DurationT > &time_delay) |
Check if the state is deprecated given a certain time delay. More... | |
virtual bool | is_compatible (const State &state) const |
Check if the state is compatible for operations with the state given as argument. More... | |
virtual void | initialize () |
Initialize the State to a zero value. More... | |
virtual void | set_data (const Eigen::VectorXd &data) |
Set the data of the state from a single Eigen vector. More... | |
virtual void | set_data (const std::vector< double > &data) |
Set the data of the state from a single std vector. More... | |
virtual void | set_data (const Eigen::MatrixXd &data) |
Set the data of the state from an Eigen matrix. More... | |
operator bool () const noexcept | |
Boolean operator for the truthiness of a state. More... | |
Static Public Member Functions | |
static JointState | Zero (const std::string &robot_name, unsigned int nb_joints) |
Constructor for a zero JointState. More... | |
static JointState | Zero (const std::string &robot_name, const std::vector< std::string > &joint_names) |
Constructor for a zero JointState. More... | |
static JointState | Random (const std::string &robot_name, unsigned int nb_joints) |
Constructor for a random JointState. More... | |
static JointState | Random (const std::string &robot_name, const std::vector< std::string > &joint_names) |
Constructor for a random JointState. More... | |
Protected Member Functions | |
void | multiply_state_variable (const Eigen::ArrayXd &lambda, const JointStateVariable &state_variable_type) |
Proxy function that multiply the specified state variable by an array of gain. More... | |
void | multiply_state_variable (const Eigen::MatrixXd &lambda, const JointStateVariable &state_variable_type) |
Proxy function that multiply the specified state variable by an array of gain. More... | |
Eigen::VectorXd | get_state_variable (const JointStateVariable &state_variable_type) const |
Getter of the variable value corresponding to the input. More... | |
void | set_state_variable (const Eigen::VectorXd &new_value, const JointStateVariable &state_variable_type) |
Setter of the variable value corresponding to the input. More... | |
Protected Member Functions inherited from state_representation::State | |
void | set_type (const StateType &type) |
Override the state type. More... | |
Friends | |
void | swap (JointState &state1, JointState &state2) |
Swap the values of the two JointState. More... | |
std::ostream & | operator<< (std::ostream &os, const JointState &state) |
Overload the ostream operator for printing. More... | |
JointState | operator* (double lambda, const JointState &state) |
Overload the * operator with a scalar. More... | |
JointState | operator* (const Eigen::ArrayXd &lambda, const JointState &state) |
Overload the * operator with an array of gains. More... | |
JointState | operator* (const Eigen::MatrixXd &lambda, const JointState &state) |
Overload the * operator with a matrix of gains. More... | |
Class to define a state in joint space.
Definition at line 36 of file JointState.hpp.
|
explicit |
Empty constructor for a JointState.
Definition at line 16 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 20 of file JointState.cpp.
|
explicit |
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 26 of file JointState.cpp.
|
default |
Copy constructor of a JointState.
state | The JointState to copy from |
Eigen::ArrayXd state_representation::JointState::array | ( | ) | const |
Returns the data vector as an Eigen Array.
Definition at line 346 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 joints 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 350 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 379 of file JointState.cpp.
JointState state_representation::JointState::copy | ( | ) | const |
|
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 334 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 389 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.
A JointNotFoundException exception is thrown if the desired joint doesn't exist.
joint_name | The name of the desired joint |
joint_name | The name of the joint |
Definition at line 154 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.
A JointNotFoundException exception is thrown if the desired joint doesn't exist.
joint_name | The name of the desired joint |
joint_index | The index of the joint |
Definition at line 158 of file JointState.cpp.
const Eigen::VectorXd & state_representation::JointState::get_accelerations | ( | ) | const |
Getter of the accelerations attribute.
Definition at line 150 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.
A JointNotFoundException exception is thrown if the desired joint doesn't exist.
joint_name | The name of the desired joint |
Definition at line 78 of file JointState.cpp.
|
inline |
Getter of the names attribute.
Definition at line 660 of file JointState.hpp.
double state_representation::JointState::get_position | ( | const std::string & | joint_name | ) | const |
Get the position of a joint by its name, if it exists.
A JointNotFoundException exception is thrown if the desired joint doesn't exist.
joint_name | The name of the desired joint |
joint_name | The name of the joint |
Definition at line 90 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.
A JointNotFoundException exception is thrown if the desired joint doesn't exist.
joint_name | The name of the desired joint |
joint_index | The index of the joint |
Definition at line 94 of file JointState.cpp.
const Eigen::VectorXd & state_representation::JointState::get_positions | ( | ) | const |
Getter of the positions attribute.
Definition at line 86 of file JointState.cpp.
|
inline |
Getter of the size from the attributes.
Definition at line 656 of file JointState.hpp.
|
inlineprotected |
Getter of the variable value corresponding to the input.
state_variable_type | The type of variable to get |
Definition at line 685 of file JointState.hpp.
double state_representation::JointState::get_torque | ( | const std::string & | joint_name | ) | const |
Get the torque of a joint by its name, if it exists.
A JointNotFoundException exception is thrown if the desired joint doesn't exist.
joint_name | The name of the desired joint |
joint_name | The name of the joint |
Definition at line 186 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.
A JointNotFoundException exception is thrown if the desired joint doesn't exist.
joint_name | The name of the desired joint |
joint_index | The index of the joint |
Definition at line 190 of file JointState.cpp.
const Eigen::VectorXd & state_representation::JointState::get_torques | ( | ) | const |
Getter of the torques attribute.
Definition at line 182 of file JointState.cpp.
const Eigen::VectorXd & state_representation::JointState::get_velocities | ( | ) | const |
Getter of the velocities attribute.
Definition at line 118 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.
A JointNotFoundException exception is thrown if the desired joint doesn't exist.
joint_name | The name of the desired joint |
joint_name | The name of the joint |
Definition at line 122 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.
A JointNotFoundException exception is thrown if the desired joint doesn't exist.
joint_name | The name of the desired joint |
joint_index | The index of the joint |
Definition at line 126 of file JointState.cpp.
|
virtual |
Initialize the State to a zero value.
Reimplemented from state_representation::State.
Definition at line 31 of file JointState.cpp.
|
inlinevirtual |
Check if the state is compatible for operations with the state given as argument.
state | The state to check compatibility with |
Reimplemented from state_representation::State.
Definition at line 645 of file JointState.hpp.
|
protected |
Proxy function that multiply the specified state variable by an array of gain.
lambda | The gain array to multiply with |
state_variable_type | The state variable on which to apply the multiplication |
Definition at line 268 of file JointState.cpp.
|
protected |
Proxy function that multiply the specified state variable by an array of gain.
lambda | The gain array to multiply with |
state_variable_type | The state variable on which to apply the multiplication |
Definition at line 279 of file JointState.cpp.
JointState state_representation::JointState::operator* | ( | const Eigen::ArrayXd & | lambda | ) | const |
Overload the * operator with an array of gains.
lambda | The gain array to multiply with |
Definition at line 313 of file JointState.cpp.
JointState state_representation::JointState::operator* | ( | const Eigen::MatrixXd & | lambda | ) | const |
Overload the * operator with a matrix of gains.
lambda | The matrix to multiply with |
Definition at line 307 of file JointState.cpp.
JointState state_representation::JointState::operator* | ( | double | lambda | ) | const |
Overload the * operator with a double gain.
lambda | The gain to multiply with |
Definition at line 301 of file JointState.cpp.
JointState & state_representation::JointState::operator*= | ( | const Eigen::ArrayXd & | lambda | ) |
Overload the *= operator with an array of gains.
lambda | The gain array to multiply with |
Definition at line 291 of file JointState.cpp.
JointState & state_representation::JointState::operator*= | ( | const Eigen::MatrixXd & | lambda | ) |
Overload the *= operator with a matrix of gains.
lambda | The matrix to multiply with |
Definition at line 296 of file JointState.cpp.
JointState & state_representation::JointState::operator*= | ( | double | lambda | ) |
Overload the *= operator with a double gain.
lambda | The gain to multiply with |
Definition at line 260 of file JointState.cpp.
JointState state_representation::JointState::operator+ | ( | const JointState & | state | ) | const |
Overload the + operator.
state | JointState to add |
Definition at line 231 of file JointState.cpp.
JointState & state_representation::JointState::operator+= | ( | const JointState & | state | ) |
Overload the += operator.
state | JointState to add |
Definition at line 214 of file JointState.cpp.
JointState state_representation::JointState::operator- | ( | const JointState & | state | ) | const |
Overload the - operator.
state | JointState to subtract |
Definition at line 254 of file JointState.cpp.
JointState & state_representation::JointState::operator-= | ( | const JointState & | state | ) |
Overload the -= operator.
state | JointState to subtract |
Definition at line 237 of file JointState.cpp.
JointState state_representation::JointState::operator/ | ( | double | lambda | ) | const |
Overload the / operator with a scalar.
lambda | The scalar to divide with |
Definition at line 323 of file JointState.cpp.
JointState & state_representation::JointState::operator/= | ( | double | lambda | ) |
Overload the /= operator with a scalar.
lambda | The scalar to divide with |
Definition at line 319 of file JointState.cpp.
|
inline |
Copy assignment operator that have to be defined to the custom assignment operator.
state | The state with value to assign |
Definition at line 607 of file JointState.hpp.
|
static |
Constructor for a random JointState.
robot_name | The name of the associated robot |
joint_names | List of joint names |
Definition at line 71 of file JointState.cpp.
|
static |
Constructor for a random JointState.
robot_name | The name of the associated robot |
nb_joints | The number of joints for initialization |
Definition at line 64 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 |
Definition at line 171 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 |
Definition at line 176 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 163 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 167 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 338 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 342 of file JointState.cpp.
|
inline |
Setter of the names attribute.
names | The vector of strings containing the joint names |
Definition at line 676 of file JointState.hpp.
|
inline |
Setter of the names attribute from the number of joints.
nb_joints | The number of joints of the joint state |
Definition at line 664 of file JointState.hpp.
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 |
Definition at line 107 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 |
Definition at line 112 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 99 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 103 of file JointState.cpp.
|
inlineprotected |
Setter of the variable value corresponding to the input.
new_value | The new value of the variable |
state_variable_type | The type of variable to get |
Definition at line 706 of file JointState.hpp.
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 |
Definition at line 203 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 |
Definition at line 208 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 195 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 199 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 131 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 135 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 |
Definition at line 139 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 |
Definition at line 144 of file JointState.cpp.
void state_representation::JointState::set_zero | ( | ) |
Set the JointState to a zero value.
Definition at line 43 of file JointState.cpp.
|
inline |
Return the joint state as a std vector of floats.
Definition at line 732 of file JointState.hpp.
|
static |
Constructor for a zero JointState.
robot_name | The name of the associated robot |
joint_names | List of joint names |
Definition at line 57 of file JointState.cpp.
|
static |
Constructor for a zero JointState.
robot_name | The name of the associated robot |
nb_joints | The number of joints for initialization |
Definition at line 50 of file JointState.cpp.
|
friend |
Overload the * operator with an array of gains.
lambda | The gain array to multiply with |
Definition at line 456 of file JointState.cpp.
|
friend |
Overload the * operator with a matrix of gains.
lambda | The matrix to multiply with |
Definition at line 450 of file JointState.cpp.
|
friend |
Overload the * operator with a scalar.
lambda | The scalar to multiply with |
Definition at line 443 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 415 of file JointState.cpp.
|
friend |
Swap the values of the two JointState.
state1 | JointState to be swapped with 2 |
state2 | JointState to be swapped with 1 |
Definition at line 598 of file JointState.hpp.