Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

MotionManager Class Reference

The purpose of this class is to repeatedly compute the final set of joint angles for the robot, managing a set of (possibly conflicting) MotionCommands. More...

#include <MotionManager.h>


Detailed Description

The purpose of this class is to repeatedly compute the final set of joint angles for the robot, managing a set of (possibly conflicting) MotionCommands.

Since Main and Motion run as separate processes, they could potentially try to access the same motion command at the same time, leading to unpredictable behavior. The MotionManager enforces a set of locks to serialize access to the MotionCommands. Although you could call checkoutMotion() and checkinMotion() directly, it is instead recommended to use MMAccessor to automatically handle casting and checkin for you.

The other problem is that we are sharing the memory holding MotionCommands between processes. MotionManager will do the necessary magic behind the scenes to distribute new MotionCommands to all the involved processes (currently just Main and Motion)
You can create and add a new motion in one line:

  // type A: prunable motions are automatically removed when completed:
  motman->addPrunableMotion( SharedObject<YourMC>([arg1,...]) [, priority ] );

  // type B: persistent motions are removed only when you explicitly request it:
  MC_ID id = motman->addPersistentMotion( SharedObject<YourMC>([arg1,...]) [, priority ] );
  // then later: motman->removeMotion(id);

The priority level can be changed later via setPriority(), and there are symbolic values defined in kIgnoredPriority through kEmergencyPriority to give some common guidelines on the magnitudes to use. The default priority level if unspecified is kStdPriority.

If you want to do some more initializations not handled by the MotionCommand's constructor (the arg1, arg2, ... params) then you would want to do something like the following:

  SharedObject<YourMC> yourmc([arg1,[arg2,...]]);
  yourmc->cmd1();
  yourmc->cmd2();
  //...
  motman->addPrunableMotion(yourmc [, ...]); //or addPersistentMotion(...)

Notice that yourmc is actually of type SharedObject, but you're calling YourMC's functions on it through the '->' operator... SharedObject is a "smart pointer" which will pass your function calls on to the underlying templated type. Isn't C++ great? :)

Warning:
Once the MotionCommand has been added, you must check it out to make any future modifications it or risk concurrent access problems. In other words, you should not keep the SharedObject and continue to access the motion through that unless you know the motion is not active in the MotionManager. Instead, always use a MMAccessor.
See also:
MMAccessor for information on accessing motions after you've added them to MotionManager, or if it may be active in the MotionManager.
MotionCommand for information on creating new motion primitives.

Definition at line 85 of file MotionManager.h.

List of all members.

Classes

struct  CommandEntry
 All the information we need to maintain about a MotionCommand. More...
class  OutputState
 holds the full requested value of an output More...
struct  PIDUpdate
 used to request pids for a given joint More...

Public Types

typedef MotionManagerMsg::MC_ID MC_ID
 use this type when referring to the ID numbers that MotionManager hands out

Public Member Functions

 MotionManager ()
 Constructor, sets all the outputs to 0.
void InitAccess (MessageQueueBase &mcbufq, Resource &behaviorLock)
 LOCKS MotionManager Everyone who is planning to use the MotionManager needs to call this before they access it or suffer a horrible fate
void RemoveAccess ()
 needed in order to dereference shared memory regions before shutting down
void processMsg (RCRegion *region)
 LOCKS MotionManager This gets called by receivedMsg when under Aperios, or directly if you already have an RCRegion
 ~MotionManager ()
 destructor
void motionReport () const
 displays a report of active motion commands on stderr
bool hasReference (ProcessID::ProcessID_t proc, MC_ID mcid) const
MotionCommand Safe

void setOutput (const MotionCommand *caller, unsigned int output, const OutputCmd &cmd)
 LOCKS MotionManager Requests a value be set for the specified output, copies cmd across frames
void setOutput (const MotionCommand *caller, unsigned int output, const OutputCmd &cmd, unsigned int frame)
 LOCKS MotionManager Requests a value be set for the specified output in the specified frame
void setOutput (const MotionCommand *caller, unsigned int output, const OutputCmd cmd[NumFrames])
 LOCKS MotionManager Requests a value be set for the specified output across frames
void setOutput (const MotionCommand *caller, unsigned int output, const OutputPID &pid)
 LOCKS MotionManager Requests a PID be set for the specified output, notice that this might be overruled by a higher priority motion
void setOutput (const MotionCommand *caller, unsigned int output, const OutputCmd &cmd, const OutputPID &pid)
 LOCKS MotionManager Requests a value and PID be set for the specified output
void setOutput (const MotionCommand *caller, unsigned int output, const OutputCmd cmd[NumFrames], const OutputPID &pid)
 LOCKS MotionManager Requests a value and PID be set for the specified output
const OutputCmdgetOutputCmd (unsigned int output) const
 Returns the value of the output last sent to the OS. Note that this will differ from the sensed value in state, even when staying still. There is no corresponding getOutputPID because this value *will* duplicate the value in state.
void setPriority (MC_ID mcid, float p)
 sets the priority level of a MotionCommand, symbolic values are available to give some guidelines -- see kIgnoredPriority through kEmergencyPriority
float getPriority (MC_ID mcid) const
 returns priority level of a MotionCommand, symbolic values are available to give some guidelines -- see kIgnoredPriority through kEmergencyPriority

MC_ID begin () const
 returns the MC_ID of the first MotionCommand
MC_ID next (MC_ID cur) const
 returns the MC_ID of MotionCommand following the one that is passed
MC_ID end () const
 returns the MC_ID of the one-past-the-end MotionCommand (like the STL)
unsigned int size () const
 returns the number of MotionCommands being managed
MotionCommand "Risky"

You can have one MC check out and modify another, but make sure the other MC doesn't call setOutput()

MotionCommandcheckoutMotion (MC_ID mcid, bool block=true) const
 locks the command and possibly performs RTTI conversion; supports recursive calls
void checkinMotion (MC_ID mcid) const
 marks a MotionCommand as unused
MotionCommandpeekMotion (MC_ID mcid) const
 allows access to a MotionCommand without checking it out; warning never call a function based on this, only access member fields through it
unsigned int checkoutLevel (MC_ID mcid) const
 returns the number of times mcid has been checked out minus the times it's been checked in
bool isOwner (MC_ID mcid) const
 locks the command and possibly performs RTTI conversion; supports recursive calls
MotionCommand Unsafe

MC_ID addPrunableMotion (const SharedObjectBase &sm, float priority=kStdPriority)
 LOCKS MotionManager adds a new motion (wrapped in a SharedObject) and marks that it should be automatically deleted when the MotionCommand::isAlive() returns false.
MC_ID addPersistentMotion (const SharedObjectBase &sm, float priority=kStdPriority)
 LOCKS MotionManager adds a new motion (wrapped in a SharedObject) and marks that it should not be deleted, until removeMotion(MC_ID mcid) is called.
void removeMotion (MC_ID mcid)
 LOCKS MotionManager removes the specified MotionCommand

void lock ()
 gets an exclusive lock on MotionManager - functions marked LOCKS MotionManager will cause (and require) this to happen automatically
bool trylock ()
 tries to get a lock without blocking
void unlock ()
 releases a lock on the motion manager

void getOutputs (float outputs[][NumOutputs])
 LOCKS MotionManager called by MotionObject to fill in the output values for the next NumFrames frames (only MotoObj should call this...)
bool updatePIDs (std::vector< std::pair< unsigned int, float[3]> > &pids)
 call this when you want MotionManager to update modified PID values, returns true if changes made (only MotoObj should be calling this...), see PIDMC for general PID documentation

Static Public Member Functions

static bool receivedMsg (RCRegion *msg)
 called with incoming messages, will pass non-echos to processMsg()
static void setTranslator (EventTranslator *et)
 sets etrans, should be called before any events can be sent

Static Public Attributes

static const unsigned int MAX_ACCESS = 2
 This is the number of processes which will be accessing the MotionManager.
static const unsigned int MAX_MOTIONS = 64
 This is the maximum number of Motions which can be managed, can probably be increased reasonably without trouble.
static const MC_ID invalid_MC_ID = MotionManagerMsg::invalid_MC_ID
 for errors and undefined stuff
Priority Level Constants

Just to give you some guidelines for what values to use for different priority levels, but you can pick any value you like (that's why they are floats)

static const float kIgnoredPriority = -1
 won't be expressed, handy if you want to temporarily pause something
static const float kBackgroundPriority = 0
 will only be expressed if *nothing* else is using that joint
static const float kLowPriority = 5
 for stuff that's not background but lower than standard
static const float kStdPriority = 10
 for every-day commands
static const float kHighPriority = 50
 for stuff that should override standard stuff
static const float kEmergencyPriority = 100
 for really important stuff, such as the emergency stop

Protected Types

typedef unsigned short accID_t
 type to use to refer to accessors of MotionManager (or its locks)
typedef ListMemBuf
< OutputState, MAX_MOTIONS
cmdstatelist_t
 shorthand for a list of OutputState's

Protected Member Functions

MC_ID doAddMotion (const SharedObjectBase &sm, bool autoprune, float priority)
 does the actual work of adding a motion
MotionCommandconvertMotion (MC_ID mc) const
 sets up a motion command to be accessed by the current process
void setPID (unsigned int j, const float p[3])
 LOCKS MotionManager, called internally to do the work of setting the PID... you probably want to call setOutput with an OutputPID argument, not this...
void func_begin () const
 called at the begining of many functions to lock MotionManager
void func_end () const
 called at the end of a function which called func_begin() to release it
template<class T >
func_end (T val) const
 same as func_end(), except passes return value through
MC_ID skip_ahead (MC_ID mcid) const
 during iteration, skips over motioncommands which are still in transit from on OObject to another
MC_ID pop_free ()
 pulls an entry from cmdlist's free section and returns its index
void push_free (MC_ID a)
 puts an entry back into cmdlist's free section

Static Protected Member Functions

static int getAccID ()

Protected Attributes

ListMemBuf< PIDUpdate,
NumPIDJoints > 
pidchanges
 stores PID updates, up to one per joint (if same is set more than once, it's just overwrites previous update)
ListMemBuf< CommandEntry,
MAX_MOTIONS, MC_ID
cmdlist
 the list where MotionCommands are stored, remember, we're in a shared memory region with different base addresses - no pointers!
MC_ID cur_cmd
 MC_ID of the MotionCommand currently being updated by getOutputs(), or NULL if not in getOutputs. This is used by the setOutput()'s to tell which MotionCommand is calling.
MutexLock< MAX_ACCESSMMlock
 The main lock for the class.
cmdstatelist_t cmdstates [NumOutputs]
 requested positions by each of the MC's for each of the outputs
float cmdSums [NumOutputs]
 Holds the final values for the outputs of the last frame generated.
OutputCmd cmds [NumOutputs]
 Holds the weighted values and total weight for the outputs of the last frame.
accID_t numAcc
 The number of accessors who have registered with InitAccess().
MessageQueueBasesubjs [MAX_ACCESS]
 Storage of each process's attachment of the message queue, used to internally transmit sound buffers to SoundPlay.
MessageReceivermcrecvs [MAX_ACCESS]
 message receivers which watch for incoming motion command regions, or requests to free them
ResourceprocLocks [MAX_ACCESS]
 pointers to per-process thread locks, acquired during message processing from one of mcrecvs

Static Protected Attributes

static int _MMaccID [ProcessID::NumProcesses]
 Stores the accessor id assigned in InitAccess() for each process.
static EventTranslatoretrans = NULL
 EventTranslator for sending events to Main -- each process will set the correct value for calls within that process.

Private Member Functions

 MotionManager (const MotionManager &)
 this shouldn't be called...
MotionManageroperator= (const MotionManager &)
 this shouldn't be called...

Member Typedef Documentation

typedef unsigned short MotionManager::accID_t [protected]

type to use to refer to accessors of MotionManager (or its locks)

Definition at line 222 of file MotionManager.h.

shorthand for a list of OutputState's

Definition at line 259 of file MotionManager.h.

use this type when referring to the ID numbers that MotionManager hands out

Definition at line 95 of file MotionManager.h.


Constructor & Destructor Documentation

MotionManager::MotionManager (  ) 

Constructor, sets all the outputs to 0.

Definition at line 39 of file MotionManager.cc.

MotionManager::~MotionManager (  ) 

destructor

Definition at line 131 of file MotionManager.cc.

MotionManager::MotionManager ( const MotionManager  )  [private]

this shouldn't be called...


Member Function Documentation

MC_ID MotionManager::addPrunableMotion ( const SharedObjectBase sm,
float  priority = kStdPriority 
)
MC_ID MotionManager::begin (  )  const

returns the MC_ID of the first MotionCommand

Definition at line 137 of file MotionManager.h.

Referenced by getOutputs(), and motionReport().

unsigned int MotionManager::checkoutLevel ( MC_ID  mcid  )  const

returns the number of times mcid has been checked out minus the times it's been checked in

Definition at line 148 of file MotionManager.h.

MotionCommand * MotionManager::checkoutMotion ( MC_ID  mcid,
bool  block = true 
) const

locks the command and possibly performs RTTI conversion; supports recursive calls

Definition at line 867 of file MotionManager.cc.

Referenced by MMAccessor< MC_t >::checkout(), MCValueEditControl< T >::doSelect(), getOutputs(), motionReport(), processMsg(), RemoveAccess(), removeMotion(), LoadWalkControl::selectedFile(), and SaveWalkControl::takeInput().

MotionCommand * MotionManager::convertMotion ( MC_ID  mc  )  const [protected]

sets up a motion command to be accessed by the current process

Definition at line 897 of file MotionManager.cc.

Referenced by checkoutMotion().

MotionManager::MC_ID MotionManager::doAddMotion ( const SharedObjectBase sm,
bool  autoprune,
float  priority 
) [protected]

does the actual work of adding a motion

We have made this function protected because it's more readable if you call addPrunableMotion() or addPersistentMotion() instead... we decided requiring people to pass a true/false arguement wouldn't make it clear what that true/false was controlling.

Definition at line 793 of file MotionManager.cc.

Referenced by addPersistentMotion(), and addPrunableMotion().

MC_ID MotionManager::end (  )  const

returns the MC_ID of the one-past-the-end MotionCommand (like the STL)

Definition at line 139 of file MotionManager.h.

Referenced by getOutputs().

void MotionManager::func_begin (  )  const [protected]

called at the begining of many functions to lock MotionManager

Definition at line 224 of file MotionManager.h.

Referenced by doAddMotion(), getOutputs(), motionReport(), processMsg(), RemoveAccess(), removeMotion(), setOutput(), setPID(), and ~MotionManager().

template<class T >
T MotionManager::func_end ( val  )  const [protected]

same as func_end(), except passes return value through

Definition at line 226 of file MotionManager.h.

Referenced by func_end().

void MotionManager::func_end (  )  const [protected]

called at the end of a function which called func_begin() to release it

Definition at line 225 of file MotionManager.h.

Referenced by doAddMotion(), getOutputs(), motionReport(), processMsg(), RemoveAccess(), removeMotion(), setOutput(), setPID(), and ~MotionManager().

const OutputCmd& MotionManager::getOutputCmd ( unsigned int  output  )  const

Returns the value of the output last sent to the OS. Note that this will differ from the sensed value in state, even when staying still. There is no corresponding getOutputPID because this value *will* duplicate the value in state.

Definition at line 130 of file MotionManager.h.

Referenced by EmergencyStopMC::freezeJoints(), PostureMC::setDirty(), HeadPointerMC::setDirty(), ArmMC::setDirty(), and PostureMC::setOutputCmd().

void MotionManager::getOutputs ( float  outputs[][NumOutputs]  ) 

LOCKS MotionManager called by MotionObject to fill in the output values for the next NumFrames frames (only MotoObj should call this...)

What's worse? A plethora of functions which are only called, and only useful at one place, or a big massive function which doesn't pollute the namespace? This is the latter, for better or worse.

Definition at line 339 of file MotionManager.cc.

float MotionManager::getPriority ( MC_ID  mcid  )  const

returns priority level of a MotionCommand, symbolic values are available to give some guidelines -- see kIgnoredPriority through kEmergencyPriority

Definition at line 133 of file MotionManager.h.

Referenced by setOutput().

bool MotionManager::hasReference ( ProcessID::ProcessID_t  proc,
MC_ID  mcid 
) const

Definition at line 197 of file MotionManager.h.

void MotionManager::InitAccess ( MessageQueueBase mcbufq,
Resource behaviorLock 
)

LOCKS MotionManager Everyone who is planning to use the MotionManager needs to call this before they access it or suffer a horrible fate

Definition at line 67 of file MotionManager.cc.

bool MotionManager::isOwner ( MC_ID  mcid  )  const

locks the command and possibly performs RTTI conversion; supports recursive calls

Definition at line 149 of file MotionManager.h.

void MotionManager::lock (  ) 

gets an exclusive lock on MotionManager - functions marked LOCKS MotionManager will cause (and require) this to happen automatically

Definition at line 162 of file MotionManager.h.

Referenced by checkinMotion(), and checkoutMotion().

void MotionManager::motionReport (  )  const

displays a report of active motion commands on stderr

Definition at line 148 of file MotionManager.cc.

MC_ID MotionManager::next ( MC_ID  cur  )  const

returns the MC_ID of MotionCommand following the one that is passed

Definition at line 138 of file MotionManager.h.

Referenced by getOutputs().

MotionManager& MotionManager::operator= ( const MotionManager  )  [private]

this shouldn't be called...

MotionCommand* MotionManager::peekMotion ( MC_ID  mcid  )  const

allows access to a MotionCommand without checking it out; warning never call a function based on this, only access member fields through it

Definition at line 147 of file MotionManager.h.

Referenced by MMAccessor< MC_t >::MMAccessor(), Controller::setEStopID(), and BatteryMonitorBehavior::startWarning().

MC_ID MotionManager::pop_free (  )  [protected]

pulls an entry from cmdlist's free section and returns its index

Definition at line 254 of file MotionManager.h.

Referenced by doAddMotion().

void MotionManager::processMsg ( RCRegion region  ) 

LOCKS MotionManager This gets called by receivedMsg when under Aperios, or directly if you already have an RCRegion

Definition at line 695 of file MotionManager.cc.

Referenced by receivedMsg().

void MotionManager::push_free ( MC_ID  a  )  [protected]

puts an entry back into cmdlist's free section

Definition at line 255 of file MotionManager.h.

Referenced by processMsg(), RemoveAccess(), and ~MotionManager().

bool MotionManager::receivedMsg ( RCRegion msg  )  [static]

called with incoming messages, will pass non-echos to processMsg()

Definition at line 675 of file MotionManager.cc.

Referenced by InitAccess().

void MotionManager::RemoveAccess (  ) 

needed in order to dereference shared memory regions before shutting down

Definition at line 86 of file MotionManager.cc.

void MotionManager::setOutput ( const MotionCommand caller,
unsigned int  output,
const OutputCmd  cmd[NumFrames],
const OutputPID pid 
)

LOCKS MotionManager Requests a value and PID be set for the specified output

Definition at line 310 of file MotionManager.cc.

void MotionManager::setOutput ( const MotionCommand caller,
unsigned int  output,
const OutputCmd cmd,
const OutputPID pid 
)

LOCKS MotionManager Requests a value and PID be set for the specified output

Definition at line 284 of file MotionManager.cc.

void MotionManager::setOutput ( const MotionCommand caller,
unsigned int  output,
const OutputPID pid 
)

LOCKS MotionManager Requests a PID be set for the specified output, notice that this might be overruled by a higher priority motion

Definition at line 263 of file MotionManager.cc.

void MotionManager::setOutput ( const MotionCommand caller,
unsigned int  output,
const OutputCmd  cmd[NumFrames] 
)

LOCKS MotionManager Requests a value be set for the specified output across frames

Definition at line 232 of file MotionManager.cc.

void MotionManager::setOutput ( const MotionCommand caller,
unsigned int  output,
const OutputCmd cmd,
unsigned int  frame 
)

LOCKS MotionManager Requests a value be set for the specified output in the specified frame

Definition at line 209 of file MotionManager.cc.

void MotionManager::setPID ( unsigned int  joint,
const float  pids[3] 
) [protected]

LOCKS MotionManager, called internally to do the work of setting the PID... you probably want to call setOutput with an OutputPID argument, not this...

Note that we don't actually set the PIDs in the system here, we just queue them up. PID changes seem to be an expensive operation, so may only want to clear the queue at some reduced rate (although that's not actually currently being done, it just could be)

Definition at line 1003 of file MotionManager.cc.

Referenced by getOutputs(), and setOutput().

static void MotionManager::setTranslator ( EventTranslator et  )  [static]

sets etrans, should be called before any events can be sent

Definition at line 117 of file MotionManager.h.

unsigned int MotionManager::size (  )  const

returns the number of MotionCommands being managed

Definition at line 140 of file MotionManager.h.

MotionManager::MC_ID MotionManager::skip_ahead ( MC_ID  mcid  )  const [protected]

during iteration, skips over motioncommands which are still in transit from on OObject to another

Definition at line 1041 of file MotionManager.cc.

Referenced by begin(), and next().

bool MotionManager::trylock (  ) 

tries to get a lock without blocking

Definition at line 163 of file MotionManager.h.

void MotionManager::unlock (  ) 

releases a lock on the motion manager

Definition at line 164 of file MotionManager.h.

bool MotionManager::updatePIDs ( std::vector< std::pair< unsigned int, float[3]> > &  pids  ) 

call this when you want MotionManager to update modified PID values, returns true if changes made (only MotoObj should be calling this...), see PIDMC for general PID documentation

This function handles the conversion from the Tekkotsu format (one regular IEEE float per parameter, to the OPEN-R format (which takes a specialized, reduced precision floating point number) This is all documented in PIDMC as well.

In order to send Tekkotsu's PIDs to the system, they are converted to the gain/shift format. On the ERS-2xx, we could dynamically choose shift values to allow more precision in setting values.

With the ERS-7, all shifts are shared, so they must be set to a common set of values, defined by WorldState::DefaultPIDShifts. This limits the range of gains which can then be set.

Due to the mysterious warning which would occur with the 2xx, (AGRMSDriver::SetGain() : 0x0A IS USED FOR GAIN SHIFT VALUE.) and since this seems to be the way things are going, all models now, by default, use global shift values (which can vary from model to model, just global for each model)

You can revert to the dynamic shift selection by commenting-in the noted code section below.

A final note: the OPENR::SetJointGain function seems to be a rather costly function call. You should probably try to avoid setting PIDs at too high a frequency.

Definition at line 646 of file MotionManager.cc.


Member Data Documentation

int MotionManager::_MMaccID [static, protected]

Stores the accessor id assigned in InitAccess() for each process.

Definition at line 277 of file MotionManager.h.

Referenced by getAccID(), hasReference(), and InitAccess().

the list where MotionCommands are stored, remember, we're in a shared memory region with different base addresses - no pointers!

Definition at line 250 of file MotionManager.h.

Referenced by begin(), checkinMotion(), checkoutLevel(), checkoutMotion(), convertMotion(), doAddMotion(), end(), getOutputs(), getPriority(), hasReference(), InitAccess(), isOwner(), motionReport(), next(), peekMotion(), pop_free(), processMsg(), push_free(), RemoveAccess(), removeMotion(), setPriority(), size(), skip_ahead(), and ~MotionManager().

OutputCmd MotionManager::cmds[NumOutputs] [protected]

Holds the weighted values and total weight for the outputs of the last frame.

Definition at line 263 of file MotionManager.h.

Referenced by getOutputCmd(), getOutputs(), and MotionManager::OutputState::OutputState().

cmdstatelist_t MotionManager::cmdstates[NumOutputs] [protected]

requested positions by each of the MC's for each of the outputs

Definition at line 261 of file MotionManager.h.

Referenced by getOutputs(), motionReport(), and setOutput().

float MotionManager::cmdSums[NumOutputs] [protected]

Holds the final values for the outputs of the last frame generated.

Definition at line 262 of file MotionManager.h.

Referenced by getOutputs(), MotionManager(), and setOutput().

MC_ID of the MotionCommand currently being updated by getOutputs(), or NULL if not in getOutputs. This is used by the setOutput()'s to tell which MotionCommand is calling.

Definition at line 251 of file MotionManager.h.

Referenced by getOutputs(), and setOutput().

EventTranslator * MotionManager::etrans = NULL [static, protected]

EventTranslator for sending events to Main -- each process will set the correct value for calls within that process.

Definition at line 278 of file MotionManager.h.

Referenced by convertMotion(), and setTranslator().

will only be expressed if *nothing* else is using that joint

Definition at line 101 of file MotionManager.h.

Referenced by getOutputs(), DualCoding::Lookout::processPointAtEvent(), DualCoding::Lookout::processScanEvent(), DualCoding::Lookout::scanAlongPolygon(), and setOutput().

for really important stuff, such as the emergency stop

Definition at line 105 of file MotionManager.h.

Referenced by Controller::activate(), BatteryMonitorBehavior::doEvent(), FlashIPAddrBehavior::doStart(), Controller::doStart(), and BatteryMonitorBehavior::startWarning().

const float MotionManager::kHighPriority = 50 [static]

for stuff that should override standard stuff

Definition at line 104 of file MotionManager.h.

Referenced by TorqueCalibrate::TakeMeasurementControl::activate(), and ArmController::doStart().

const float MotionManager::kLowPriority = 5 [static]

for stuff that's not background but lower than standard

Definition at line 102 of file MotionManager.h.

const unsigned int MotionManager::MAX_ACCESS = 2 [static]

This is the number of processes which will be accessing the MotionManager.

Probably just MainObject and MotionObject... This isn't really a hard maximum, but should be actual expected, need to know when they're all connected

Definition at line 91 of file MotionManager.h.

Referenced by MotionManager::CommandEntry::CommandEntry(), doAddMotion(), and InitAccess().

const unsigned int MotionManager::MAX_MOTIONS = 64 [static]

This is the maximum number of Motions which can be managed, can probably be increased reasonably without trouble.

Definition at line 93 of file MotionManager.h.

Referenced by checkinMotion(), checkoutMotion(), and removeMotion().

message receivers which watch for incoming motion command regions, or requests to free them

Definition at line 272 of file MotionManager.h.

Referenced by InitAccess(), and RemoveAccess().

The main lock for the class.

Definition at line 257 of file MotionManager.h.

Referenced by func_begin(), func_end(), InitAccess(), lock(), trylock(), and unlock().

The number of accessors who have registered with InitAccess().

Definition at line 266 of file MotionManager.h.

Referenced by doAddMotion(), InitAccess(), processMsg(), RemoveAccess(), and ~MotionManager().

ListMemBuf<PIDUpdate,NumPIDJoints> MotionManager::pidchanges [protected]

stores PID updates, up to one per joint (if same is set more than once, it's just overwrites previous update)

Definition at line 218 of file MotionManager.h.

Referenced by setPID(), and updatePIDs().

pointers to per-process thread locks, acquired during message processing from one of mcrecvs

Definition at line 273 of file MotionManager.h.

Referenced by InitAccess(), and receivedMsg().

Storage of each process's attachment of the message queue, used to internally transmit sound buffers to SoundPlay.

Definition at line 271 of file MotionManager.h.

Referenced by doAddMotion(), InitAccess(), and removeMotion().


The documentation for this class was generated from the following files:

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:13 2016 by Doxygen 1.6.3