PlatformSimulationDevice.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package ArmarXSimulation::ArmarXObjects::RobotUnitSimulation
17  * @author Raphael Grimm ( raphael dot grimm at kit dot edu )
18  * @date 2017
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #pragma once
24 
31 
32 namespace armarx
33 {
34  TYPEDEF_PTRS_SHARED(PlatformSimulationDevice);
35 
37  virtual public SensorDeviceTemplate<SensorValueHolonomicPlatform>,
38  virtual public ControlDevice
39  {
40  public:
42  {
44 
45  void
46  rtRun(const IceUtil::Time&, const IceUtil::Time&) override
47  {
48  }
49 
51  getControlTarget() override
52  {
53  return target;
54  }
55 
56  std::string
57  getHardwareControlMode() const override
58  {
59  return "Platform_Velocity";
60  }
61  };
62 
64  {
66  void rtRun(const IceUtil::Time&, const IceUtil::Time&) override;
67 
69  getControlTarget() override
70  {
71  return target;
72  }
73 
74  const std::string&
75  getControlMode() const override
76  {
77  return ControlModes::EmergencyStop;
78  }
79 
80  bool
81  rtIsTargetValid() const override
82  {
83  return true;
84  }
85 
86  std::string
87  getHardwareControlMode() const override
88  {
89  return "Platform_Velocity";
90  }
91  };
92 
94  {
96  void rtRun(const IceUtil::Time&, const IceUtil::Time&) override;
97 
99  getControlTarget() override
100  {
101  return target;
102  }
103 
104  const std::string&
105  getControlMode() const override
106  {
107  return ControlModes::StopMovement;
108  }
109 
110  bool
111  rtIsTargetValid() const override
112  {
113  return true;
114  }
115 
116  std::string
117  getHardwareControlMode() const override
118  {
119  return "Platform_Velocity";
120  }
121  };
122 
123  PlatformSimulationDevice(const std::string& name);
124 
126 
130 
134  };
135 } // namespace armarx
armarx::ControlTargetHolonomicPlatformVelocity
Brief description of class ControlTargetHolonomicPlatformVelocity.
Definition: ControlTargetHolonomicPlatformVelocity.h:38
armarx::PlatformSimulationDevice::jointStopMovCtrl
JointStopMovementController jointStopMovCtrl
Definition: PlatformSimulationDevice.h:133
armarx::SensorDeviceTemplate
Definition: SensorDevice.h:111
SensorDevice.h
SensorValueHolonomicPlatform.h
armarx::ControlTargetBase
Brief description of class JointControlTargetBase.
Definition: ControlTargetBase.h:47
armarx::ControlDevice
The ControlDevice class represents a logical unit accepting commands via its JointControllers.
Definition: ControlDevice.h:63
armarx::PlatformSimulationDevice::JointVelocityController::target
ControlTargetHolonomicPlatformVelocity * target
Definition: PlatformSimulationDevice.h:43
armarx::PlatformSimulationDevice::JointEmergencyStopController::rtIsTargetValid
bool rtIsTargetValid() const override
Definition: PlatformSimulationDevice.h:81
armarx::PlatformSimulationDevice::JointEmergencyStopController
Definition: PlatformSimulationDevice.h:63
armarx::PlatformSimulationDevice::JointEmergencyStopController::getHardwareControlMode
std::string getHardwareControlMode() const override
Definition: PlatformSimulationDevice.h:87
armarx::JointController
The JointController class represents one joint in one control mode.
Definition: JointController.h:51
armarx::PlatformSimulationDevice::JointEmergencyStopController::getControlTarget
ControlTargetBase * getControlTarget() override
Definition: PlatformSimulationDevice.h:69
armarx::PlatformSimulationDevice::jointEmergencyCtrl
JointEmergencyStopController jointEmergencyCtrl
Definition: PlatformSimulationDevice.h:132
armarx::PlatformSimulationDevice::target
ControlTargetHolonomicPlatformVelocity target
Definition: PlatformSimulationDevice.h:125
armarx::PlatformSimulationDevice::PlatformSimulationDevice
PlatformSimulationDevice(const std::string &name)
Definition: PlatformSimulationDevice.cpp:24
armarx::PlatformSimulationDevice::JointStopMovementController
Definition: PlatformSimulationDevice.h:93
armarx::PlatformSimulationDevice
Definition: PlatformSimulationDevice.h:36
armarx::TYPEDEF_PTRS_SHARED
TYPEDEF_PTRS_SHARED(ControlDevice)
armarx::PlatformSimulationDevice::JointStopMovementController::getControlTarget
ControlTargetBase * getControlTarget() override
Definition: PlatformSimulationDevice.h:99
armarx::PlatformSimulationDevice::JointVelocityController::getControlTarget
ControlTargetBase * getControlTarget() override
Definition: PlatformSimulationDevice.h:51
armarx::PlatformSimulationDevice::initAbsolutePositionY
float initAbsolutePositionY
Definition: PlatformSimulationDevice.h:128
ControlDevice.h
armarx::PlatformSimulationDevice::jointVel
JointVelocityController jointVel
Definition: PlatformSimulationDevice.h:131
armarx::PlatformSimulationDevice::JointStopMovementController::rtIsTargetValid
bool rtIsTargetValid() const override
Definition: PlatformSimulationDevice.h:111
armarx::PlatformSimulationDevice::JointVelocityController
Definition: PlatformSimulationDevice.h:41
ControlModes.h
armarx::PlatformSimulationDevice::JointEmergencyStopController::target
ControlTargetHolonomicPlatformVelocity * target
Definition: PlatformSimulationDevice.h:65
armarx::PlatformSimulationDevice::JointEmergencyStopController::getControlMode
const std::string & getControlMode() const override
Definition: PlatformSimulationDevice.h:75
armarx::PlatformSimulationDevice::initAbsolutePositionX
float initAbsolutePositionX
Definition: PlatformSimulationDevice.h:127
armarx::PlatformSimulationDevice::JointStopMovementController::getControlMode
const std::string & getControlMode() const override
Definition: PlatformSimulationDevice.h:105
armarx::PlatformSimulationDevice::initAbsolutePositionRotation
float initAbsolutePositionRotation
Definition: PlatformSimulationDevice.h:129
armarx::PlatformSimulationDevice::JointStopMovementController::target
ControlTargetHolonomicPlatformVelocity * target
Definition: PlatformSimulationDevice.h:95
armarx::armem::Time
armarx::core::time::DateTime Time
Definition: forward_declarations.h:13
ControlTargetHolonomicPlatformVelocity.h
armarx::PlatformSimulationDevice::JointStopMovementController::rtRun
void rtRun(const IceUtil::Time &, const IceUtil::Time &) override
called when this JointController is run
Definition: PlatformSimulationDevice.cpp:45
armarx::PlatformSimulationDevice::JointVelocityController::getHardwareControlMode
std::string getHardwareControlMode() const override
Definition: PlatformSimulationDevice.h:57
JointController.h
armarx::PlatformSimulationDevice::JointStopMovementController::getHardwareControlMode
std::string getHardwareControlMode() const override
Definition: PlatformSimulationDevice.h:117
armarx::PlatformSimulationDevice::JointVelocityController::rtRun
void rtRun(const IceUtil::Time &, const IceUtil::Time &) override
called when this JointController is run
Definition: PlatformSimulationDevice.h:46
armarx::PlatformSimulationDevice::JointEmergencyStopController::rtRun
void rtRun(const IceUtil::Time &, const IceUtil::Time &) override
called when this JointController is run
Definition: PlatformSimulationDevice.cpp:36
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27