SMACC
Loading...
Searching...
No Matches
cp_ros_control_interface.h
Go to the documentation of this file.
1#pragma once
2#include <smacc/component.h>
3#include <controller_manager_msgs/ControllerState.h>
4
5namespace smacc
6{
7namespace components
8{
10{
11 std::string type;
12 std::string baseClass;
13};
14
16{
18 STRICT = 2
19};
20
22{
23public:
25
26 virtual ~CpRosControlInterface();
27
28 virtual void onInitialize() override;
29
30 // template <typename TOrthogonal, typename TSourceObject>
31 // void onOrthogonalAllocation() {}
32
33 std::vector<ControllerTypeInfo> listControllerTypes();
34
35 std::vector<controller_manager_msgs::ControllerState> listControllers();
36
37 bool loadController(std::string name);
38
39 bool unloadController(std::string name);
40
41 bool reloadControllerLibraries(bool forceKill);
42
43 bool switchControllers(std::vector<std::string> start_controllers,
44 std::vector<std::string> stop_controllers,
45 Strictness strictness);
46
47 boost::optional<std::string> serviceName_;
48
49private:
50 ros::NodeHandle nh_;
51
52 ros::ServiceClient srvListControllers;
53 ros::ServiceClient srvListControllersTypes;
54 ros::ServiceClient srvLoadController;
55 ros::ServiceClient srvReloadControllerLibraries;
56 ros::ServiceClient srvSwitchControllers;
57 ros::ServiceClient srvUnloadController;
58};
59}
60}
bool switchControllers(std::vector< std::string > start_controllers, std::vector< std::string > stop_controllers, Strictness strictness)
std::vector< controller_manager_msgs::ControllerState > listControllers()
std::vector< ControllerTypeInfo > listControllerTypes()