rock-core / tools-roby

The roby plan manager
Other
3 stars 11 forks source link

add an API to declare that an action should be running only once in a given system #87

Open doudou opened 6 years ago

doudou commented 6 years ago

Ideally, we should be able to specify that the system assumes a given action should be running only once, possibly "narrowing" on a subset of the arguments.

I've seen a bunch of use cases for this over time, but the latest is the following:

We have to control the position of some objects in a Gazebo scene. There's an action for that, and obviously we should have only one item of this action running. We could do some job tracking in the UI, but then it defeats the main goal of having only Roby do state tracking. However, having the "perfect" logic to keep the action unique is a bit involved (requires some knowledge about Roby patterns).

Proposed API:

describe('an action').
   unique(*on_arguments)