Control Libraries 6.3.4
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
state_representation::Shape Class Reference
Inheritance diagram for state_representation::Shape:
state_representation::State state_representation::Ellipsoid

Public Member Functions

 Shape (const StateType &type)
 Constructor with a type. More...
 
 Shape (const StateType &type, const std::string &name, const std::string &reference_frame="world")
 Constructor with name but empty state. More...
 
 Shape (const Shape &shape)
 Copy constructor from another shape. More...
 
Shapeoperator= (const Shape &state)
 Copy assignment operator that have to be defined to the custom assignment operator. More...
 
const CartesianStateget_center_state () const
 Getter of the state. More...
 
const CartesianPoseget_center_pose () const
 Getter of the pose from the state. More...
 
const Eigen::Vector3d get_center_position () const
 Getter of the position from the state. More...
 
const Eigen::Quaterniond get_center_orientation () const
 Getter of the orientation from the state. More...
 
const CartesianTwistget_center_twist () const
 Getter of the twist from the state. More...
 
void set_center_state (const CartesianState &state)
 Setter of the state. More...
 
void set_center_pose (const CartesianPose &pose)
 Setter of the pose. More...
 
void set_center_position (const Eigen::Vector3d &position)
 Setter of the position. More...
 
void set_center_orientation (const Eigen::Quaterniond &orientation)
 Setter of the pose. 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.
 
Stateoperator= (const State &state)
 Copy assignment operator that have to be defined to the custom assignment operator. More...
 
const StateTypeget_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...
 

Friends

std::ostream & operator<< (std::ostream &os, const Shape &shape)
 Overload the ostream operator for printing. More...
 

Additional Inherited Members

- Protected Member Functions inherited from state_representation::State
void set_type (const StateType &type)
 Override the state type. More...
 

Detailed Description

Definition at line 16 of file Shape.hpp.

Constructor & Destructor Documentation

◆ Shape() [1/3]

state_representation::Shape::Shape ( const StateType type)
explicit

Constructor with a type.

Parameters
typethe type of shape as a StateType

Definition at line 4 of file Shape.cpp.

◆ Shape() [2/3]

state_representation::Shape::Shape ( const StateType type,
const std::string &  name,
const std::string &  reference_frame = "world" 
)
explicit

Constructor with name but empty state.

Parameters
typethe type of shape as a StateType
namename of the shape
reference_framethe reference frame in which the state is expressed

Definition at line 6 of file Shape.cpp.

◆ Shape() [3/3]

state_representation::Shape::Shape ( const Shape shape)
explicit

Copy constructor from another shape.

Parameters
shapethe shape to copy

Definition at line 10 of file Shape.cpp.

Member Function Documentation

◆ get_center_orientation()

const Eigen::Quaterniond state_representation::Shape::get_center_orientation ( ) const
inline

Getter of the orientation from the state.

Returns
the orientation of the shape

Definition at line 129 of file Shape.hpp.

◆ get_center_pose()

const CartesianPose & state_representation::Shape::get_center_pose ( ) const
inline

Getter of the pose from the state.

Returns
the pose of the shape

Definition at line 121 of file Shape.hpp.

◆ get_center_position()

const Eigen::Vector3d state_representation::Shape::get_center_position ( ) const
inline

Getter of the position from the state.

Returns
the position of the shape

Definition at line 125 of file Shape.hpp.

◆ get_center_state()

const CartesianState & state_representation::Shape::get_center_state ( ) const
inline

Getter of the state.

Returns
the state

Definition at line 117 of file Shape.hpp.

◆ get_center_twist()

const CartesianTwist & state_representation::Shape::get_center_twist ( ) const
inline

Getter of the twist from the state.

Returns
the twist of the shape

Definition at line 133 of file Shape.hpp.

◆ operator=()

Shape & state_representation::Shape::operator= ( const Shape state)
inline

Copy assignment operator that have to be defined to the custom assignment operator.

Parameters
statethe state with value to assign
Returns
reference to the current state with new values

Definition at line 111 of file Shape.hpp.

◆ set_center_orientation()

void state_representation::Shape::set_center_orientation ( const Eigen::Quaterniond &  orientation)
inline

Setter of the pose.

Parameters
posethe new pose

Definition at line 157 of file Shape.hpp.

◆ set_center_pose()

void state_representation::Shape::set_center_pose ( const CartesianPose pose)
inline

Setter of the pose.

Parameters
posethe new pose

Definition at line 142 of file Shape.hpp.

◆ set_center_position()

void state_representation::Shape::set_center_position ( const Eigen::Vector3d &  position)
inline

Setter of the position.

Parameters
positionthe new position

Definition at line 150 of file Shape.hpp.

◆ set_center_state()

void state_representation::Shape::set_center_state ( const CartesianState state)
inline

Setter of the state.

Parameters
statethe new state

Definition at line 137 of file Shape.hpp.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const Shape shape 
)
friend

Overload the ostream operator for printing.

Parameters
osthe ostream to append the string representing the Shape to
shapethe Shape to print
Returns
the appended ostream

Definition at line 12 of file Shape.cpp.


The documentation for this class was generated from the following files: