GitXplorerGitXplorer
a

robot_motions_server_ros

public
1 stars
1 forks
2 issues

Commits

List of commits on branch master.
Verified
230f6bb2824c84d51e145fdb71a3f54e6d772306

fixed bug in the event task throws exception while getting command, the whole task manager is brought down due to an initialized variable (#18)

aasaba96 committed 5 years ago
Verified
cf39eac5bf5620eeb1e3f3293e97bb9183d966a5

linting (#17)

aasaba96 committed 5 years ago
Verified
bc29eb009a4847cce1bd689fa794bd55726c4c16

fixes #15 (#16)

aasaba96 committed 5 years ago
Verified
34087db215a1390c5163c2b700b092f2f2f4c8f7

made safety optional (#14)

aasaba96 committed 5 years ago
Verified
e90e27861e488f5d95060b96b4c5fb7c467ea5ee

Improvements (#12)

aasaba96 committed 6 years ago
Verified
6bf8ae578f3717c81d8818c46e7aa1f42337c35c

Update README.md

aasaba96 committed 6 years ago

README

The README file for this repository.

Robot Motions Server ROS

This package defines a "task" (any high-level action) server node, utilizing ROS Actionlib, that:

  • Accepts task action requests
  • Interfaces with a user's defined Task Handler that
    1. Checks the validity of the task and
    2. Constructs and returns an instance of a task that implements the base AbstractTask
  • Manages the life-cycle of your task, so creation, deletion, cancelation, abortion, failure, etc.
  • Reports back failures and successes to the Action Client(s)

To use this package, you need to define a Python package called task_config with the following:

  • A file called task_config where you define a CommandHandler and SafetyResponderclass.
    • SafetyResponder is used if Safety is enabled and the system goes into a safety response state.
  • These classes need to implement the interfaces laid out here and here
  • Each of your tasks also need to implement the AbstractTask defined here

Notes on the usage of this package:

Params:

  • Action Server Name - Name of the action server to send requests to
  • Safety Enabled - utilize the Iarc7 Safety Node Monitoring packages (see here for Iarc7 Safety)
  • Update Rate - update rate of main state logic
  • Startup Timeout - timeout on startup of node
  • Force Cancel - if a task refuses to cancel, should the TaskManager force a cancel

Action Server Message:

  • See the action folder for the action message types used for the Action Server

Design Choices:

  • Tasks are not trusted, so every task interaction is wrapped for protection; this means, unless the node is in a fatal state, a troublesome task will not bring down the TaskManager node
  • Once a cancelation requests comes in, depending on the Force Cancel param, the behavior is the following:
    • If True:
      • The task is canceled, regardless if it returned False on task.cancel()
    • If False:
      • The current task is canceled if it returned True on the task.cancel() call; otherwise, it is allowed to continue running
  • If a new action comes in while the current one is running, the behavior of the Actionlib is to make the server aware there is a new task available (and overwrite the pending action if a third action is requested before the first completes).
    • However, the TaskActionServer will check that the new action request has the preempt flag set to True
    • If so, the current task goes into a Cancel Requested state
    • If not, the current task is allowed to continue running until it completes and then the new task takes over

Example Motion Task Config

See here for an example Motion Task Config package setup.