MILDRobotModel.hpp
Go to the documentation of this file.
00001 
00020 #pragma once
00021 
00022 #include <boost/tuple/tuple.hpp>
00023 #include "robot_model_services/robot_model/RobotModel.hpp"
00024 #include "robot_model_services/typedef.hpp"
00025 #include "geometry_msgs/Pose.h"
00026 #include <ros/ros.h>
00027 #include <tf/transform_listener.h>
00028 #include "robot_model_services/helper/DebugHelper.hpp"
00029 #include "robot_model_services/helper/MapHelper.hpp"
00030 
00031 namespace robot_model_services {
00039     class MILDRobotModel : public RobotModel {
00040 
00041     protected:
00042 
00043         DebugHelperPtr mDebugHelperPtr;
00044 
00045                 // weighting values
00046                 float mOmegaPan;
00047                 float mOmegaTilt;
00048         float mOmegaRot;
00049                 float speedFactorPTU;
00050                 float speedFactorBaseMove;
00051                 float speedFactorBaseRot;
00052                 float tolerance;
00053         float mSigma;
00054                 bool useGlobalPlanner;
00055         tf::TransformListener listener;
00056         MapHelperPtr mMapHelperPtr;
00057         
00058         ros::NodeHandle n;
00059 
00063         std::string mFrameName_map;
00064         std::string mFrameName_mild_base;
00065         std::string mFrameName_mild_ptu_base_link;
00066         std::string mFrameName_mild_ptu_pan_link;
00067         std::string mFrameName_mild_ptu_pan_link_rotated;
00068         std::string mFrameName_mild_ptu_tilt_link;
00069         std::string mFrameName_mild_ptu_tilt_link_rotated;
00070         std::string mFrameName_mild_camera_mount_link;
00071         std::string mFrameName_mild_camera_left;
00072         std::string mFrameName_mild_camera_right;
00073 
00077                 boost::tuple<float, float> mPanLimits;
00078 
00082                 boost::tuple<float, float> mTiltLimits;
00083 
00087                 boost::tuple<float, float> mRotationLimits;
00088                 
00092                 ros::ServiceClient navigationCostClient;
00093                 
00094         public:
00098         MILDRobotModel();
00099 
00103         virtual ~MILDRobotModel();
00104 
00108          nav_msgs::Path getNavigationPath(const geometry_msgs::Point &sourcePosition, const geometry_msgs::Point &targetPosition, double sourceRotationBase, double targetRotationBase);
00109          nav_msgs::Path getNavigationPath(const geometry_msgs::Point &sourcePosition, const geometry_msgs::Point &targetPosition);
00110 
00116                 void setPanAngleLimits(float minAngleDegrees, float maxAngleDegrees);
00117 
00123                 void setTiltAngleLimits(float minAngleDegrees, float maxAngleDegrees);
00124 
00130                 void setRotationAngleLimits(float minAngleDegrees, float maxAngleDegrees);
00131 
00132         bool isPositionAllowed(const geometry_msgs::Point &position);
00133 
00134                 bool isPoseReachable(const SimpleVector3 &position, const SimpleQuaternion &orientation);
00135                 
00136                 bool isPositionReachable(const geometry_msgs::Point &sourcePosition, const geometry_msgs::Point &targetPosition);
00137 
00141         float getBase_TranslationalMovementCosts(const RobotStatePtr &sourceRobotState, const RobotStatePtr &targetRobotState);
00142 
00143         float getPTU_TiltMovementCosts(const RobotStatePtr &sourceRobotState, const RobotStatePtr &targetRobotState);
00144 
00145         float getPTU_PanMovementCosts(const RobotStatePtr &sourceRobotState, const RobotStatePtr &targetRobotState);
00146 
00147         float getBase_RotationalMovementCosts(const RobotStatePtr &sourceRobotState, const RobotStatePtr &targetRobotState);
00148                 
00149                 float getDistance(const geometry_msgs::Point &sourcePosition, const geometry_msgs::Point &targetPosition);
00150 
00151         //Returns the current pose of the robots base from tf
00152         geometry_msgs::Pose getRobotPose();
00153         //Returns the current pose of the robots camera from tf
00154         geometry_msgs::Pose getCameraPose();
00155 
00159         geometry_msgs::Pose calculateCameraPose(const RobotStatePtr &sourceRobotState);
00160 
00161     private:
00165         void initMapHelper();
00166         };
00167 
00168     typedef boost::shared_ptr<MILDRobotModel> MILDRobotModelPtr;
00169 }


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 Sat Jun 8 2019 18:24:52