MILDRobotModel.hpp
Go to the documentation of this file.
1 
20 #pragma once
21 
22 #include <boost/tuple/tuple.hpp>
25 #include "geometry_msgs/Pose.h"
26 #include <ros/ros.h>
27 #include <tf/transform_listener.h>
30 
31 namespace robot_model_services {
39  class MILDRobotModel : public RobotModel {
40 
41  protected:
42 
44 
45  // weighting values
46  float mOmegaPan;
47  float mOmegaTilt;
48  float mOmegaRot;
52  float tolerance;
53  float mSigma;
57 
59 
63  std::string mFrameName_map;
64  std::string mFrameName_mild_base;
73 
77  boost::tuple<float, float> mPanLimits;
78 
82  boost::tuple<float, float> mTiltLimits;
83 
87  boost::tuple<float, float> mRotationLimits;
88 
93 
94  public:
99 
103  virtual ~MILDRobotModel();
104 
108  nav_msgs::Path getNavigationPath(const geometry_msgs::Point &sourcePosition, const geometry_msgs::Point &targetPosition, double sourceRotationBase, double targetRotationBase);
109  nav_msgs::Path getNavigationPath(const geometry_msgs::Point &sourcePosition, const geometry_msgs::Point &targetPosition);
110 
116  void setPanAngleLimits(float minAngleDegrees, float maxAngleDegrees);
117 
123  void setTiltAngleLimits(float minAngleDegrees, float maxAngleDegrees);
124 
130  void setRotationAngleLimits(float minAngleDegrees, float maxAngleDegrees);
131 
132  bool isPositionAllowed(const geometry_msgs::Point &position);
133 
134  bool isPoseReachable(const SimpleVector3 &position, const SimpleQuaternion &orientation);
135 
136  bool isPositionReachable(const geometry_msgs::Point &sourcePosition, const geometry_msgs::Point &targetPosition);
137 
141  float getBase_TranslationalMovementCosts(const RobotStatePtr &sourceRobotState, const RobotStatePtr &targetRobotState);
142 
143  float getPTU_TiltMovementCosts(const RobotStatePtr &sourceRobotState, const RobotStatePtr &targetRobotState);
144 
145  float getPTU_PanMovementCosts(const RobotStatePtr &sourceRobotState, const RobotStatePtr &targetRobotState);
146 
147  float getBase_RotationalMovementCosts(const RobotStatePtr &sourceRobotState, const RobotStatePtr &targetRobotState);
148 
149  float getDistance(const geometry_msgs::Point &sourcePosition, const geometry_msgs::Point &targetPosition);
150 
151  //Returns the current pose of the robots base from tf
152  geometry_msgs::Pose getRobotPose();
153  //Returns the current pose of the robots camera from tf
154  geometry_msgs::Pose getCameraPose();
155 
159  geometry_msgs::Pose calculateCameraPose(const RobotStatePtr &sourceRobotState);
160 
161  private:
165  void initMapHelper();
166  };
167 
169 }
bool isPositionReachable(const geometry_msgs::Point &sourcePosition, const geometry_msgs::Point &targetPosition)
boost::shared_ptr< MILDRobotModel > MILDRobotModelPtr
boost::tuple< float, float > mRotationLimits
float getBase_TranslationalMovementCosts(const RobotStatePtr &sourceRobotState, const RobotStatePtr &targetRobotState)
Calculates the movement costs from sourceRobotState to targetRobotState. Returns -1 if pose is not re...
MILDRobotModel implements a model of pan tilt unit robot.
float getBase_RotationalMovementCosts(const RobotStatePtr &sourceRobotState, const RobotStatePtr &targetRobotState)
void setRotationAngleLimits(float minAngleDegrees, float maxAngleDegrees)
sets the angle limits of the rotation angle.
Eigen::Matrix< Precision, 3, 1 > SimpleVector3
Definition: typedef.hpp:50
geometry_msgs::Pose calculateCameraPose(const RobotStatePtr &sourceRobotState)
Uses a given RobotState to calculate the camera frame.
void setPanAngleLimits(float minAngleDegrees, float maxAngleDegrees)
sets the angle limits of the pan angle.
bool isPoseReachable(const SimpleVector3 &position, const SimpleQuaternion &orientation)
nav_msgs::Path getNavigationPath(const geometry_msgs::Point &sourcePosition, const geometry_msgs::Point &targetPosition, double sourceRotationBase, double targetRotationBase)
boost::tuple< float, float > mPanLimits
this namespace contains all generally usable classes.
Definition: DebugHelper.hpp:27
void setTiltAngleLimits(float minAngleDegrees, float maxAngleDegrees)
sets the angle limits of the tilt angle.
float getPTU_TiltMovementCosts(const RobotStatePtr &sourceRobotState, const RobotStatePtr &targetRobotState)
float getDistance(const geometry_msgs::Point &sourcePosition, const geometry_msgs::Point &targetPosition)
boost::tuple< float, float > mTiltLimits
void initMapHelper()
Init MapHelper if it is not initialized yet.
MILDRobotModel()
constructor of the MILDRobotModel
bool isPositionAllowed(const geometry_msgs::Point &position)
virtual ~MILDRobotModel()
destructor of the MILDRobotModel
float getPTU_PanMovementCosts(const RobotStatePtr &sourceRobotState, const RobotStatePtr &targetRobotState)
Eigen::Quaternion< Precision > SimpleQuaternion
Definition: typedef.hpp:64
RobotModel generalizes a robot model.
Definition: RobotModel.hpp:37


asr_robot_model_services
Author(s): Aumann Florian, Borella Jocelyn, Heller Florian, Meißner Pascal, Schleicher Ralf, Stöckle Patrick, Stroh Daniel, Trautmann Jeremias, Walter Milena, Wittenbeck Valerij
autogenerated on Mon Jun 10 2019 12:49:59