math.hpp
Go to the documentation of this file.
1 #ifndef _ROS_ASTRA_MATH_HPP_
2 #define _ROS_ASTRA_MATH_HPP_
3 
4 #include <geometry_msgs/Point.h>
5 #include <geometry_msgs/Quaternion.h>
6 #include <geometry_msgs/Vector3.h>
7 #include <geometry_msgs/Transform.h>
8 #include <eigen3/Eigen/Dense>
9 #include <eigen3/Eigen/Geometry>
10 
11 
12 namespace astra_ros
13 {
14  double sum(const geometry_msgs::Point &v);
15  double distance(const geometry_msgs::Point &lhs, const geometry_msgs::Point &rhs);
16 
17  geometry_msgs::Point operator +(const geometry_msgs::Point &lhs, const geometry_msgs::Point &rhs);
18  geometry_msgs::Point operator -(const geometry_msgs::Point &lhs, const geometry_msgs::Point &rhs);
19  geometry_msgs::Point operator *(const geometry_msgs::Point &lhs, const geometry_msgs::Point &rhs);
20  geometry_msgs::Point operator /(const geometry_msgs::Point &lhs, const double rhs);
21 
22  Eigen::Vector3d toEigen(const geometry_msgs::Point &point);
23  Eigen::Vector3d toEigen(const geometry_msgs::Vector3 &vector);
24  Eigen::Quaterniond toEigen(const geometry_msgs::Quaternion &quaternion);
25  Eigen::Affine3d toEigen(const geometry_msgs::Transform &transform);
26  geometry_msgs::Point fromEigen(const Eigen::Vector3d &point);
27  geometry_msgs::Quaternion fromEigen(const Eigen::Quaterniond &quaternion);
28  geometry_msgs::Transform fromEigen(const Eigen::Affine3d &transform);
29 
30  Eigen::Quaterniond lookAt(const Eigen::Vector3d &source_point, const Eigen::Vector3d &dest_point, const Eigen::Vector3d &forward, const Eigen::Vector3d &up);
31 }
32 
33 
34 
35 #endif
36 
37 
astra_ros::operator-
geometry_msgs::Point operator-(const geometry_msgs::Point &lhs, const geometry_msgs::Point &rhs)
Definition: math.cpp:27
astra_ros::distance
double distance(const geometry_msgs::Point &lhs, const geometry_msgs::Point &rhs)
Definition: math.cpp:12
astra_ros::lookAt
Eigen::Quaterniond lookAt(const Eigen::Vector3d &source_point, const Eigen::Vector3d &dest_point, const Eigen::Vector3d &forward, const Eigen::Vector3d &up)
Definition: math.cpp:115
astra_ros::operator/
geometry_msgs::Point operator/(const geometry_msgs::Point &lhs, const double rhs)
Definition: math.cpp:45
astra_ros::operator*
geometry_msgs::Point operator*(const geometry_msgs::Point &lhs, const geometry_msgs::Point &rhs)
Definition: math.cpp:36
astra_ros::operator+
geometry_msgs::Point operator+(const geometry_msgs::Point &lhs, const geometry_msgs::Point &rhs)
Definition: math.cpp:18
astra_ros::fromEigen
geometry_msgs::Point fromEigen(const Eigen::Vector3d &point)
Definition: math.cpp:75
astra_ros::sum
double sum(const geometry_msgs::Point &v)
Definition: math.cpp:7
astra_ros::toEigen
Eigen::Vector3d toEigen(const geometry_msgs::Point &point)
Definition: math.cpp:54
astra_ros
Definition: Device.hpp:14


astra_ros
Author(s): Braden McDorman
autogenerated on Wed Mar 2 2022 00:53:06