5#include "state_representation/geometry/Shape.hpp" 
    6#include "state_representation/space/cartesian/CartesianPose.hpp" 
   24  explicit Ellipsoid(
const std::string& name, 
const std::string& reference_frame = 
"world");
 
   37  static Ellipsoid Unit(
const std::string& name, 
const std::string& reference_frame = 
"world");
 
  100  void set_data(
const Eigen::VectorXd& data) 
override;
 
  106  void set_data(
const std::vector<double>& data) 
override;
 
  115      const std::string& name, 
const std::list<CartesianPose>& points, 
const std::string& reference_frame = 
"world",
 
  116      double noise_level = 0.01
 
  124      const std::string& name, 
const std::vector<double>& coefficients, 
const std::string& reference_frame = 
"world" 
  149  std::vector<double> axis_lengths_; 
 
  150  double rotation_angle_; 
 
 
  155  std::swap(state1.axis_lengths_, state2.axis_lengths_);
 
  156  std::swap(state1.rotation_angle_, state2.rotation_angle_);
 
 
Class to define Cartesian pose in Cartesian space as 3D position and quaternion based orientation.
static Ellipsoid Unit(const std::string &name, const std::string &reference_frame="world")
Constructor for a Ellipsoid with identity state, unit axis lengths and zero rotation angle.
void set_data(const Eigen::VectorXd &data) override
Set the ellipsoid data from an Eigen vector.
Ellipsoid & operator=(const Ellipsoid &state)
Copy assignment operator that has to be defined to the custom assignment operator.
friend void swap(Ellipsoid &state1, Ellipsoid &state2)
Swap the values of the two Ellipsoids.
void set_rotation_angle(double rotation_angle)
Setter of the rotation angle.
double get_axis_length(unsigned int index) const
Getter of the axis length in one direction.
static const Ellipsoid from_algebraic_equation(const std::string &name, const std::vector< double > &coefficients, const std::string &reference_frame="world")
Compute an Ellipsoid from its algebraic equation ax2 + bxy + cy2 + cx + ey + f.
const std::list< CartesianPose > sample_from_parameterization(unsigned int nb_samples) const
Function to sample an obstacle from its parameterization.
const CartesianPose get_rotation() const
Getter of the rotation as a pose.
void set_axis_lengths(const std::vector< double > &axis_lengths)
Setter of the axis lengths.
double get_rotation_angle() const
Getter of the rotation angle.
const std::vector< double > to_std_vector() const
Convert the Ellipsoid to an std vector representation of its parameter.
Ellipsoid()
Empty constructor.
const std::vector< double > & get_axis_lengths() const
Getter of the axis lengths.
friend std::ostream & operator<<(std::ostream &os, const Ellipsoid &ellipsoid)
Overload the ostream operator for printing.
static const Ellipsoid fit(const std::string &name, const std::list< CartesianPose > &points, const std::string &reference_frame="world", double noise_level=0.01)
Fit an Ellipsoid on a set of points This method uses direct least square fitting from Fitzgibbon,...
Core state variables and objects.
void swap(AnalogIOState &state1, AnalogIOState &state2)