22 #include <boost/shared_ptr.hpp> 23 #include <eigen3/Eigen/Geometry> 25 #include "asr_robot_model_services/GetDistance.h" 26 #include "asr_robot_model_services/GetPose.h" 27 #include "asr_robot_model_services/RobotStateMessage.h" 29 #define RAD_TO_DEG 180.0 / M_PI 30 #define DEG_TO_RAD M_PI / 180.0 58 return Eigen::Vector3d(pose.position.x, pose.position.y, pose.position.z);
62 geometry_msgs::Pose pose;
63 pose.position.x = vec[0];
64 pose.position.y = vec[1];
65 pose.position.z = vec[2];
70 return Eigen::Quaterniond(pose.orientation.w, pose.orientation.x, pose.orientation.y, pose.orientation.z);
74 geometry_msgs::Pose origin;
75 origin.position.x = 0;
76 origin.position.y = 0;
77 origin.position.z = 0;
78 origin.orientation.x = 0;
79 origin.orientation.y = 0;
80 origin.orientation.z = 0;
81 origin.orientation.w = 1;
96 double calculateDistance(
const geometry_msgs::Pose &pose1,
const geometry_msgs::Pose &pose2);
101 bool checkPosesAreApproxEquale(
const geometry_msgs::Pose &pose1,
const geometry_msgs::Pose &pose2,
const double positionThreshold,
const double orientationRadThreshold);
geometry_msgs::Pose getCurrentRobotPose()
bool checkViewCenterPointsAreApproxEquale(const geometry_msgs::Pose &pose1, const geometry_msgs::Pose &pose2)
static double viewCenterPositionDistanceThreshold
geometry_msgs::Pose convertVecToPosition(const Eigen::Vector3d &vec)
double calcAngularDistanceInRad(const geometry_msgs::Pose &pose1, const geometry_msgs::Pose &pose2)
double calcDistPositionEucl(const geometry_msgs::Pose &pose1, const geometry_msgs::Pose &pose2)
static T waitForParam(ros::NodeHandle n, std::string param)
static int distanceFuncParam
double calcDistPositionWithNBV(const geometry_msgs::Pose &pose1, const geometry_msgs::Pose &pose2)
geometry_msgs::Pose getOriginPose()
static void resetInstance()
static double viewPointDistance
boost::shared_ptr< PoseHelper > PoseHelperPtr
Eigen::Vector3d calculateViewCenterPoint(const geometry_msgs::Pose &pose)
geometry_msgs::Pose getCurrentCameraPose()
ros::ServiceClient getDistanceServiceClient
bool checkPositionsAreApproxEquale(const geometry_msgs::Pose &pose1, const geometry_msgs::Pose &pose2, const double positionThreshold)
static boost::shared_ptr< PoseHelper > getInstance()
bool checkPosesAreApproxEquale(const geometry_msgs::Pose &pose1, const geometry_msgs::Pose &pose2, const double positionThreshold, const double orientationRadThreshold)
Eigen::Quaterniond convertPoseQuatToQuat(const geometry_msgs::Pose &pose)
ros::ServiceClient getCameraPoseServiceClient
bool checkOrientationsAreApproxEquale(const geometry_msgs::Pose &pose1, const geometry_msgs::Pose &pose2, const double orientationRadThreshold)
Eigen::Vector3d convertPositionToVec(const geometry_msgs::Pose &pose)
double calculateDistance(const geometry_msgs::Pose &pose1, const geometry_msgs::Pose &pose2)
ros::ServiceClient getRobotPoseServiceClient
static double viewCenterOrientationRadDistanceThreshold
static boost::shared_ptr< PoseHelper > instancePtr