1
0
mirror of https://gitlab.com/obbart/universal_robots_ros_driver.git synced 2026-04-10 10:00:48 +02:00

Implement activation modes of robot_enable service

Adds parameter 'require_activation' to configure when the service should be called (Always, Never, OnStartup).
This commit is contained in:
Henning Kayser
2017-08-16 16:56:21 +02:00
parent b57e327a09
commit f70255926b
3 changed files with 42 additions and 4 deletions

View File

@@ -12,6 +12,13 @@ enum class RobotState
ProtectiveStopped
};
enum class ActivationMode
{
Always,
Never,
OnStartup
};
class Service
{
public:
@@ -25,6 +32,7 @@ private:
ros::ServiceServer enable_service_;
std::vector<Service*> services_;
RobotState last_state_;
ActivationMode activation_mode_;
void notify_all(RobotState state);
bool handle(SharedRobotModeData& data, bool error);
@@ -59,4 +67,4 @@ public:
{
return true;
}
};
};