simulatedArm.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9 
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 
18 #ifndef _SIMULATED_ARM_H_
19 #define _SIMULATED_ARM_H_
20 
22 #include <vector>
23 #include <string>
24 
25 class simulatedMotor;
26 
28 {
29 public:
30  simulatedArm();
31  virtual ~simulatedArm();
32 
33  bool Init(PowerCubeCtrlParams* params);
34 
35  bool isInitialized() const
36  {
37  return m_Initialized;
38  }
39 
40  std::string getErrorMessage() const
41  {
42  return m_ErrorMessage;
43  }
44 
45  bool Close()
46  {
47  m_Initialized = false;
48  return true;
49  }
50 
52  // Funktionen Arm-Ansteuerung: //
54 
57  bool MoveJointSpaceSync(const std::vector<double>& Angle);
58 
60  bool MovePos(const std::vector<double>&);
62  bool MoveVel(const std::vector<double>&);
63 
65  // bool MoveCur(const std::vector<double>&);
66 
68  bool Stop();
69 
71  // Funktionen zum setzen von Parametern: //
73 
76  bool setMaxVelocity(double radpersec);
77  bool setMaxVelocity(const std::vector<double>& radpersec);
78 
81  bool setMaxAcceleration(double radPerSecSquared);
82  bool setMaxAcceleration(const std::vector<double>& radPerSecSquared);
83 
85  // hier die Funktionen zur Statusabfrage: //
87 
89  bool getConfig(std::vector<double>& result);
90 
92  bool getJointVelocities(std::vector<double>& result);
93 
96  bool statusMoving();
97 
99  bool statusDec();
100 
102  bool statusAcc();
103 
105  // bool doHoming();
106  // bool HomingDone();
107 
109  bool waitForSync()
110  {
111  return true;
112  } // makes no difference in simulation
115  {
116  return true;
117  } // makes no difference in simulation
118 
119 protected:
120  int m_DOF;
122  std::string m_ErrorMessage;
123 
124  std::vector<simulatedMotor> m_motors;
125 
126  std::vector<double> m_maxVel;
127  std::vector<double> m_maxAcc;
128 };
129 
130 #endif
bool statusDec()
Returns true if any of the Joints are decelerating.
virtual ~simulatedArm()
bool Close()
Definition: simulatedArm.h:45
bool getConfig(std::vector< double > &result)
Returns the current Joint Angles.
bool MovePos(const std::vector< double > &)
moves all cubes to the given position
bool setMaxAcceleration(double radPerSecSquared)
Sets the maximum angular acceleration (rad/s^2) for the Joints, use with care! A Value of 0...
bool dontWaitForSync()
Execute move commands immediately from now on:
Definition: simulatedArm.h:114
bool Init(PowerCubeCtrlParams *params)
std::string m_ErrorMessage
Definition: simulatedArm.h:122
bool setMaxVelocity(double radpersec)
Sets the maximum angular velocity (rad/s) for the Joints, use with care! A Value of 0...
bool m_Initialized
Definition: simulatedArm.h:121
std::vector< simulatedMotor > m_motors
Definition: simulatedArm.h:124
bool getJointVelocities(std::vector< double > &result)
Returns the current Angular velocities (Rad/s)
std::string getErrorMessage() const
Definition: simulatedArm.h:40
bool Stop()
current movement currently not supported in simulation
bool isInitialized() const
Definition: simulatedArm.h:35
bool waitForSync()
Waits until all Modules are homed, writes status comments to out.
Definition: simulatedArm.h:109
bool statusMoving()
Returns true if any of the Joints are still moving Should also return true if Joints are accelerating...
bool statusAcc()
Returs true if any of the Joints are accelerating.
bool MoveVel(const std::vector< double > &)
Moves all cubes by the given velocities.
std::vector< double > m_maxVel
Definition: simulatedArm.h:126
std::vector< double > m_maxAcc
Definition: simulatedArm.h:127
bool MoveJointSpaceSync(const std::vector< double > &Angle)
same as MoveJointSpace, but final angles should by reached simultaniously! Returns the time that the ...
Parameters for cob_powercube_chain.


schunk_powercube_chain
Author(s): Florian Weisshardt
autogenerated on Mon Nov 25 2019 03:48:21