Go to the documentation of this file.
43 #include <control_msgs/GripperCommandAction.h>
67 template <
class HardwareInterface>
146 void checkForSuccess(
const ros::Time& time,
double error_position,
double current_position,
double current_velocity);
boost::shared_ptr< RealtimeGoalHandle > RealtimeGoalHandlePtr
actionlib::ActionServer< control_msgs::GripperCommandAction > ActionServer
Commands command_struct_rt_
GripperActionController()
void starting(const ros::Time &time)
Holds the current position.
control_msgs::GripperCommandResultPtr pre_alloc_result_
void stopping(const ros::Time &time)
Cancels the active action goal, if any.
void cancelCB(GoalHandle gh)
HwIfaceAdapter hw_iface_adapter_
Adapts desired goal state to HW interface.
RealtimeGoalHandlePtr rt_active_goal_
Currently active action goal, if any.
ros::Duration action_monitor_period_
ActionServerPtr action_server_
bool verbose_
Hard coded verbose flag to help in debugging.
realtime_tools::RealtimeServerGoalHandle< control_msgs::GripperCommandAction > RealtimeGoalHandle
void checkForSuccess(const ros::Time &time, double error_position, double current_position, double current_velocity)
Check for success and publish appropriate result and feedback.
void setHoldPosition(const ros::Time &time)
ros::NodeHandle controller_nh_
std::string name_
Controller name.
bool update_hold_position_
double default_max_effort_
Max allowed effort.
hardware_interface::JointHandle joint_
Handles to controlled joints.
Helper class to simplify integrating the GripperActionController with different hardware interfaces.
ActionServer::GoalHandle GoalHandle
bool init(HardwareInterface *hw, ros::NodeHandle &root_nh, ros::NodeHandle &controller_nh)
Controller for executing a gripper command action for simple single-dof grippers.
realtime_tools::RealtimeBuffer< Commands > command_
ros::Timer goal_handle_timer_
Store position and max effort in struct to allow easier realtime buffer usage.
ros::Time last_movement_time_
Store stall time.
HardwareInterfaceAdapter< HardwareInterface > HwIfaceAdapter
void update(const ros::Time &time, const ros::Duration &period)
double stall_velocity_threshold_
Stall related parameters.
std::shared_ptr< ActionServer > ActionServerPtr
double computed_command_
Computed command.
void goalCB(GoalHandle gh)
std::string joint_name_
Controlled joint names.