HapticUnitDynamicSimulation.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package
19  * @author
20  * @date
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 #pragma once
25 
27 
29 
30 #include <ArmarXSimulation/interface/simulator/SimulatorInterface.h>
31 
32 namespace armarx
33 {
35  {
36  public:
39  {
40  defineOptionalProperty<std::string>(
41  "SimulatorName",
42  "Simulator",
43  "Name of the simulator component that should be used");
44  defineOptionalProperty<std::string>(
45  "RobotNodes",
46  "Index R J1, Middle R J1",
47  "Comma separated list of robot nodes that are used to determine contact "
48  "information (RobotNodes must own a collision model)");
49  defineOptionalProperty<std::string>("EnvironmentObjects",
50  "Vitalis",
51  "Comma separated list of world objects that are "
52  "used to determine contact information");
53  defineOptionalProperty<std::string>("RobotName", "Armar3", "Name of the robot to use.");
54  }
55  };
56 
57  class HapticUnitDynamicSimulation : virtual public HapticUnit
58  {
59  // HapticUnit interface
60  public:
61  virtual std::string
63  {
64  return "HapticUnitDynamicSimulation";
65  }
66 
67  void onInitHapticUnit() override;
68  void onStartHapticUnit() override;
69  void onExitHapticUnit() override;
70 
72 
73  private:
75  void frameAcquisitionTaskLoop();
76  std::vector<std::string> getCommaSeparatedProperty(std::string propertyName);
77 
78  SimulatorInterfacePrx simulatorProxy;
79  std::vector<std::string> robotNodeNames;
80  std::vector<std::string> environmentObjectNames;
81  std::string robotName;
82 
83  DebugDrawerInterfacePrx debugDrawerPrx;
84  };
85 } // namespace armarx
armarx::HapticUnitPropertyDefinitions
Definition: HapticUnit.h:42
armarx::HapticUnit
The HapticUnit class.
Definition: HapticUnit.h:62
armarx::HapticUnitDynamicSimulation::onStartHapticUnit
void onStartHapticUnit() override
Definition: HapticUnitDynamicSimulation.cpp:53
HapticUnit.h
armarx::HapticUnitDynamicSimulation::createPropertyDefinitions
PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: HapticUnitDynamicSimulation.cpp:71
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:345
RunningTask.h
armarx::HapticUnitDynamicSimulationPropertyDefinitions::HapticUnitDynamicSimulationPropertyDefinitions
HapticUnitDynamicSimulationPropertyDefinitions(std::string prefix)
Definition: HapticUnitDynamicSimulation.h:37
armarx::HapticUnitDynamicSimulation
Definition: HapticUnitDynamicSimulation.h:57
armarx::HapticUnitDynamicSimulation::onExitHapticUnit
void onExitHapticUnit() override
Definition: HapticUnitDynamicSimulation.cpp:65
armarx::HapticUnitDynamicSimulation::onInitHapticUnit
void onInitHapticUnit() override
Definition: HapticUnitDynamicSimulation.cpp:36
IceUtil::Handle
Definition: forward_declarations.h:30
IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface >
armarx::HapticUnitDynamicSimulationPropertyDefinitions
Definition: HapticUnitDynamicSimulation.h:34
armarx::HapticUnitDynamicSimulation::getDefaultName
virtual std::string getDefaultName()
Definition: HapticUnitDynamicSimulation.h:62
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27