|
Bratmobile
|


Public Member Functions | |
| Configurator (Task _task) | |
| void | insertCoordinate (float x, float y) |
| Inserts one xy coordinate in the coordinate container. | |
| virtual void | init (Task _task=Task()) |
| Initialises configurator. More... | |
| virtual bool | Spawner () |
| Calls functions to explore the state space and extract a plan. More... | |
| int | getIteration () |
| void | addIteration (int i=1) |
| void | assignDisturbanceToTask (const Disturbance &d, Task &t) |
| void | dummy_vertex (vertexDescriptor src) |
| simResult | simulate (Task t, b2World &w) |
| Simulates this task, includes creating the robot object. More... | |
| virtual float | remainingSimulationTime (const Task *const t=NULL) |
| void | estimate_current_vertex () |
| void | printPlan (std::vector< vertexDescriptor > *p=NULL) |
| std::pair< edgeDescriptor, bool > | addVertex (const vertexDescriptor &src, vertexDescriptor &v1, Edge edge=Edge(), bool topDown=0) |
| Add state to the cognitive map and set next state Task direction and options. More... | |
| virtual void | explore_plan (b2World &)=0 |
| Explores and plan. | |
| void | registerInterface (MotorInterface *) |
| void | newScanEvent () |
| Spawns tasks, creates plans, tracks task and controls real-world task switching option to run in thread. Thread can be used if planning time might exceed 200ms (LIDAR sampling rate) but doesn't have to be. | |
| void | clearData () |
| Clears coordinates. | |
| virtual void | change_task () |
| changes tasks executing on the robot | |
| void | update_graph (TransitionSystem &g, const TrackingResult &tr) |
| float | approximate_angle (float angle, Direction d, simResult::resultType outcome) |
| Approximating angle to divisors of pi/2. More... | |
| virtual void | adjust_goal_expectation () |
| Uses tracking information to adjust the position of the goal relative to the robot. | |
| std::pair< bool, Direction > | getOppositeDirection (Direction d) |
| void | adjust_simulated_task (const vertexDescriptor &v, Task &t) |
| If Task. More... | |
| void | register_controller (Controller *controller) |
| Controller * | get_controller () |
| void | register_tracker (Tracker *_tracker) |
| registers and initialises the tracker to the goal | |
| Tracker * | get_tracker () const |
| MotorInterface * | get_motor_interface () |
| void | register_planner (Planner *_p) |
| void | setSimulationStep (float f) |
| void | register_logger (Logger *l) |
| void | register_goalChanger (GoalChanger *gc) |
| virtual Robot | makeRobot (b2World &world, const Task &task) |
| Makes the robot object in the world with the given start position and task. More... | |
| bool | areInterfacesSetUp () |
| void | assignBodyFeatures (Task &t, const BodyFeatures &bf) |
| Assigns body features to the disturbance of a task (NOTE: affordance and validity of the disturbance will remain the same) More... | |
| void | assignDimensions (Task &t, float halfLength, float halfWidth) |
| Assigns dimensions to the disturbance of a task (NOTE: pose, affordance and validity of the disturbance will remain the same) More... | |
| void | register_worldBuilder (WorldBuilder *wb) |
| b2Transform | get_start (const Task *const t) |
| Direction | get_direction (const Task *const t) |
Static Public Member Functions | |
| static void | MulT (const b2Transform &B, Task &task) |
| Matrix multiply by transpose. | |
| static void | InvMul (const b2Transform &B, Task &task) |
| Matrix multiply by transpose. | |
| static void | InvMul_ (const b2Transform &B, Task &task) |
| Matrix multiply by transpose. | |
| static void | Mul (const b2Transform &B, Task &task) |
| Matrix multiplication. | |
Protected Attributes | |
| int | iteration =0 |
| int | simulatedTasks =0 |
| Task | currentTask |
| Controller * | task_controller =NULL |
| Tracker * | tracker =NULL |
| MotorInterface * | control =NULL |
| Planner * | planner =NULL |
| Logger * | logger =NULL |
| bool | running =0 |
| std::thread * | LIDAR_thread =NULL |
| float | simulationStep =2*std::max(ROBOT_HALFLENGTH, ROBOT_HALFWIDTH) |
| std::chrono::high_resolution_clock::time_point | previousTimeScan |
| GoalChanger * | goal_changer =NULL |
| std::vector< vertexDescriptor > | m_plan |
| std::vector< vertexDescriptor > | current_vertices |
| Task | controlGoal |
| CoordinateContainer | data2fp |
| TransitionSystem | transitionSystem =TransitionSystem(1) |
| WorldBuilder * | worldBuilder =new WorldBuilder() |
| vertexDescriptor | currentVertex =MOVING_VERTEX |
| edgeDescriptor | movingEdge =edgeDescriptor() |
| edgeDescriptor | currentEdge =movingEdge |
| std::pair< edgeDescriptor, bool > Configurator::addVertex | ( | const vertexDescriptor & | src, |
| vertexDescriptor & | v1, | ||
| Edge | edge = Edge(), |
||
| bool | topDown = 0 |
||
| ) |
Add state to the cognitive map and set next state Task direction and options.
| src | source state |
| v1 | new state |
| edge | connecting edge between src->v1 |
| topDown | flag determining whether state v1 has been simulated already or not |
| void Configurator::adjust_simulated_task | ( | const vertexDescriptor & | v, |
| Task & | t | ||
| ) |
| float Configurator::approximate_angle | ( | float | angle, |
| Direction | d, | ||
| simResult::resultType | outcome | ||
| ) |
Approximating angle to divisors of pi/2.
| angle | the angle to approximate |
| d | the direction of the robot |
| outcome | the outcome of the last simulation |
| void Configurator::assignBodyFeatures | ( | Task & | t, |
| const BodyFeatures & | bf | ||
| ) |
Assigns body features to the disturbance of a task (NOTE: affordance and validity of the disturbance will remain the same)
| t | the task |
| bf | body features |
| void Configurator::assignDimensions | ( | Task & | t, |
| float | halfLength, | ||
| float | halfWidth | ||
| ) |
Assigns dimensions to the disturbance of a task (NOTE: pose, affordance and validity of the disturbance will remain the same)
| t | the task |
| halfLength | |
| halfWidth |
| void Configurator::estimate_current_vertex | ( | ) |
| g | the cognitive map |
| t | the task which is currently being executed on the robot |
| std::pair< bool, Direction > Configurator::getOppositeDirection | ( | Direction | d | ) |
Initialises configurator.
| _task | the new overarching goal |
Makes the robot object in the world with the given start position and task.
| world | |
| start | |
| taskWithGoal |
Reimplemented in DiscreteConfigurator, and FocusedConfigurator.
Simulates this task, includes creating the robot object.
| t | the task (should already be initialised) |
| w | the world (should already contain any objects aside from the robot) |
|
virtual |
Calls functions to explore the state space and extract a plan.
| void Configurator::update_graph | ( | TransitionSystem & | g, |
| const TrackingResult & | tr | ||
| ) |
@brieF updates the cognitive map and goal by applying a 2D transform, and sets current task Di to the observed disturbance in the tracking result
| g | the cognitive map |
| tr | the tracking result |