EnvironmentController.h
Go to the documentation of this file.
1 #ifndef ENVIRONMENTCONTROLLER_H
2 #define ENVIRONMENTCONTROLLER_H
3 #include "AbstractController.h"
4 #include "../Environment.h"
5 #include <RobotAPI/interface/core/RobotState.h>
6 
7 namespace armarx
8 {
10  {
11  Q_OBJECT
12 
13  public:
14  /**
15  * @brief @see AbstractController
16  */
17  void onInitComponent() override;
18 
19  /**
20  * @brief @see AbstractController
21  */
22  void onConnectComponent() override;
23 
24  /**
25  * @brief @see AbstractController
26  */
27  void onDisconnectComponent() override;
28 
29  /**
30  * @brief @see AbstractController
31  */
32  void onExitComponent() override;
33 
34  /**
35  * @brief loads first armar3 in the application
36  */
37  void loadArmar3();
38 
39  /**
40  * @brief loads the robot from proxy
41  * @param robotFileName file name of the robot
42  */
43  void loadRobotFromProxy(std::string robotFileName);
44 
46 
47  public slots:
48  /**
49  * @brief open a file dialog to select a robot
50  */
51  void openRobotFileDialog();
52 
53  signals:
54  /**
55  * @brief notifies all controller that the environment has changed
56  * @param environment
57  */
58  void environmentChanged(EnvironmentPtr environment);
59 
60  protected:
62 
63  private:
64  VirtualRobot::RobotPtr loadRobot(Ice::StringSeq includePaths);
65  EnvironmentPtr environment;
66  };
67 
68  using EnvironmentControllerPtr = std::shared_ptr<EnvironmentController>;
69 }
70 
71 #endif // ENVIRONMENTCONTROLLER_H
armarx::EnvironmentControllerPtr
std::shared_ptr< EnvironmentController > EnvironmentControllerPtr
Definition: EnvironmentController.h:68
armarx::EnvironmentController::onExitComponent
void onExitComponent() override
Definition: EnvironmentController.cpp:30
armarx::EnvironmentPtr
std::shared_ptr< Environment > EnvironmentPtr
Definition: Environment.h:29
armarx::EnvironmentController::robotStateComponentPrx
RobotStateComponentInterfacePrx robotStateComponentPrx
Definition: EnvironmentController.h:61
armarx::EnvironmentController::environmentChanged
void environmentChanged(EnvironmentPtr environment)
notifies all controller that the environment has changed
AbstractController.h
armarx::EnvironmentController
Definition: EnvironmentController.h:9
armarx::EnvironmentController::onInitComponent
void onInitComponent() override
Definition: EnvironmentController.cpp:14
armarx::EnvironmentController::openRobotFileDialog
void openRobotFileDialog()
open a file dialog to select a robot
Definition: EnvironmentController.cpp:63
armarx::EnvironmentController::loadArmar3
void loadArmar3()
loads first armar3 in the application
Definition: EnvironmentController.cpp:35
armarx::EnvironmentController::loadRobotFromProxy
void loadRobotFromProxy(std::string robotFileName)
loads the robot from proxy
Definition: EnvironmentController.cpp:51
IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface >
armarx::EnvironmentController::EnvironmentController
EnvironmentController()
Definition: EnvironmentController.cpp:57
armarx::EnvironmentController::onDisconnectComponent
void onDisconnectComponent() override
Definition: EnvironmentController.cpp:25
armarx::EnvironmentController::onConnectComponent
void onConnectComponent() override
Definition: EnvironmentController.cpp:20
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::AbstractController
Abstract controller providing a set of methods which must be implemented by every controller.
Definition: AbstractController.h:35
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:18