JointSimulationDevice.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
32namespace armarx
33{
35
37 virtual public SensorDeviceTemplate<SensorValue1DoFActuator>,
38 virtual public ControlDevice
39 {
40 static const float nullFloat;
41
42 public:
44 {
45 NameValueMap* map;
46 const float* val;
47 const float* sensVal;
48 float* mapVal;
49 void rtRun(const IceUtil::Time&, const IceUtil::Time&) override;
50 };
51
52 template <class TargT>
54 {
56 {
57 }
58
59 TargT targ;
60 const std::string hwMode;
61
64 {
65 return &targ;
66 }
67
68 std::string
69 getHardwareControlMode() const override
70 {
71 return hwMode;
72 }
73 };
74
75 JointSimulationDevice(const std::string& name,
76 NameValueMap& ctrlpos,
77 NameValueMap& ctrlvel,
78 NameValueMap& ctrltor);
79 void rtSetActiveJointController(JointController* jointCtrl) override;
80
86 };
87} // namespace armarx
#define TYPEDEF_PTRS_SHARED(T)
ControlDevice(const std::string &name)
Create a ControlDevice with the given name.
Brief description of class JointControlTargetBase.
The JointController class represents one joint in one control mode.
JointSimController< ControlTarget1DoFActuatorTorque > jointCtrlTor
JointSimController< DummyControlTargetEmergencyStop > jointCtrlESt
JointSimController< ControlTarget1DoFActuatorPosition > jointCtrlPos
JointSimController< DummyControlTargetStopMovement > jointCtrlMSt
JointSimController< ControlTarget1DoFActuatorVelocity > jointCtrlVel
JointSimulationDevice(const std::string &name, NameValueMap &ctrlpos, NameValueMap &ctrlvel, NameValueMap &ctrltor)
void rtSetActiveJointController(JointController *jointCtrl) override
Activates the given JointController for this device.
This file offers overloads of toIce() and fromIce() functions for STL container types.
void rtRun(const IceUtil::Time &, const IceUtil::Time &) override
called when this JointController is run