#include <mrm-robot-soccer.h>
|
| RobotSoccer (char name[]=(char *)"RCJ Soccer") |
|
uint16_t | back () |
|
int16_t | ballAngle () |
|
bool | barrier () |
|
void | bitmapsSet () |
|
uint16_t | brightness (uint8_t transistorNumber, uint8_t deviceNumber) |
|
bool | button (uint8_t number) |
|
void | catchBall () |
|
uint16_t | front () |
|
void | go (float speed, float angleDegrees, float rotation, uint8_t speedLimit) |
|
void | goAhead () |
|
float | heading () |
|
void | idle () |
|
uint16_t | left () |
|
bool | line (uint8_t transistorNumber, uint8_t deviceNumber) |
|
void | loop () |
|
void | play () |
|
float | pitch () |
|
uint16_t | right () |
|
float | roll () |
|
void | sign (uint8_t number) |
|
| 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 () |
|
◆ RobotSoccer()
RobotSoccer::RobotSoccer |
( |
char |
name[] = (char*)"RCJ Soccer" | ) |
|
Constructor
- Parameters
-
name | - it is also used for Bluetooth so a Bluetooth client (like a phone) will list the device using this name. |
◆ back()
Rear distance to wall
- Returns
- - in mm
◆ ballAngle()
Ball's direction
- Returns
- - robot's front is 0�, positive angles clockwise, negative anti-clockwise. Back of the robot is 180�.
◆ barrier()
bool RobotSoccer::barrier |
( |
| ) |
|
Read barrier
- Returns
- - true if interrupted
◆ bitmapsSet()
void RobotSoccer::bitmapsSet |
( |
| ) |
|
|
virtual |
Store bitmaps in mrm-led8x8a.
Implements Robot.
◆ brightness()
Line sensor - brightness of the surface
- Parameters
-
transistorNumber | - starts from 0 and end value depends on sensor. Usually 7 (for mrm-ref-can8) or 8 (for mrm-ref-can9). |
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |
- Returns
- - brightness as an analog value.
◆ button()
bool RobotSoccer::button |
( |
uint8_t |
number | ) |
|
Reads push button switch @number - 0 to 3, push button's ordinal number
- Returns
- - true if pressed
◆ catchBall()
void RobotSoccer::catchBall |
( |
| ) |
|
Go around the ball and approach it.
◆ front()
Front distance to wall
- Returns
- - in mm
◆ go()
void RobotSoccer::go |
( |
float |
speed, |
|
|
float |
angleDegrees, |
|
|
float |
rotation, |
|
|
uint8_t |
speedLimit |
|
) |
| |
Control of a robot with axles connected in a star formation, like in a RCJ soccer robot with omni wheels. Motor 0 is at 45 degrees, 1 at 135, 2 at -135, 3 at -45.
- Parameters
-
speed | - 0 to 100. |
angleDegrees | - Movement direction in a robot's coordinate system, in degrees. 0 degree is the front of the robot and positive angles are to the right. Values between -180 and 180. |
rotation | - Rotation speed (around the vertical axis), -100 to 100. Positive numbers turn the robot to the right. It makes sense to use smaller numbers because a value 100 turns on all the motors at maximal speed. |
speedLimit | - Speed limit, 0 to 127. For example, 80 will limit all the speeds to 80/127%. 0 will turn the motors off. |
◆ goAhead()
void RobotSoccer::goAhead |
( |
| ) |
|
|
virtual |
Test - go straight ahead.
Implements Robot.
◆ heading()
float RobotSoccer::heading |
( |
| ) |
|
Compass
- Returns
- - North is 0�, clockwise are positive angles, values 0 - 360.
◆ idle()
void RobotSoccer::idle |
( |
| ) |
|
No ball detected - return to Your goal.
◆ left()
Front distance to wall
- Returns
- - in mm
Left distance to wall
- Returns
- - in mm
◆ line()
bool RobotSoccer::line |
( |
uint8_t |
transistorNumber, |
|
|
uint8_t |
deviceNumber |
|
) |
| |
Line sensor
- Parameters
-
transistorNumber | - starts from 0 and end value depends on sensor. Usually 7 (for mrm-ref-can8) or 8 (for mrm-ref-can9). |
deviceNumber | - Device's ordinal number. Each call of function add() assigns a increasing number to the device, starting with 0. |
- Returns
- - true if white line found
◆ loop()
void RobotSoccer::loop |
( |
| ) |
|
|
virtual |
Custom test
Custom test.
Implements Robot.
◆ pitch()
float RobotSoccer::pitch |
( |
| ) |
|
Pitch
- Returns
- - Pitch in degrees. Inclination forwards or backwards. Leveled robot shows 0�.
◆ play()
void RobotSoccer::play |
( |
| ) |
|
Starts robot.
Starts robot
◆ right()
Right distance to wall
- Returns
- - in mm
◆ roll()
float RobotSoccer::roll |
( |
| ) |
|
Roll
- Returns
- - Roll in degrees. Inclination to the left or right. Values -90 - 90. Leveled robot shows 0�.
◆ sign()
void RobotSoccer::sign |
( |
uint8_t |
number | ) |
|
Display fixed sign stored in sensor sign's number
The documentation for this class was generated from the following files:
- C:/Users/priba/Documents/PlatformIO/Projects/MRMS/src/mrm-robot-soccer.h
- C:/Users/priba/Documents/PlatformIO/Projects/MRMS/src/mrm-robot-soccer.cpp