|EECartImpedExecuter (ros::NodeHandle &n)|
|Constructs the executer. |
|Deconstructs the executor. Shuts down the controller and stops EECartImpedExecuter::watchdog_timer_. |
< ee_cart_imped_msgs::EECartImpedAction >
|The action server type. |
|The goal handle type. |
|void||cancelCB (GoalHandle gh)|
|Callback function when a goal is cancelled. |
|bool||checkConstraints (const ee_cart_imped_msgs::EECartImpedFeedbackConstPtr &msg, geometry_msgs::Pose pose_constraints, double effort_constraint)|
|Helper function to check if the actual point is within the constraints of the desired point. |
|void||controllerStateCB (const ee_cart_imped_msgs::EECartImpedFeedbackConstPtr &msg)|
|Callback function when a message is received from the controller via EECartImpedExecuter::sub_controller_state_. |
|void||goalCB (GoalHandle gh)|
|Callback function when a new goal is received from EECartImpedExecuter::action_server_. |
|void||watchdog (const ros::TimerEvent &e)|
|Triggered every second by EECartImpedExecuter::watchdog_timer_ to make sure the controller is still alive. |
|The action server. |
|The handle to the current active goal. |
|True if the header should be checked when receiving a new goal. |
|The frame in which the controller expects the trajectory. |
|The current trajectory the robot is following. |
|Constraints on the goal position. |
|Goal constraint on the squared error of the difference between the requested joint torques and the actual ones. |
|If the goal takes more goal_time_constraint_ over the time it was supposed to end, it is aborted. |
|True if the controller is actively pursuing a goal. |
|The state of the controller at the last message received via EECartImpedExecuter::sub_controller_state_. |
|ROS node containing namespace information, etc. |
|Publishes commands to the controller. |
|The result of the last goal. |
|Subscribes to the controller state. |
|Transformer for transforming goals into the correct frame ids. |
|Constraints on the trajectory position. |
|Trajectory constraint on the squared error of the difference between the requested joint torques and the actual ones. |
|Each second this timer triggers and calls EECartImpedExecuter::watchdog() |
Action class for the EECartImped controller.
Implements the action interface to the controller. Accepts goals, monitors the trajectory to make sure it's inside constraints, publishes feedback, and reports when goals have been reached.
|typedef actionlib::ActionServer<ee_cart_imped_msgs::EECartImpedAction> EECartImpedExecuter::EECIAS
Constructs the executer.
Constructs the "ee_cart_imped_action" action server and binds EECartImpedExecuter::goalCB() and EECartImpedExecuter::cancelCB to it. It then waits for the controller to come online and, once it has, starts the action server. It also advertises "command", subscribes to "state" (within the namespace of the passed in NodeHandle), reads the constraints off the parameter server, and initializes EECartImpedExecuter::watchdog_timer_ to trigger each second.
|n||The NodeHandle for constructing this instance of the executer.|
|bool EECartImpedExecuter::checkConstraints||(||const ee_cart_imped_msgs::EECartImpedFeedbackConstPtr &||msg,|
Helper function to check if the actual point is within the constraints of the desired point.
|msg||A pointer to a EECartImpedFeedback message that is the current state of the controller, including actual position and desired position and current effort error|
|pose_constraints||The position constraints that must be respected|
|effort_constraint||The maximum allowable error in the squared difference between the desired effort and the actual effort|
|void EECartImpedExecuter::controllerStateCB||(||const ee_cart_imped_msgs::EECartImpedFeedbackConstPtr &||msg||)||
Callback function when a message is received from the controller via EECartImpedExecuter::sub_controller_state_.
This function is responsible for making sure the trajectory stays within EECartImpedExecuter::trajectory_constraints_ and EECartImpedExecuter::trajecotry_effort_constraint_. If the current point is not within the trajectory constraints, the goal is cancelled and the trajectory is stopped.
This function is also responsible for checking if the goal has been reached. Once the current time is greater than the time it should have taken to accomplish the whole trajectory, it checks whether the current point is within EECartImpedExecuter::goal_constraints_ and EECartImpedExecuter::goal_effort_constraint_ of the goal point. If so, it marks the goal as succeeded. Otherwise, it checks whether the current time is greater than the time the trajectory should have been finished plus EECartImpedExecuter::goal_time_constraint_. If it is and the current point is not within the goal constraints, it aborts the goal.
|msg||A pointer to a EECartImpedFeedback message that is the current controller state as published on state.|
Callback function when a new goal is received from EECartImpedExecuter::action_server_.
Cancels the currently active goal if there is one and sends the new goal to the controller via EECartImpedExecuter::pub_controller_command_. Transforms each goal point to be in the frame of the root link for the controller.
|gh||A handle to the new goal|
Triggered every second by EECartImpedExecuter::watchdog_timer_ to make sure the controller is still alive.
Checks when the last time we heard from the controller was. If it was more than 5 seconds ago or we have never heard from it, the current goal is aborted.
This function does not check the trajectory and goal constraints; those are managed in EECartImpedExecuter::controllerStateCB().
|e||The timer event that triggered this callback. Not used in the function since the timer just triggers every second.|