genericArmCtrl.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *   http://www.apache.org/licenses/LICENSE-2.0
00009 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 
00018 #ifndef __GENERIC_ARM_CTRL_V4_H_
00019 #define __GENERIC_ARM_CTRL_V4_H_
00020 
00021 #include "ros/ros.h"
00022 //#include "Manipulation/ManipUtil/Joint.h"
00023 //#include "ManipUtil/datastructsManipulator.h"
00024 //#include "ManipUtil/ManipulatorXML.h"
00025 //#include "Interfaces/KinematicsInterface.h"
00026 //#include "Interfaces/armInterface_ctrl.h"
00027 
00028 #include <trajectory_msgs/JointTrajectory.h>
00029 
00030 #include <cob_trajectory_controller/RefVal_JS.h>
00031 #include <cob_trajectory_controller/TimeStamp.h>
00032 
00033 class genericArmCtrl
00034 {
00035         public:
00036 
00037                 genericArmCtrl(int DOF, double PTPvel = 0.7, double PTPacc = 0.2, double maxError = 0.7);
00038                 ~genericArmCtrl();
00039 
00040                 std::vector<double> GetPTPvel() const;
00041                 std::vector<double> GetPTPacc() const;
00042                 void SetPTPvel(double vel);
00043                 void SetPTPacc(double acc);
00044 
00045                 double overlap_time;
00046 
00047                 // void stop(); --> TODO: better reset
00048 
00049                 bool step(std::vector<double> current_pos, std::vector<double> & desired_vel);
00050 
00051                 bool moveThetas(std::vector<double> conf_goal, std::vector<double> conf_current);
00052                 bool moveTrajectory(trajectory_msgs::JointTrajectory pfad, std::vector<double> conf_current);
00053 
00054 
00055 //              bool movePos(AbsPos position);
00056 
00057                 int m_DOF;
00058 
00059                 RefVal_JS* m_pRefVals;
00060 
00061                 std::vector<double> m_vel_js;
00062                 std::vector<double> last_q;
00063                 std::vector<double> last_q1;
00064                 std::vector<double> last_q2;
00065                 std::vector<double> last_q3;
00066                 std::vector<double> m_acc_js;
00067                 bool isMoving;
00068 
00069                 TimeStamp startTime_;
00070                 double TotalTime_;
00071                 double m_P;
00072                 double m_Vorsteuer;
00073                 double m_AllowedError;
00074                 double m_CurrentError;
00075                 double m_TargetError;
00076                 double m_ExtraTime;     // Zusätzliche Zeit, um evtl. verbleibende Regelfehler auszuregeln
00077 };
00078 
00079 
00080 
00081 #endif


cob_trajectory_controller
Author(s): Alexander Bubeck
autogenerated on Thu Jun 6 2019 21:19:22