Bratmobile
|
Classes | |
struct | Action |
class | Listener |
Public Member Functions | |
Task::Action | getAction () const |
AffordanceIndex | getAffIndex () |
Direction | H (Disturbance ob, Direction d, bool topDown=0) |
Agent transfer function H which generates a motor output (Action) in response to a disturbance. More... | |
void | setEndCriteria (const Angle &angle=SAFE_ANGLE, const Distance &distance=BOX2DRANGE) |
void | setEndCriteria (const Distance &distance) |
void | setEndCriteria (const EndCriteria &ec) |
EndedResult | checkEnded (b2Transform robotTransform=b2Transform_zero, Direction dir=UNDEFINED, bool relax=0, b2Body *robot=NULL, std::pair< bool, b2Transform > use_start=std::pair< bool, b2Transform >(1, b2Transform_zero)) |
Check if this task has ended based on state information (default are info for the task which calls the method) More... | |
EndedResult | checkEnded (const State &n, Direction dir=UNDEFINED, bool relax=false, std::pair< bool, b2Transform > use_start=std::pair< bool, b2Transform >(1, b2Transform_zero)) |
Check if a state represents the end of this task. More... | |
bool | checkEnded (const b2PolygonShape &box, const b2Transform &robot_pose=b2Transform_zero, Disturbance *dist_obs=NULL) |
Uses a virtual sensor (attention window) to determine whether the task has ended or not. More... | |
Task (Direction d) | |
Task (Disturbance ob, Direction d, b2Transform _start=b2Transform(b2Vec2(0.0, 0.0), b2Rot(0.0)), bool topDown=0) | |
simResult | bumping_that (b2World &_world, int iteration, b2Body *, float remaining=SIM_DURATION) |
Executes this task in a Box2D simulation. More... | |
EndCriteria | getEndCriteria (const Disturbance &) |
EndCriteria | getEndCriteria () |
bool | endCriteria_met (Angle &, Distance &) |
b2Transform | from_Di (const b2Transform *custom_start=NULL, Disturbance *d_obs=NULL) |
void | set_change (bool b) |
bool | get_change () |
bool | is_over () |
If task has finished executing. More... | |
Disturbance * | get_disturbance_ptr () |
Get a pointer to the disturbance. More... | |
const Disturbance & | get_disturbance () const |
void | setMotorStep (int i) |
int & | getMotorStep () |
b2Transform | getStart () |
b2Transform & | getStartRef () |
Direction | get_direction () |
void | set_direction (Direction d) |
Protected Attributes | |
char | planFile [250] |
bool | debug_k =false |
bool | change =0 |
b2Transform | start =b2Transform_zero |
EndCriteria | endCriteria |
Direction | direction = DEFAULT |
int | motorStep =0 |
AffordanceIndex | affordance =NONE |
Action | action |
Disturbance | disturbance |
Friends | |
class | Configurator |
simResult Task::bumping_that | ( | b2World & | _world, |
int | iteration, | ||
b2Body * | robot, | ||
float | remaining = SIM_DURATION |
||
) |
Executes this task in a Box2D simulation.
_world | box2d world |
iteration | configurator iteration (for logging) |
remaining | (simulation duration in seconds) |
EndedResult Task::checkEnded | ( | b2Transform | robotTransform = b2Transform_zero , |
Direction | dir = UNDEFINED , |
||
bool | relax = 0 , |
||
b2Body * | robot = NULL , |
||
std::pair< bool, b2Transform > | use_start = std::pair <bool,b2Transform>(1, b2Transform_zero) |
||
) |
Check if this task has ended based on state information (default are info for the task which calls the method)
robotTransform | the robot's pose to evaluate |
dir | the direction of the task being carried out |
relax | apply a larger threshold to check whehter a goal was reached |
robot | robot box2d body |
use_start | use a custom start for the task |
bool Task::checkEnded | ( | const b2PolygonShape & | box, |
const b2Transform & | robot_pose = b2Transform_zero , |
||
Disturbance * | dist_obs = NULL |
||
) |
Uses a virtual sensor (attention window) to determine whether the task has ended or not.
box | the sensor |
robot_pose | |
dist_obs | pointer to the observed disturbance (the disturbance as it was at the beginning of the task, or as it was expected) |
EndedResult Task::checkEnded | ( | const State & | n, |
Direction | dir = UNDEFINED , |
||
bool | relax = false , |
||
std::pair< bool, b2Transform > | use_start = std::pair <bool,b2Transform>(1, b2Transform_zero) |
||
) |
Check if a state represents the end of this task.
n | the state |
dir | the direction of the task being carried out |
relax | apply a larger threshold to check whehter a goal was reached |
use_start | use a custom start for the task |
|
inline |
Get a pointer to the disturbance.
Direction Task::H | ( | Disturbance | ob, |
Direction | d, | ||
bool | topDown = 0 |
||
) |
Agent transfer function H which generates a motor output (Action) in response to a disturbance.
ob | the disturbance |
d | top-down instruction on how to generate the Action. DEFAULT with no top down control generates a reflex |
topDown | whether the input direction should be used as is (true) or to generate a reflex (false) |
NB: only generates default turns if absolute angle of the disturbance is larger than .1rad
|
inline |
If task has finished executing.