PlatformControllerExecutor.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 #include <string>
5 
13 
15 {
16  class ComponentPlugin;
17 }
18 
20 {
21 
22  /**
23  * @brief The PlatformUnitExecutor class
24  *
25  * TODO: Should be renamed to whatever the new unit will be called which takes Mat4f
26  * as input instead of X/Y/Yaw, so that we have a generic interface.
27  */
29  {
30 
31  public:
33 
34  struct Properties
35  {
36  std::string robotName;
38  };
39 
40  PlatformControllerExecutor(ControllerComponentPlugin& controllerComponentPlugin,
41  const Properties& properties);
42  ~PlatformControllerExecutor() override;
43 
44  void execute(const core::LocalTrajectory& trajectory,
45  bool activateController = false) override;
46  void execute(const core::GlobalTrajectory& trajectory,
47  bool activateController = false) override;
48 
49  void start(ControllerType controllerType) override;
50 
51  void ensureIsActive(ControllerType controllerType) override;
52 
53  void stop() override;
54 
55  void updateVelocityLimits(const core::TwistLimits& limits) override;
56 
57 
58  private:
59  ControllerComponentPlugin& controllerPlugin_;
60 
61  const Properties properties_;
62 
63 
66  globalTrajCtrl_;
67 
70  localTrajCtrl_;
71 
74  globalTrajCtrlInitialConfig_;
75 
78  localTrajCtrlInitialConfig_;
79 
80 
81  ControllerType lastActiveController_ = ControllerType::None;
82  };
83 
84 } // namespace armarx::navigation::server
armarx::navigation::core::GlobalTrajectory
Definition: Trajectory.h:70
armarx::navigation::server::PlatformControllerExecutor::PlatformControllerExecutor
PlatformControllerExecutor(ControllerComponentPlugin &controllerComponentPlugin, const Properties &properties)
Definition: PlatformControllerExecutor.cpp:26
armarx::navigation::server::PlatformControllerExecutor::start
void start(ControllerType controllerType) override
Definition: PlatformControllerExecutor.cpp:186
armarx::navigation::server::PlatformControllerExecutor::ensureIsActive
void ensureIsActive(ControllerType controllerType) override
Definition: PlatformControllerExecutor.cpp:210
armarx::navigation::server::PlatformControllerExecutor::Properties::robotName
std::string robotName
Definition: PlatformControllerExecutor.h:36
armarx::navigation::server::PlatformControllerExecutor::stop
void stop() override
Definition: PlatformControllerExecutor.cpp:245
armarx::navigation::server::ExecutorInterface
An executer the server navigator will use to send its control commands to.
Definition: ExecutorInterface.h:12
ExecutorInterface.h
armarx::control::client
This file is part of ArmarX.
Definition: ComponentPlugin.cpp:20
armarx::navigation::common::ControllerType::PlatformGlobalTrajectory
@ PlatformGlobalTrajectory
armarx::navigation::server::PlatformControllerExecutor::execute
void execute(const core::LocalTrajectory &trajectory, bool activateController=false) override
Definition: PlatformControllerExecutor.cpp:144
armarx::navigation::common::ControllerType::PlatformLocalTrajectory
@ PlatformLocalTrajectory
armarx::control::client::ControllerDescription
Definition: ControllerDescription.h:103
armarx::control::client::ControllerWrapper
Wrapper class for an NJointController proxy.
Definition: ControllerWrapper.h:128
armarx::navigation::server::ExecutorInterface::ControllerType::None
@ None
armarx::navigation::server::PlatformControllerExecutor::updateVelocityLimits
void updateVelocityLimits(const core::TwistLimits &limits) override
Definition: PlatformControllerExecutor.cpp:274
armarx::navigation::server::PlatformControllerExecutor::~PlatformControllerExecutor
~PlatformControllerExecutor() override
armarx::navigation::server
This file is part of ArmarX.
Definition: EventPublishingInterface.h:6
armarx::navigation::server::PlatformControllerExecutor::Properties
Definition: PlatformControllerExecutor.h:34
armarx::control::client::ComponentPlugin
Definition: ComponentPlugin.h:68
armarx::navigation::core::TwistLimits
Definition: types.h:80
armarx::navigation::core::LocalTrajectory
Definition: Trajectory.h:170
controller_types.h
armarx::navigation::server::ExecutorInterface::ControllerType
ControllerType
Definition: ExecutorInterface.h:24
armarx::navigation::server::PlatformControllerExecutor::Properties::rtUnitDynamicallyLoadLibraries
bool rtUnitDynamicallyLoadLibraries
Definition: PlatformControllerExecutor.h:37
ComponentPlugin.h
Trajectory.h
controller_descriptions.h
types.h
armarx::navigation::server::PlatformControllerExecutor
The PlatformUnitExecutor class.
Definition: PlatformControllerExecutor.h:28
ControllerWrapper.h