#include <mrm-robot-maze.h>
|
| RobotMaze (char name[]=(char *)"RCJ Maze") |
|
void | bitmapsSet () |
|
void | decide () |
|
uint16_t | distance (Direction direction, bool firstCCW) |
|
void | directionDisplay (Direction direction) |
|
void | goAhead () |
|
void | imuFollow () |
|
void | loop () |
|
void | map () |
|
void | mazePrint () |
|
void | move () |
|
void | moveAhead () |
|
void | moveTurn () |
|
Direction | mToR (Direction directionAsSeenInMaze) |
|
void | omniWheelsTest () |
|
void | rescueMaze () |
|
Direction | rToM (Direction directionAsSeenByRobot) |
|
Tile * | tileContaining (int8_t x, int8_t y) |
|
Direction | wallClosest () |
|
void | wallFollow (Direction wallDirection) |
|
void | wallsDisplay () |
|
WallStatus | wallGet (int8_t x, int8_t y, Direction direction) |
|
void | wallDisplay (WallStatus wallStatus, Direction direction) |
|
void | wallsTest () |
|
int8_t | x (Direction direction) |
|
int8_t | y (Direction direction) |
|
| Robot (char name[15]=(char *)"MRMS robot", char ssid[15]=(char *)"MRMS", char wiFiPassword[15]=(char *)"mrms") |
|
void | actionAdd (ActionBase *action) |
|
void | actionEnd () |
|
bool | actionPreprocessing (bool andFinish=true) |
|
void | actionPreprocessingEnd () |
|
void | add (Board *aBoard) |
|
void | blink () |
|
void | bluetoothTest () |
|
void | end () |
|
void | canBusSniffToggle () |
|
void | canIdChange () |
|
void | colorIlluminationOff () |
|
void | colorIlluminationOn () |
|
void | colorPatternErase () |
|
void | colorPatternPrint () |
|
void | colorPatternRecognize () |
|
void | colorPatternRecord () |
|
void | delayMs (uint16_t pauseMs) |
|
void | delayMicros (uint16_t pauseMicros) |
|
uint8_t | devicesScan (bool verbose) |
|
void | devicesStart (uint8_t measuringMode=0) |
|
void | devicesStop () |
|
void | errors () |
|
void | firmwarePrint () |
|
float | fpsGet () |
|
void | fpsPrint () |
|
void | i2cTest () |
|
void | info () |
|
void | irFinder3Test () |
|
void | irFinder3TestCalculated () |
|
void | lidar2mTest () |
|
void | lidar4mTest () |
|
void | lidarCalibrate () |
|
void | menu () |
|
void | menuColor () |
|
void | menuMainAndIdle () |
|
void | menuReflectance () |
|
void | menuSystem () |
|
void | messagePrint (CANBusMessage *msg, bool outbound) |
|
void | messagesReceive () |
|
void | motorTest () |
|
void | nodeTest () |
|
void | noLoopWithoutThis () |
|
void | oscillatorTest () |
|
void | reflectanceArrayCalibrationPrint () |
|
void | run () |
|
uint16_t | serialReadNumber (uint16_t timeoutFirst=3000, uint16_t timeoutBetween=500, bool onlySingleDigitInput=false, uint16_t limit=0xFFFE, bool printWarnings=true) |
|
void | servoInteractive () |
|
bool | setup (bool andFinish=true) |
|
bool | sniffing () |
|
void | stopAll () |
|
bool | stressTest () |
|
void | thermoTest () |
|
bool | userBreak () |
|
void | verboseToggle () |
|
Robot for RCJ Rescue Maze, a class derived from the base Robot class.
◆ RobotMaze()
RobotMaze::RobotMaze |
( |
char |
name[] = (char*)"RCJ Maze" | ) |
|
Constructor
- Parameters
-
name | - it is also used for Bluetooth so a Bluetooth client (like a phone) will list the device using this name. |
◆ bitmapsSet()
void RobotMaze::bitmapsSet |
( |
| ) |
|
|
virtual |
Stores custom bitmaps in mrm-led8x8a.
Store custom bitmaps in mrm-led8x8a.
Implements Robot.
◆ decide()
void RobotMaze::decide |
( |
| ) |
|
Function that decides what to do next, using Tremaux algorithm. If a not-visited direction exists, go there. If not, return to the tile robot came from.
Function that decides what to do next, using Tremaux algorithm. If a not-visited direction exists, go that route. If not, return to the tile robot came from.
◆ directionDisplay()
void RobotMaze::directionDisplay |
( |
Direction |
direction | ) |
|
Displays direction in human-readable format. For debugging purposes.
- Parameters
-
- | direction in maze's system. |
◆ distance()
uint16_t RobotMaze::distance |
( |
Direction |
direction, |
|
|
bool |
firstCCW |
|
) |
| |
|
inline |
Distance measuring function. Sensors must have deviceId addresses exactly like here: 0 FR, 1 FL, 2 LF, 3 LB, 4 BL, 5 BR, 6 RB, 7 RF. F is front, B is back, L is left, R is right. In 2-letter designations first letter is a major direction, second minor. For example FL means Front-Left and first we choose major side (robot's front), then minor (left sensor on that side). In other words, first sensor is front-right and all the others must have increasing addresses counter-clockwise (CCW). @direction - direction in maze's system. Therefore, LEFT is always left, as seen from outside of the maze, no matter what the robot's direction is. It is normally not robot's left side. @firstCCW - first when counting ounter-clockwise (CCW) on that side, looking from inside of the robot. For example FL is first CCW and FR is not.
- Returns
- - distance in mm.
◆ goAhead()
void RobotMaze::goAhead |
( |
| ) |
|
|
inlinevirtual |
Orders the robot to go ahead. Overriden virtual function. Not used here.
Implements Robot.
◆ imuFollow()
void RobotMaze::imuFollow |
( |
| ) |
|
Drives the robot ahead, maintaing a given compass bearing.
◆ loop()
Custom test
Custom test. The function will be called many times during the test, till You issue "x" menu-command.
Implements Robot.
◆ map()
Maps walls detected and other external readings in variables.
◆ mazePrint()
void RobotMaze::mazePrint |
( |
| ) |
|
◆ move()
◆ moveAhead()
void RobotMaze::moveAhead |
( |
| ) |
|
Drives the robot straight ahead.
◆ moveTurn()
void RobotMaze::moveTurn |
( |
| ) |
|
Turns the robot till the target bearing achieved.
◆ omniWheelsTest()
void RobotMaze::omniWheelsTest |
( |
| ) |
|
Test for Mecanum wheels. Used only when the robot is rigged with mecanum wheels.
Test for Mecanum wheels. Used only when the robot is rigged with mecanum wheels. Not considered here.
◆ rescueMaze()
void RobotMaze::rescueMaze |
( |
| ) |
|
Starts RCJ Rescue Maze run.
◆ tileContaining()
Traverses all the chain till a tile with (x,y) is found.
- Parameters
-
x | - x coordinate. |
y | - y coordinata. |
- Returns
- - a tile with given coordinates and NULL if none exists.
◆ wallClosest()
Direction RobotMaze::wallClosest |
( |
| ) |
|
Finds the closest of the 4 walls around the tile.
- Returns
- - direction from maze's perspective.
◆ wallDisplay()
void RobotMaze::wallDisplay |
( |
WallStatus |
wallStatus, |
|
|
Direction |
direction |
|
) |
| |
Display one wall.
- Parameters
-
wallStatus | - wall's status. |
direction | - direction. |
◆ wallFollow()
void RobotMaze::wallFollow |
( |
Direction |
wallDirection | ) |
|
Goes ahead by following a wall. @wallDirection - direction in maze's perspective.
◆ wallGet()
WallStatus RobotMaze::wallGet |
( |
int8_t |
x, |
|
|
int8_t |
y, |
|
|
Direction |
direction |
|
) |
| |
Checks if wall exists in tile (x,y) and direction direction.
- Parameters
-
x | - tile's x coordinate. |
y | - tile's y coordinate. |
direction | - wall's direction. |
- Returns
- - type of wall.
◆ wallsDisplay()
void RobotMaze::wallsDisplay |
( |
| ) |
|
Uses 8x8 LED to display walls detected.
Use 8x8 LED to display walls detected.
◆ wallsTest()
void RobotMaze::wallsTest |
( |
| ) |
|
Test, checking and displaying all walls.
Test, checking and displaying walls.
◆ x()
int8_t RobotMaze::x |
( |
Direction |
direction | ) |
|
x coordinate of the tile next to the current one, in a given direction.
- Parameters
-
- Returns
- x coordinate.
◆ y()
int8_t RobotMaze::y |
( |
Direction |
direction | ) |
|
y coordinate of the tile next to the current one, in a given direction.
- Parameters
-
- Returns
- y coordinate.
The documentation for this class was generated from the following files:
- C:/Users/priba/Documents/PlatformIO/Projects/MRMS/src/mrm-robot-maze.h
- C:/Users/priba/Documents/PlatformIO/Projects/MRMS/src/mrm-robot-maze.cpp