Supervise the consecutive execution of several SoT. More...
Public Member Functions | |
def | __init__ (self, sotrobot, lpTasks=None, hpTasks=None) |
def | makeInitialSot (self) |
def | setBasePose (self, basePose) |
Set the robot base pose in the world. More... | |
def | topics (self) |
def | plugTopicsToRos (self) |
def | printQueueSize (self) |
def | isSotConsistentWithCurrent (self, transitionName, thr=1e-3) |
Check consistency between two SoTs. More... | |
def | clearQueues (self) |
def | waitForQueue (self, minQueueSize, timeout) |
Wait for the queue to be of a given size. More... | |
def | readQueue (self, delay, minQueueSize, duration, timeout) |
Start reading values received by the RosQueuedSubscribe entity. More... | |
def | stopReadingQueue (self) |
def | plugSot (self, transitionName, check=False) |
def | runPreAction (self, transitionName) |
def | runPostAction (self, targetStateName) |
Execute a post-action. More... | |
def | getJointList (self, prefix="") |
def | publishState (self, subsampling=40) |
Public Attributes | |
sotrobot | |
hpTasks | |
lpTasks | |
currentSot | |
sot_switch | |
error_events | |
keep_posture | |
rosSubscribe | |
rosTf | |
ros_publish_state | |
SoT managements | |
def | addPreAction (self, name, preActionSolver) |
def | addSolver (self, name, solver) |
def | duplicateSolver (self, existingSolver, newSolver) |
def | addPostActions (self, name, postActionSolvers) |
Supervise the consecutive execution of several SoT.
Typically, these sots are created via factory.Factory. They can also be added manually.
Steps: P = placement, G = grasp, p = pre-P, g = pre-G 0. P <-> GP 1. P <-> gP 2. gP <-> GP 3. GP <-> G 4. GP <-> Gp 5. Gp <-> G
def agimus_sot.supervisor.Supervisor.__init__ | ( | self, | |
sotrobot, | |||
lpTasks = None , |
|||
hpTasks = None |
|||
) |
lpTasks | list of low priority tasks. If None, a Posture task will be used. |
hpTasks | list of high priority tasks (like balance) |
def agimus_sot.supervisor.Supervisor.addPostActions | ( | self, | |
name, | |||
postActionSolvers | |||
) |
References agimus_sot.supervisor.Supervisor._addSignalToSotSwitch(), agimus_sot.supervisor.Supervisor.error_events, agimus_sot.factory.Factory.postActions, and agimus_sot.supervisor.Supervisor.sot_switch.
def agimus_sot.supervisor.Supervisor.addPreAction | ( | self, | |
name, | |||
preActionSolver | |||
) |
References agimus_sot.supervisor.Supervisor._addSignalToSotSwitch(), and agimus_sot.factory.Factory.preActions.
def agimus_sot.supervisor.Supervisor.addSolver | ( | self, | |
name, | |||
solver | |||
) |
References agimus_sot.supervisor.Supervisor._addSignalToSotSwitch(), and agimus_sot.factory.Factory.sots.
def agimus_sot.supervisor.Supervisor.clearQueues | ( | self | ) |
References agimus_sot.supervisor.Supervisor.rosSubscribe.
def agimus_sot.supervisor.Supervisor.duplicateSolver | ( | self, | |
existingSolver, | |||
newSolver | |||
) |
References agimus_sot.factory.Factory.sots.
def agimus_sot.supervisor.Supervisor.getJointList | ( | self, | |
prefix = "" |
|||
) |
def agimus_sot.supervisor.Supervisor.isSotConsistentWithCurrent | ( | self, | |
transitionName, | |||
thr = 1e-3 |
|||
) |
Check consistency between two SoTs.
This is not used anymore because it must be synchronized with the real-time thread.
References agimus_sot.supervisor.Supervisor.currentSot, agimus_sot.supervisor.Supervisor.sotrobot, agimus_sot.factory.Factory.sotrobot, and agimus_sot.factory.Factory.sots.
Referenced by agimus_sot.supervisor.Supervisor.plugSot().
def agimus_sot.supervisor.Supervisor.makeInitialSot | ( | self | ) |
def agimus_sot.supervisor.Supervisor.plugSot | ( | self, | |
transitionName, | |||
check = False |
|||
) |
References agimus_sot.supervisor.Supervisor._selectSolver(), agimus_sot.supervisor.Supervisor.currentSot, agimus_sot.supervisor.Supervisor.isSotConsistentWithCurrent(), agimus_sot.supervisor.Supervisor.keep_posture, agimus_sot.supervisor.Supervisor.ros_publish_state, agimus_sot.supervisor.Supervisor.sotrobot, agimus_sot.factory.Factory.sotrobot, and agimus_sot.factory.Factory.sots.
def agimus_sot.supervisor.Supervisor.plugTopicsToRos | ( | self | ) |
def agimus_sot.supervisor.Supervisor.printQueueSize | ( | self | ) |
References agimus_sot.supervisor.Supervisor.rosSubscribe.
def agimus_sot.supervisor.Supervisor.publishState | ( | self, | |
subsampling = 40 |
|||
) |
def agimus_sot.supervisor.Supervisor.readQueue | ( | self, | |
delay, | |||
minQueueSize, | |||
duration, | |||
timeout | |||
) |
Start reading values received by the RosQueuedSubscribe entity.
delay | (integer) how many periods to wait before reading. It allows to give some delay to network connection. |
minQueueSize | (integer) waits to the queue size of rosSubscribe to be greater or equal to minQueueSize |
duration | expected duration (in seconds) of the queue. |
timeout | time in seconds after which to return a failure. |
minQueueSize
is greater than the number of values to be received by rosSubscribe, this function does an infinite loop. References agimus_sot.supervisor.Supervisor.currentSot, agimus_sot.supervisor.Supervisor.error_events, agimus_sot.supervisor.Supervisor.rosSubscribe, agimus_sot.supervisor.Supervisor.sotrobot, agimus_sot.factory.Factory.sotrobot, and agimus_sot.supervisor.Supervisor.waitForQueue().
def agimus_sot.supervisor.Supervisor.runPostAction | ( | self, | |
targetStateName | |||
) |
Execute a post-action.
References agimus_sot.supervisor.Supervisor._selectSolver(), agimus_sot.supervisor.Supervisor.currentSot, agimus_sot.factory.Factory.postActions, agimus_sot.supervisor.Supervisor.sotrobot, and agimus_sot.factory.Factory.sotrobot.
def agimus_sot.supervisor.Supervisor.runPreAction | ( | self, | |
transitionName | |||
) |
References agimus_sot.supervisor.Supervisor._selectSolver(), agimus_sot.factory.Factory.preActions, agimus_sot.supervisor.Supervisor.sotrobot, and agimus_sot.factory.Factory.sotrobot.
def agimus_sot.supervisor.Supervisor.setBasePose | ( | self, | |
basePose | |||
) |
Set the robot base pose in the world.
basePose | a list: [x,y,z,r,p,y] or [x,y,z,qx,qy,qz,qw] |
References agimus_sot.supervisor.Supervisor.currentSot, agimus_sot.supervisor.Supervisor.keep_posture, agimus_sot.supervisor.Supervisor.sotrobot, and agimus_sot.factory.Factory.sotrobot.
def agimus_sot.supervisor.Supervisor.stopReadingQueue | ( | self | ) |
References agimus_sot.supervisor.Supervisor.rosSubscribe.
def agimus_sot.supervisor.Supervisor.topics | ( | self | ) |
def agimus_sot.supervisor.Supervisor.waitForQueue | ( | self, | |
minQueueSize, | |||
timeout | |||
) |
Wait for the queue to be of a given size.
minQueueSize | (integer) waits to the queue size of rosSubscribe to be greater or equal to minQueueSize |
timeout | time in seconds after which to return a failure. |
References agimus_sot.supervisor.Supervisor.rosSubscribe, agimus_sot.supervisor.Supervisor.sotrobot, and agimus_sot.factory.Factory.sotrobot.
Referenced by agimus_sot.supervisor.Supervisor.readQueue().
agimus_sot.supervisor.Supervisor.currentSot |
agimus_sot.supervisor.Supervisor.error_events |
agimus_sot.supervisor.Supervisor.hpTasks |
Referenced by agimus_sot.supervisor.Supervisor.topics().
agimus_sot.supervisor.Supervisor.keep_posture |
agimus_sot.supervisor.Supervisor.lpTasks |
Referenced by agimus_sot.supervisor.Supervisor.topics().
agimus_sot.supervisor.Supervisor.ros_publish_state |
Referenced by agimus_sot.supervisor.Supervisor.plugSot().
agimus_sot.supervisor.Supervisor.rosSubscribe |
agimus_sot.supervisor.Supervisor.rosTf |
agimus_sot.supervisor.Supervisor.sot_switch |
Referenced by agimus_sot.supervisor.Supervisor.addPostActions().
agimus_sot.supervisor.Supervisor.sotrobot |
Referenced by agimus_sot.supervisor.Supervisor.getJointList(), agimus_sot.supervisor.Supervisor.isSotConsistentWithCurrent(), agimus_sot.supervisor.Supervisor.makeInitialSot(), agimus_sot.supervisor.Supervisor.plugSot(), agimus_sot.supervisor.Supervisor.readQueue(), agimus_sot.supervisor.Supervisor.runPostAction(), agimus_sot.supervisor.Supervisor.runPreAction(), agimus_sot.supervisor.Supervisor.setBasePose(), and agimus_sot.supervisor.Supervisor.waitForQueue().