00001 /* 00002 * ObstacleAvoidancePotential.hpp 00003 * 00004 * Created on: Dec 14, 2011 00005 * Author: mriedel 00006 */ 00007 00008 #ifndef OBSTACLEAVOIDANCEPOTENTIAL_HPP_ 00009 #define OBSTACLEAVOIDANCEPOTENTIAL_HPP_ 00010 00011 #include <telekyb_defines/telekyb_defines.hpp> 00012 00013 #include <telekyb_base/Options.hpp> 00014 #include <telekyb_base/Spaces.hpp> 00015 00016 #include <telekyb_calculus/Potentials/CoTanPotentialFunctions.hpp> 00017 00018 namespace TELEKYB_NAMESPACE { 00019 00020 class ObstacleAvoidancePotentialOptions : public OptionContainer 00021 { 00022 public: 00023 Option<Vector3D>* tObsAPUavSemiDims; 00024 // Option<double>* tObsAPRepulMaxDist; 00025 // Option<double>* tObsAPRepulMinDist; 00026 // Option<double>* tObsAPRepulGain; 00027 // Option<double>* tObsAPSaturationVel; 00028 // Option<double>* tObsAPSaturationAcc; 00029 00030 ObstacleAvoidancePotentialOptions(const std::string& identifier_); 00031 }; 00032 00033 class ObstacleAvoidancePotential { 00034 protected: 00035 ObstacleAvoidancePotentialOptions options; 00036 // Repulsive Functions 00037 CoTanRepulsiveGradient* obstaclePotentialGradient; 00038 00039 double getEffectiveUAVDistance(const Position3D& relObstaclePositon) const; 00040 00041 public: 00042 ObstacleAvoidancePotential(const std::string& identifier_); 00043 virtual ~ObstacleAvoidancePotential(); 00044 // Beware! Eigen in Containers can be dangerous. Position3D is no Problem, though. 00045 Velocity3D getObstacleVelocity(const Position3D& currentPosition, const std::vector< Position3D >& obstaclePoints); 00046 // Velocity3D getObstacleAcceleration(const Position3D& currentPosition, const std::vector< Position3D >& obstaclePoints); 00047 }; 00048 00049 } /* namespace telekyb */ 00050 #endif /* OBSTACLEAVOIDANCEPOTENTIAL_HPP_ */