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
32namespace armarx
33{
35 {
36 public:
39 {
41 "SimulatorName",
42 "Simulator",
43 "Name of the simulator component that should be used");
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
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
PropertyDefinitionsPtr createPropertyDefinitions() override
HapticUnitPropertyDefinitions(std::string prefix)
Definition HapticUnit.h:45
The HapticUnit class.
Definition HapticUnit.h:63
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
IceUtil::Handle< RunningTask< T > > pointer_type
Shared pointer type for convenience.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface > DebugDrawerInterfacePrx