PlatformControllerExecutor.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <RobotAPI/interface/units/RobotUnit/RobotUnitInterface.h>
4 
10 
12 {
13  class ComponentPlugin;
14 }
15 
17 {
18 
19  /**
20  * @brief The PlatformUnitExecutor class
21  *
22  * TODO: Should be renamed to whatever the new unit will be called which takes Mat4f
23  * as input instead of X/Y/Yaw, so that we have a generic interface.
24  */
26  {
27 
28  public:
30 
31  struct Properties
32  {
33  std::string robotName;
35  };
36 
37  PlatformControllerExecutor(ControllerComponentPlugin& controllerComponentPlugin, const Properties& properties);
38  ~PlatformControllerExecutor() override;
39 
40  void execute(const core::LocalTrajectory& trajectory, bool activateController = false) override;
41  void execute(const core::GlobalTrajectory& trajectory, bool activateController = false) override;
42 
43  void start(ControllerType controllerType) override;
44 
45  void ensureIsActive(ControllerType controllerType) override;
46 
47  void stop() override;
48 
49  private:
50  ControllerComponentPlugin& controllerPlugin_;
51 
52  const Properties properties_;
53 
56  localTrajCtrl_;
57 
60  globalTrajCtrl_;
61 
62 
63 
64 
65  ControllerType lastActiveController_ = ControllerType::None;
66  };
67 
68 } // namespace armarx::navigation::server
armarx::navigation::core::GlobalTrajectory
Definition: Trajectory.h:68
armarx::navigation::server::PlatformControllerExecutor::PlatformControllerExecutor
PlatformControllerExecutor(ControllerComponentPlugin &controllerComponentPlugin, const Properties &properties)
Definition: PlatformControllerExecutor.cpp:23
armarx::navigation::server::PlatformControllerExecutor::start
void start(ControllerType controllerType) override
Definition: PlatformControllerExecutor.cpp:165
armarx::navigation::server::PlatformControllerExecutor::ensureIsActive
void ensureIsActive(ControllerType controllerType) override
Definition: PlatformControllerExecutor.cpp:190
armarx::navigation::server::PlatformControllerExecutor::Properties::robotName
std::string robotName
Definition: PlatformControllerExecutor.h:33
armarx::navigation::server::PlatformControllerExecutor::stop
void stop() override
Definition: PlatformControllerExecutor.cpp:225
armarx::navigation::server::ExecutorInterface
An executer the server navigator will use to send its control commands to.
Definition: ExecutorInterface.h:11
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:123
armarx::navigation::common::ControllerType::PlatformLocalTrajectory
@ PlatformLocalTrajectory
armarx::control::client::ControllerWrapper
Wrapper class for an NJointController proxy.
Definition: ControllerWrapper.h:127
armarx::navigation::server::ExecutorInterface::ControllerType::None
@ None
armarx::navigation::server::PlatformControllerExecutor::~PlatformControllerExecutor
~PlatformControllerExecutor() override
armarx::navigation::server
This file is part of ArmarX.
Definition: EventPublishingInterface.h:10
armarx::navigation::server::PlatformControllerExecutor::Properties
Definition: PlatformControllerExecutor.h:31
armarx::control::client::ComponentPlugin
Definition: ComponentPlugin.h:69
armarx::navigation::core::LocalTrajectory
Definition: Trajectory.h:167
controller_types.h
armarx::navigation::server::ExecutorInterface::ControllerType
ControllerType
Definition: ExecutorInterface.h:21
armarx::navigation::server::PlatformControllerExecutor::Properties::rtUnitDynamicallyLoadLibraries
bool rtUnitDynamicallyLoadLibraries
Definition: PlatformControllerExecutor.h:34
ComponentPlugin.h
controller_descriptions.h
types.h
armarx::navigation::server::PlatformControllerExecutor
The PlatformUnitExecutor class.
Definition: PlatformControllerExecutor.h:25