pose_helper.hpp
Go to the documentation of this file.
1 
18 #pragma once
19 
20 #include <ros/ros.h>
21 #include <math.h>
22 #include <boost/shared_ptr.hpp>
23 #include <eigen3/Eigen/Geometry>
24 
25 #include "geometry_msgs/Pose.h"
26 
27 namespace world_model {
28 
29 class PoseHelper {
30 
31 private:
33 
34  Eigen::Quaterniond convertPoseQuatToQuat(const geometry_msgs::Pose &pose) {
35  return Eigen::Quaterniond(pose.orientation.w, pose.orientation.x, pose.orientation.y, pose.orientation.z);
36  }
37 
38  PoseHelper();
39 
40 public:
41 
43  static void resetInstance();
44 
45  double calcDistancePositionEucl(const geometry_msgs::Pose &pose1, const geometry_msgs::Pose &pose2);
46  double calcAngularDistanceInRad(const geometry_msgs::Pose &pose1, const geometry_msgs::Pose &pose2);
47 
48  bool checkPosesAreApproxEquale(const geometry_msgs::Pose &pose1, const geometry_msgs::Pose &pose2, const double position_threshold, const double orientation_rad_threshold);
49  bool checkPositionsAreApproxEquale(const geometry_msgs::Pose &pose1, const geometry_msgs::Pose &pose2, const double position_threshold);
50  bool checkOrientationsAreApproxEquale(const geometry_msgs::Pose &pose1, const geometry_msgs::Pose &pose2, const double orientation_rad_threshold);
51 
52 };
53 
55 
56 }
57 
58 
59 
60 
61 
62 
63 
static void resetInstance()
Definition: pose_helper.cpp:32
bool checkOrientationsAreApproxEquale(const geometry_msgs::Pose &pose1, const geometry_msgs::Pose &pose2, const double orientation_rad_threshold)
Definition: pose_helper.cpp:67
static boost::shared_ptr< PoseHelper > getInstance()
Definition: pose_helper.cpp:24
double calcDistancePositionEucl(const geometry_msgs::Pose &pose1, const geometry_msgs::Pose &pose2)
Definition: pose_helper.cpp:42
static boost::shared_ptr< PoseHelper > instance_ptr_
Definition: pose_helper.hpp:32
Eigen::Quaterniond convertPoseQuatToQuat(const geometry_msgs::Pose &pose)
Definition: pose_helper.hpp:34
bool checkPositionsAreApproxEquale(const geometry_msgs::Pose &pose1, const geometry_msgs::Pose &pose2, const double position_threshold)
Definition: pose_helper.cpp:62
bool checkPosesAreApproxEquale(const geometry_msgs::Pose &pose1, const geometry_msgs::Pose &pose2, const double position_threshold, const double orientation_rad_threshold)
Definition: pose_helper.cpp:56
boost::shared_ptr< PoseHelper > PoseHelperPtr
Definition: pose_helper.hpp:54
double calcAngularDistanceInRad(const geometry_msgs::Pose &pose1, const geometry_msgs::Pose &pose2)
Definition: pose_helper.cpp:48


asr_world_model
Author(s): Aumann Florian, Borella Jocelyn, Hutmacher Robin, Karrenbauer Oliver, Meißner Pascal, Schleicher Ralf, Stöckle Patrick, Trautmann Jeremias
autogenerated on Thu Jan 9 2020 07:20:01