Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
#include <FollowHeadBehavior.h>
Inheritance diagram for FollowHeadBehavior:
Press the chin button to loosen the head to point it, release the button to lock it again
Tilt of head determines x axis (forward/backward)
Roll of head determines y axis (sideways strafing)
Pan of head determines z axis (rotational)
The zero point of joint position is zero motion. Since the tilt is asymmetric (can tilt down farther than it can tilt up), the full range of the down tilt isn't used - if you tilt down farther than you could tilt it back, it'll just clip the speed. Besides, if the head is all the way down, it screws up the walk because the center of balance is changed.
Definition at line 23 of file FollowHeadBehavior.h.
Public Member Functions | |
FollowHeadBehavior () | |
just sets up the variables | |
virtual | ~FollowHeadBehavior () |
calls DoStop() if isActive() | |
virtual void | DoStart () |
Register for events and creates and adds two motion commands - a walker and a head pointer. | |
virtual void | DoStop () |
Removes its two motion commands. | |
virtual void | processEvent (const EventBase &e) |
Handles event processing. | |
virtual std::string | getName () const |
Identifies the behavior in menus and such. | |
Static Public Member Functions | |
std::string | getClassDescription () |
Gives a short description of what this class of behaviors does... you should override this (but don't have to). | |
Protected Attributes | |
const EventBase | head_release |
event mask for releasing head (chin button down) | |
const EventBase | head_lock |
event mask for locking head (chin button up) | |
const EventBase | clock |
event mask for updating walk direction (every 150 ms) | |
MotionManager::MC_ID | walker_id |
MC_ID for walker. |
|
just sets up the variables
Definition at line 10 of file FollowHeadBehavior.cc. |
|
calls DoStop() if isActive()
Definition at line 18 of file FollowHeadBehavior.cc. |
|
Register for events and creates and adds two motion commands - a walker and a head pointer.
Reimplemented from BehaviorBase. Definition at line 23 of file FollowHeadBehavior.cc. |
|
Removes its two motion commands.
Reimplemented from BehaviorBase. Definition at line 35 of file FollowHeadBehavior.cc. Referenced by ~FollowHeadBehavior(). |
|
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 43 of file FollowHeadBehavior.h. |
|
Identifies the behavior in menus and such.
Implements BehaviorBase. Definition at line 42 of file FollowHeadBehavior.h. |
|
Handles event processing. After every clock pulse, sets walk in direction of head Reimplemented from BehaviorBase. Definition at line 44 of file FollowHeadBehavior.cc. Referenced by DoStart(). |
|
event mask for updating walk direction (every 150 ms)
Definition at line 48 of file FollowHeadBehavior.h. Referenced by DoStart(), and processEvent(). |
|
event mask for locking head (chin button up)
Definition at line 47 of file FollowHeadBehavior.h. Referenced by DoStart(), and processEvent(). |
|
event mask for releasing head (chin button down)
Definition at line 46 of file FollowHeadBehavior.h. Referenced by DoStart(), and processEvent(). |
|
MC_ID for walker.
Definition at line 49 of file FollowHeadBehavior.h. Referenced by DoStart(), DoStop(), and processEvent(). |
Tekkotsu v2.0 |
Generated Wed Jan 21 03:23:12 2004 by Doxygen 1.3.4 |