Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #include <telekyb_calculus/Potentials/CoTanPotentialFunctions.hpp>
00010
00011 #include <telekyb_base/TeleKyb.hpp>
00012
00013 #include <telekyb_base/Options/RawOptionsContainer.hpp>
00014
00015 using namespace telekyb;
00016
00017 #define LOWER_BOUND 1.0
00018 #define UPPER_BOUND 7.0
00019
00020 int main(int argc, char **argv) {
00021 TeleKyb::init(argc,argv,"TestCalculus");
00022
00023 telekyb::RawOptionsContainer::addOption("RepGradient/tPotFuncZeroD","3");
00024 telekyb::RawOptionsContainer::addOption("RepGradient/tPotFuncInfD","5");
00025 telekyb::RawOptionsContainer::addOption("RepGradient/tPotFuncSatValue","100");
00026 telekyb::RawOptionsContainer::addOption("RepGradient/tPotFuncGain","1");
00027
00028 CoTanRepulsiveGradient funcRep("RepGradient");
00029 CoTanAttractiveGradient funcAttr("AttrGradient", 2,6,10,1);
00030
00031
00032
00033
00034
00035
00036
00037 double d = LOWER_BOUND;
00038 while(ros::ok()) {
00039
00040 ROS_INFO("Value: %f, RepGradient: %f",d, funcRep.getPotential(d));
00041 ROS_INFO("Value: %f, AttGradient: %f",d, funcAttr.getPotential(d));
00042
00043 d += 0.1;
00044 if (d > UPPER_BOUND) {
00045 d = LOWER_BOUND;
00046 }
00047
00048 usleep(1000*100);
00049 }
00050
00051
00052 TeleKyb::shutdown();
00053 return 0;
00054 }
00055
00056
00057
00058
00059
00060
00061
00062
00063