Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
#include <StartupBehavior.h>
Inheritance diagram for StartupBehavior:
This is done by assigning an instance of StartupBehavior to the global startupBehavior variable. Note that there's nothing special about the type of this class, it's just another BehaviorBase - startupBehavior could be any behavior. If you want some other behavior to run automatically at startup, simply remove StartupBehavior from the project and assign an instance of your own class to startupBehavior instead.
By default, this behavior is similar in idea to the init process in unix/linux.
Definition at line 24 of file StartupBehavior.h.
Inherited | |
virtual void | DoStart () |
By default, merely adds to the reference counter (through AddReference()); Note you should still call this from your overriding methods. | |
virtual void | DoStop () |
By default, subtracts from the reference counter, and deletes if zero; Note you should still call this when you override this; Warning call this at the end of your DoStop(), not beginning (it might delete this ). | |
virtual void | processEvent (const EventBase &) |
virtual std::string | getName () const |
Identifies the behavior in menus and such. | |
std::string | getClassDescription () |
Gives a short description of what this class of behaviors does... you should override this (but don't have to). | |
Public Member Functions | |
StartupBehavior () | |
Constructor. | |
virtual | ~StartupBehavior () |
Destructor. | |
Protected Member Functions | |
virtual ControlBase * | SetupMenus () |
Initializes the Controller menu structure - calls each of the other Setup functions in turn. | |
virtual ControlBase * | SetupModeSwitch () |
sets up Mode Switch menu | |
virtual ControlBase * | SetupBackgroundBehaviors () |
sets up Background Behaviors menu | |
virtual ControlBase * | SetupTekkotsuMon () |
sets up TekkotsuMon menu | |
virtual ControlBase * | SetupStatusReports () |
sets up Status Reports menu | |
virtual ControlBase * | SetupFileAccess () |
sets up File Access menu | |
virtual ControlBase * | SetupWalkEdit () |
sets up Walk Editing menus (contributed by PGSS 2003 team project - see StartupBehavior_SetupWalkEdit.cc ) | |
virtual ControlBase * | SetupVision () |
sets up the Vision menu | |
virtual void | initVision () |
Sets up the vision pipelines (held in StartupBehavior_SetupVision.cc). | |
virtual void | startSubMenu () |
future calls to addItem() will be placed under the most recently added item | |
virtual void | addItem (ControlBase *control) |
inserts a control at the end of the menu | |
virtual ControlBase * | endSubMenu () |
closes out a submenu so that future calls to addItem() will be added to the enclosing menu, returns the menu being closed out | |
Protected Attributes | |
std::vector< BehaviorBase * > | spawned |
Behaviors spawned from DoStart, so they can automatically be stopped on DoStop. | |
std::stack< ControlBase * > | setup |
only used during setup - easier than passing it around all the functions | |
MotionManager::MC_ID | stop_id |
the main EmergencyStopMC | |
MotionManager::MC_ID | pid_id |
used to fade in the PIDs up to full strength (from initial zero) This is so the joints don't jerk on startup. |
|
Constructor.
Definition at line 28 of file StartupBehavior.cc. |
|
Destructor.
Definition at line 36 of file StartupBehavior.cc. |
|
inserts a control at the end of the menu
Definition at line 153 of file StartupBehavior.cc. Referenced by SetupBackgroundBehaviors(), SetupFileAccess(), SetupMenus(), SetupModeSwitch(), SetupStatusReports(), SetupTekkotsuMon(), SetupVision(), and SetupWalkEdit(). |
|
By default, merely adds to the reference counter (through AddReference()); Note you should still call this from your overriding methods.
Reimplemented from BehaviorBase. Definition at line 38 of file StartupBehavior.cc. |
|
By default, subtracts from the reference counter, and deletes if zero; Note you should still call this when you override this; Warning call this at the end of your DoStop(), not beginning (it might
Reimplemented from BehaviorBase. Definition at line 84 of file StartupBehavior.cc. |
|
closes out a submenu so that future calls to addItem() will be added to the enclosing menu, returns the menu being closed out
Definition at line 158 of file StartupBehavior.cc. Referenced by SetupBackgroundBehaviors(), SetupFileAccess(), SetupMenus(), SetupModeSwitch(), SetupStatusReports(), SetupTekkotsuMon(), SetupVision(), and SetupWalkEdit(). |
|
Gives a short description of what this class of behaviors does... you should override this (but don't have to).
Reimplemented from BehaviorBase. Definition at line 36 of file StartupBehavior.h. |
|
Identifies the behavior in menus and such.
Implements BehaviorBase. Definition at line 35 of file StartupBehavior.h. |
|
Sets up the vision pipelines (held in StartupBehavior_SetupVision.cc). We set the default vision generators and source IDs here. The vis*SID and def*Generator variables are defined in ProjectInterface. You can reassign their values as you see fit, which allows you to reorganize and adapt the vision pipeline, but still retain the ability of the included demo behaviors to access vision information. Definition at line 32 of file StartupBehavior_SetupVision.cc. Referenced by DoStart(). |
|
Uses a few timer events at the beginning to fade in the PID values, and closes the mouth too Reimplemented from BehaviorBase. Definition at line 92 of file StartupBehavior.cc. |
|
sets up Background Behaviors menu
Definition at line 20 of file StartupBehavior_SetupBackgroundBehaviors.cc. Referenced by SetupMenus(). |
|
sets up File Access menu
Definition at line 12 of file StartupBehavior_SetupFileAccess.cc. Referenced by SetupMenus(). |
|
Initializes the Controller menu structure - calls each of the other Setup functions in turn. Also adds Shutdown and Help items at the end Definition at line 116 of file StartupBehavior.cc. Referenced by DoStart(). |
|
sets up Mode Switch menu
Definition at line 20 of file StartupBehavior_SetupModeSwitch.cc. Referenced by SetupMenus(). |
|
sets up Status Reports menu
Definition at line 12 of file StartupBehavior_SetupStatusReports.cc. Referenced by SetupMenus(). |
|
sets up TekkotsuMon menu
Definition at line 17 of file StartupBehavior_SetupTekkotsuMon.cc. Referenced by SetupMenus(). |
|
sets up the Vision menu
Definition at line 123 of file StartupBehavior_SetupVision.cc. Referenced by SetupMenus(). |
|
sets up Walk Editing menus (contributed by PGSS 2003 team project - see StartupBehavior_SetupWalkEdit.cc )
Definition at line 31 of file StartupBehavior_SetupWalkEdit.cc. Referenced by SetupMenus(). |
|
future calls to addItem() will be placed under the most recently added item
Definition at line 148 of file StartupBehavior.cc. Referenced by SetupBackgroundBehaviors(), SetupFileAccess(), SetupMenus(), SetupModeSwitch(), SetupStatusReports(), SetupTekkotsuMon(), SetupVision(), and SetupWalkEdit(). |
|
used to fade in the PIDs up to full strength (from initial zero) This is so the joints don't jerk on startup.
Definition at line 60 of file StartupBehavior.h. Referenced by DoStart(), and processEvent(). |
|
only used during setup - easier than passing it around all the functions
Definition at line 58 of file StartupBehavior.h. Referenced by addItem(), endSubMenu(), SetupMenus(), and startSubMenu(). |
|
Behaviors spawned from DoStart, so they can automatically be stopped on DoStop.
Definition at line 57 of file StartupBehavior.h. Referenced by DoStart(), DoStop(), and initVision(). |
|
the main EmergencyStopMC
Definition at line 59 of file StartupBehavior.h. Referenced by DoStart(), DoStop(), processEvent(), SetupFileAccess(), and SetupTekkotsuMon(). |
Tekkotsu v2.0 |
Generated Wed Jan 21 03:23:28 2004 by Doxygen 1.3.4 |