3#include <controller_manager_msgs/ListControllerTypes.h>
4#include <controller_manager_msgs/ListControllers.h>
5#include <controller_manager_msgs/LoadController.h>
6#include <controller_manager_msgs/ReloadControllerLibraries.h>
7#include <controller_manager_msgs/SwitchController.h>
8#include <controller_manager_msgs/UnloadController.h>
14using namespace controller_manager_msgs;
37 ListControllers::Request req;
38 ListControllers::Response res;
41 return res.controller;
46 ListControllerTypes::Request req;
47 ListControllerTypes::Response res;
50 std::vector<ControllerTypeInfo> ret;
51 for (
int i = 0; i < res.types.size(); i++)
54 entry.
type = res.types[i];
65 LoadController::Request req;
66 LoadController::Response res;
75 UnloadController::Request req;
76 UnloadController::Response res;
85 ReloadControllerLibraries::Request req;
86 ReloadControllerLibraries::Response res;
87 req.force_kill = forceKill;
96 std::vector<std::string> stop_controllers,
99 SwitchController::Request req;
100 SwitchController::Response res;
102 req.start_controllers = start_controllers;
103 req.stop_controllers = stop_controllers;
104 req.strictness = strictness;
ros::ServiceClient srvUnloadController
bool unloadController(std::string name)
bool switchControllers(std::vector< std::string > start_controllers, std::vector< std::string > stop_controllers, Strictness strictness)
virtual void onInitialize() override
ros::ServiceClient srvListControllersTypes
ros::ServiceClient srvSwitchControllers
virtual ~CpRosControlInterface()
ros::ServiceClient srvLoadController
std::vector< controller_manager_msgs::ControllerState > listControllers()
bool loadController(std::string name)
bool reloadControllerLibraries(bool forceKill)
std::vector< ControllerTypeInfo > listControllerTypes()
ros::ServiceClient srvListControllers
ros::ServiceClient srvReloadControllerLibraries