simulatedArm.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 _SIMULATED_ARM_H_
00019 #define _SIMULATED_ARM_H_
00020 
00021 #include <schunk_powercube_chain/PowerCubeCtrl.h>
00022 #include <vector>
00023 #include <string>
00024 
00025 class simulatedMotor;
00026 
00027 class simulatedArm
00028 {
00029 public:
00030   simulatedArm();
00031   virtual ~simulatedArm();
00032 
00033   bool Init(PowerCubeCtrlParams* params);
00034 
00035   bool isInitialized() const
00036   {
00037     return m_Initialized;
00038   }
00039 
00040   std::string getErrorMessage() const
00041   {
00042     return m_ErrorMessage;
00043   }
00044 
00045   bool Close()
00046   {
00047     m_Initialized = false;
00048     return true;
00049   }
00050 
00052   // Funktionen Arm-Ansteuerung: //
00054 
00057   bool MoveJointSpaceSync(const std::vector<double>& Angle);
00058 
00060   bool MovePos(const std::vector<double>&);
00062   bool MoveVel(const std::vector<double>&);
00063 
00065   //  bool MoveCur(const std::vector<double>&);
00066 
00068   bool Stop();
00069 
00071   // Funktionen zum setzen von Parametern: //
00073 
00076   bool setMaxVelocity(double radpersec);
00077   bool setMaxVelocity(const std::vector<double>& radpersec);
00078 
00081   bool setMaxAcceleration(double radPerSecSquared);
00082   bool setMaxAcceleration(const std::vector<double>& radPerSecSquared);
00083 
00085   // hier die Funktionen zur Statusabfrage: //
00087 
00089   bool getConfig(std::vector<double>& result);
00090 
00092   bool getJointVelocities(std::vector<double>& result);
00093 
00096   bool statusMoving();
00097 
00099   bool statusDec();
00100 
00102   bool statusAcc();
00103 
00105   // bool doHoming();
00106   // bool HomingDone();
00107 
00109   bool waitForSync()
00110   {
00111     return true;
00112   }  // makes no difference in simulation
00114   bool dontWaitForSync()
00115   {
00116     return true;
00117   }  // makes no difference in simulation
00118 
00119 protected:
00120   int m_DOF;
00121   bool m_Initialized;
00122   std::string m_ErrorMessage;
00123 
00124   std::vector<simulatedMotor> m_motors;
00125 
00126   std::vector<double> m_maxVel;
00127   std::vector<double> m_maxAcc;
00128 };
00129 
00130 #endif


schunk_powercube_chain
Author(s): Florian Weisshardt
autogenerated on Sat Jun 8 2019 20:25:18