-
Notifications
You must be signed in to change notification settings - Fork 4
Robot Control API
Dmitriy Jarosh edited this page May 15, 2019
·
2 revisions
To control robots you need to call function Crul() and write its result to the field "rul" of RP.Blue(numOfRobot) or RP.Yellow(numOfRobot) (for example: RP.Blue(1).rul = Crul(...)) Arguments of Crul(SpeedY, SpeedX, KickForward, SpeedR, KickUp, AutoKick, KickVoltage, EnableSpinner, SpinnerSpeed, KickerCharge, Beep) are:
- SpeedY - power for motors to move robot in Y axis of his coordinate system (from -100 to 100)
- SpeedX - power for motors to move robot in X axis of his coordinate system (from -100 to 100)
- KickForward - signal to robot that he has to kick the ball using straight line trajectory (0 or 1)
- SpeedR - power for motors to rotate robot (from -100 to 100)
- KickUp - signal to robot that he has to kick the ball using parabollic trajectory (0 or 1)
- AutoKick - type of autokick (0 - no auto kicking, 1 - kick forward if ball is found in robot, 2- kick up if ball is found in robot)
- KickVoltage - voltage on kicker, control strength of kick (from 0 to 15)
- EnableSpinner - signal to robot to turn on/off dribbler (0 or 1)
- SpinnerSpeed - voltage on dribbler, control speed of dribbler rotating (from 0 to 15)
- KickerCharge - signal to robot to turn on/off kicker charging (0 or 1)
- Beep - signal to robot to beep (0 or 1)