Galaxis Codebase  1.0.0
Team Galaxis software stack for the Carolo Cup 2023 - ROS2 based software
galaxis::lina Namespace Reference

Typedefs

typedef Eigen::Vector2i Vector2i
 
typedef Eigen::Vector2f Vector2f
 
typedef Eigen::Vector3f Vector3f
 
typedef Eigen::Matrix< float, 2, 2 > Matrix2f
 
typedef Eigen::Vector2f Point2f
 
typedef Eigen::Vector4f Polynom3d
 
typedef Eigen::Vector2f Polynom1d
 

Functions

std::shared_ptr< DebugPolynomType > pointcloud_to_ros_message (std::vector< Point2f > const &p_pointCloud)
 
std::shared_ptr< std::vector< Point2f > > ros_message_to_pointcloud (std::shared_ptr< DebugPolynomType > &p_debugPolynomMessageSPtr)
 

Variables

constexpr float mathPi = 3.14159265f
 

Typedef Documentation

◆ Matrix2f

typedef Eigen::Matrix<float, 2, 2> galaxis::lina::Matrix2f

Definition at line 16 of file linatypes.hpp.

◆ Point2f

typedef Eigen::Vector2f galaxis::lina::Point2f

Definition at line 18 of file linatypes.hpp.

◆ Polynom1d

typedef Eigen::Vector2f galaxis::lina::Polynom1d

Definition at line 20 of file linatypes.hpp.

◆ Polynom3d

typedef Eigen::Vector4f galaxis::lina::Polynom3d

Definition at line 19 of file linatypes.hpp.

◆ Vector2f

typedef Eigen::Vector2f galaxis::lina::Vector2f

Definition at line 14 of file linatypes.hpp.

◆ Vector2i

typedef Eigen::Vector2i galaxis::lina::Vector2i

Definition at line 13 of file linatypes.hpp.

◆ Vector3f

typedef Eigen::Vector3f galaxis::lina::Vector3f

Definition at line 15 of file linatypes.hpp.

Function Documentation

◆ pointcloud_to_ros_message()

std::shared_ptr<DebugPolynomType> galaxis::lina::pointcloud_to_ros_message ( std::vector< Point2f > const &  p_pointCloud)

Definition at line 7 of file linatypes.cpp.

7  {
8  std::shared_ptr<DebugPolynomType> message = std::make_shared<DebugPolynomType>();
9 
10  for(auto& p: p_pointCloud) {
11  Vector2fType v2f;
12  v2f.x = p(0);
13  v2f.y = p(1);
14  message->points.track.push_back(v2f);
15  }
16 
17  return message;
18 }

◆ ros_message_to_pointcloud()

std::shared_ptr<std::vector<Point2f> > galaxis::lina::ros_message_to_pointcloud ( std::shared_ptr< DebugPolynomType > &  p_debugPolynomMessageSPtr)

Definition at line 20 of file linatypes.cpp.

20  {
21  std::shared_ptr<std::vector<Point2f>> pointCloud = std::make_shared<std::vector<Point2f>>();
22 
23  for(auto& p: p_debugPolynomMessageSPtr->points.track) {
24  Vector2f vec(p.x, p.y);
25  pointCloud->push_back(vec);
26  }
27 
28  return pointCloud;
29 }

Variable Documentation

◆ mathPi

constexpr float galaxis::lina::mathPi = 3.14159265f
constexpr

Definition at line 25 of file linatypes.hpp.

Vector2fType
messages::msg::Vector2f Vector2fType
Definition: messages.hpp:44
galaxis::lina::Vector2f
Eigen::Vector2f Vector2f
Definition: linatypes.hpp:14