ControllerConfiguration.cpp
Go to the documentation of this file.
1
#include "
ControllerConfiguration.h
"
2
3
namespace
armarx::control::joint_controller
4
{
5
6
PositionControllerConfigurationPtr
7
PositionControllerConfiguration::CreatePositionControllerConfigData
(
8
hardware_config::Config
& config)
9
{
10
PositionControllerConfiguration
configData;
11
12
configData.
maxVelocityRad
= config.
getFloat
(
"maxVelocityRad"
);
13
configData.
maxAccelerationRad
= config.
getFloat
(
"maxAccelerationRad"
);
14
configData.
maxDecelerationRad
= config.
getFloat
(
"maxDecelerationRad"
);
15
configData.
p
= config.
getFloat
(
"p"
);
16
configData.
accuracy
= config.
getFloat
(
"accuracy"
);
17
configData.
useElmoRelativePositionController
=
18
config.
getBool
(
"useElmoRelativePositionController"
);
19
20
return
std::make_shared<PositionControllerConfiguration>(configData);
21
}
22
23
VelocityControllerConfigurationPtr
24
VelocityControllerConfiguration::CreateVelocityControllerConfigData
(
25
hardware_config::Config
& config)
26
{
27
VelocityControllerConfiguration
configData;
28
29
configData.
maxVelocityRad
= config.
getFloat
(
"maxVelocityRad"
);
30
configData.
maxAccelerationRad
= config.
getFloat
(
"maxAccelerationRad"
);
31
configData.
maxDecelerationRad
= config.
getFloat
(
"maxDecelerationRad"
);
32
33
return
std::make_shared<VelocityControllerConfiguration>(configData);
34
}
35
36
HolonomicPlatformControllerConfigurationPtr
37
HolonomicPlatformControllerConfiguration::CreateHolonomicPlatformControllerConfigData
(
38
hardware_config::Config
& config)
39
{
40
HolonomicPlatformControllerConfiguration
configData;
41
42
configData.
maxVelocity
= config.
getFloat
(
"maxVelocity"
);
43
configData.
maxAcceleration
= config.
getFloat
(
"maxAcceleration"
);
44
configData.
maxDeceleration
= config.
getFloat
(
"maxDeceleration"
);
45
configData.
maxAngularVelocity
= config.
getFloat
(
"maxAngularVelocity"
);
46
configData.
maxAngularAcceleration
= config.
getFloat
(
"maxAngularAcceleration"
);
47
configData.
maxAngularDeceleration
= config.
getFloat
(
"maxAngularDeceleration"
);
48
49
return
std::make_shared<HolonomicPlatformControllerConfiguration>(configData);
50
}
51
52
}
// namespace armarx::control::joint_controller
armarx::control::joint_controller::PositionControllerConfiguration::maxDecelerationRad
float maxDecelerationRad
Definition:
ControllerConfiguration.h:26
armarx::control::joint_controller::HolonomicPlatformControllerConfiguration::CreateHolonomicPlatformControllerConfigData
static HolonomicPlatformControllerConfigurationPtr CreateHolonomicPlatformControllerConfigData(hardware_config::Config &config)
Definition:
ControllerConfiguration.cpp:37
armarx::control::joint_controller::HolonomicPlatformControllerConfiguration::maxAngularAcceleration
float maxAngularAcceleration
Definition:
ControllerConfiguration.h:68
armarx::control::joint_controller::HolonomicPlatformControllerConfiguration::maxAngularVelocity
float maxAngularVelocity
Definition:
ControllerConfiguration.h:67
ControllerConfiguration.h
armarx::control::joint_controller::HolonomicPlatformControllerConfiguration::maxAcceleration
float maxAcceleration
Definition:
ControllerConfiguration.h:65
armarx::control::joint_controller::VelocityControllerConfiguration::maxDecelerationRad
float maxDecelerationRad
Definition:
ControllerConfiguration.h:47
armarx::control::joint_controller::HolonomicPlatformControllerConfiguration::maxDeceleration
float maxDeceleration
Definition:
ControllerConfiguration.h:66
armarx::control::joint_controller::VelocityControllerConfiguration::maxAccelerationRad
float maxAccelerationRad
Definition:
ControllerConfiguration.h:46
armarx::control::joint_controller::PositionControllerConfiguration
Definition:
ControllerConfiguration.h:15
armarx::control::joint_controller::HolonomicPlatformControllerConfiguration::maxAngularDeceleration
float maxAngularDeceleration
Definition:
ControllerConfiguration.h:69
armarx::control::joint_controller::VelocityControllerConfiguration::maxVelocityRad
float maxVelocityRad
Definition:
ControllerConfiguration.h:45
armarx::control::joint_controller::PositionControllerConfiguration::useElmoRelativePositionController
bool useElmoRelativePositionController
Definition:
ControllerConfiguration.h:29
armarx::control::joint_controller::VelocityControllerConfigurationPtr
std::shared_ptr< VelocityControllerConfiguration > VelocityControllerConfigurationPtr
Definition:
ControllerConfiguration.h:34
armarx::control::joint_controller::HolonomicPlatformControllerConfiguration::maxVelocity
float maxVelocity
Definition:
ControllerConfiguration.h:64
armarx::control::joint_controller::PositionControllerConfiguration::accuracy
float accuracy
Definition:
ControllerConfiguration.h:28
armarx::control::joint_controller::PositionControllerConfiguration::p
float p
Definition:
ControllerConfiguration.h:27
armarx::control::joint_controller::PositionControllerConfiguration::maxVelocityRad
float maxVelocityRad
Definition:
ControllerConfiguration.h:24
armarx::control::joint_controller::HolonomicPlatformControllerConfigurationPtr
std::shared_ptr< HolonomicPlatformControllerConfiguration > HolonomicPlatformControllerConfigurationPtr
Definition:
ControllerConfiguration.h:53
armarx::control::joint_controller::HolonomicPlatformControllerConfiguration
Definition:
ControllerConfiguration.h:55
armarx::control::joint_controller::VelocityControllerConfiguration::CreateVelocityControllerConfigData
static VelocityControllerConfigurationPtr CreateVelocityControllerConfigData(hardware_config::Config &config)
Definition:
ControllerConfiguration.cpp:24
armarx::control::hardware_config::Config::getBool
bool getBool(const std::string name)
Get a Bool typed Config attribute by name.
Definition:
Config.cpp:10
armarx::control::joint_controller::VelocityControllerConfiguration
Definition:
ControllerConfiguration.h:36
armarx::control::joint_controller
Definition:
ControllerConfiguration.cpp:3
armarx::control::hardware_config::Config
The Config class is the base class of all specialized configurations that have a direct key -> value ...
Definition:
Config.h:91
armarx::control::joint_controller::PositionControllerConfiguration::maxAccelerationRad
float maxAccelerationRad
Definition:
ControllerConfiguration.h:25
armarx::control::joint_controller::PositionControllerConfiguration::CreatePositionControllerConfigData
static PositionControllerConfigurationPtr CreatePositionControllerConfigData(hardware_config::Config &config)
Definition:
ControllerConfiguration.cpp:7
armarx::control::hardware_config::Config::getFloat
float getFloat(const std::string name)
Get a Float typed Config attribute by name.
Definition:
Config.cpp:16
armarx::control::joint_controller::PositionControllerConfigurationPtr
std::shared_ptr< PositionControllerConfiguration > PositionControllerConfigurationPtr
Definition:
ControllerConfiguration.h:13
armarx
control
joint_controller
ControllerConfiguration.cpp
Generated on Sat Oct 12 2024 09:14:14 for armarx_documentation by
1.8.17