3#include <eigen3/Eigen/Core>
4#include "state_representation/State.hpp"
5#include "state_representation/space/cartesian/CartesianState.hpp"
6#include "state_representation/space/cartesian/CartesianPose.hpp"
7#include "state_representation/space/cartesian/CartesianTwist.hpp"
8#include "state_representation/exceptions/EmptyStateException.hpp"
9#include "state_representation/exceptions/IncompatibleStatesException.hpp"
10#include "state_representation/exceptions/IncompatibleReferenceFramesException.hpp"
33 explicit Shape(
const StateType& type,
const std::string& name,
const std::string& reference_frame =
"world");
113 this->center_state_ = state.center_state_;
118 return this->center_state_;
122 return static_cast<const CartesianPose&
>(this->center_state_);
139 this->center_state_ = state;
145 "The shape state and the given pose are not expressed in the same reference frame");
Class to define CartesianPose in cartesian space as 3D position and quaternion based orientation.
Class to represent a state in Cartesian space.
void set_orientation(const Eigen::Quaterniond &orientation)
Setter of the orientation.
const Eigen::Vector3d & get_position() const
Getter of the position attribute.
void set_position(const Eigen::Vector3d &position)
Setter of the position.
const Eigen::Quaterniond & get_orientation() const
Getter of the orientation attribute.
void set_pose(const Eigen::Vector3d &position, const Eigen::Quaterniond &orientation)
Setter of the pose from both position and orientation.
Class to define twist in cartesian space as 3D linear and angular velocity vectors.
void set_center_orientation(const Eigen::Quaterniond &orientation)
Setter of the pose.
void set_center_state(const CartesianState &state)
Setter of the state.
Shape & operator=(const Shape &state)
Copy assignment operator that have to be defined to the custom assignment operator.
const Eigen::Vector3d get_center_position() const
Getter of the position from the state.
const CartesianState & get_center_state() const
Getter of the state.
friend std::ostream & operator<<(std::ostream &os, const Shape &shape)
Overload the ostream operator for printing.
const CartesianPose & get_center_pose() const
Getter of the pose from the state.
const Eigen::Quaterniond get_center_orientation() const
Getter of the orientation from the state.
void set_center_pose(const CartesianPose &pose)
Setter of the pose.
void set_center_position(const Eigen::Vector3d &position)
Setter of the position.
const CartesianTwist & get_center_twist() const
Getter of the twist from the state.
const std::string & get_reference_frame() const
Getter of the reference frame as const reference.
Abstract class to represent a state.
const std::string & get_name() const
Getter of the name as const reference.
virtual void set_name(const std::string &name)
Setter of the name.
State & operator=(const State &state)
Copy assignment operator that have to be defined to the custom assignment operator.
bool is_empty() const
Getter of the empty attribute.
Core state variables and objects.
StateType
The class types inheriting from State.