SwitchCoordinationMode.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include <RobotAPI/interface/units/KinematicUnitInterface.h>
10
12#include <armarx/control/skills/aron/SwitchCoordinationModeParams.aron.generated.h>
14
16{
17
18 /**
19 * @class SwitchCoordinationMode
20 * @brief SwitchCoordinationMode-skill to switch coordination mode
21 *
22 * Switch coordination mode for the task space bimanual controller.
23 */
25 public ::armarx::skills::SimpleSpecializedSkill<arondto::SwitchCoordinationModeParams>
26 {
27
28 public:
33
34 static ::armarx::skills::SkillDescription
36 {
37 ParamType defaultParameters;
38 defaultParameters.configPackageName = "armarx_control";
39 defaultParameters.configRelPath = "controller_config/coordination/sync_transport.json";
40 defaultParameters.controllerNamePattern =
41 std::vector<std::string>{"LeftArm,RightArm", "TSMixImpVelCol"};
42 defaultParameters.enable = true;
43
44 return ::armarx::skills::SkillDescription{
45 .skillId = {.skillName = constants::SWITCH_COORDINATION_MODE},
46 .description = "Switch coordination mode in the controller",
47 .rootProfileDefaults = defaultParameters.toAron(),
48 .timeout = ::armarx::Duration::Minutes(1),
49 .parametersType = ParamType::ToAronType()};
50 }
51
52 SwitchCoordinationMode(const Services&);
53
54
55 std::vector<std::string>
56 filterControllerNames(const std::vector<std::string>& controllerNames,
57 const std::vector<std::string>& patterns);
58
59 private:
60 using Base::exit;
61 using Base::main;
62
63 ::armarx::skills::Skill::MainResult main(const SpecializedMainInput& in) override;
64 ::armarx::skills::Skill::ExitResult exit(const SpecializedExitInput& in) override;
65
66
67 private:
68 Services srv_;
69 };
70
71} // namespace armarx::control::skills::skills
static Duration Minutes(std::int64_t minutes)
Constructs a duration in minutes.
Definition Duration.cpp:96
std::vector< std::string > filterControllerNames(const std::vector< std::string > &controllerNames, const std::vector< std::string > &patterns)
virtual MainResult main()
Override this method with the actual implementation.
Definition Skill.cpp:542
virtual ExitResult exit()
Override this method with the actual implementation.
Definition Skill.cpp:535
::armarx::control::client::ComponentPlugin * controlComponentPluginUser
A result struct for skill exit function.
Definition Skill.h:69
A result struct for th main method of a skill.
Definition Skill.h:62