Objects of this class use a connection to manipulating a robot.
More...
#import <RKRobotControl.h>
List of all members.
Detailed Description
This class is used to control a robot. It's main responsibility is to high order control methods like converting input coordinates to robotic coordinates to send to the device.
Member Function Documentation
- (void) cancelControlledBoost |
|
|
|
Cancels the currently running controlled boost so that the velocity is no longer stuck at the boosted level. This command is only effective if the robot is currently in a controlled boost mode.
Closes communications with the robot.
- (void) driveWithCoord1: |
|
(double) |
coord1 |
coord2: |
|
(double) |
coord2 |
coord3: |
|
(double) |
coord3 |
|
|
| |
Method used to drive a robot with a set coordinates. Coordinates are unspecified as the can be angular or scaler coordinates. The coordinates are dependent on the drive method used.
- Parameters:
-
coord1 | The first parameter in the coordinate system. |
coord2 | The second parameter in the coordinate system. |
coord3 | The third parameter in the coordinate system. |
- (id) initWithRobot: |
|
(RKRobot *) |
aRobot |
|
Initializer that setups control of a robot.
- Parameters:
-
aRobot | The RKRobot instance to control. |
- Returns:
- The initialized instance or nil if the robot can't be controlled.
Uncontrolled boost to give a Sphero enough momentum to go over jumps.
Opens the connection by seting up communication streams, and testing that the robot communications with some initial startup commands.
- (void) resetDeadZoneSize |
|
|
|
Resets the dead zone to the default value.
- (void) rollAtHeading: |
|
(float) |
angle |
velocity: |
|
(float) |
velocity |
|
|
| |
Tells the robot to move in the direction given by the angle, and at a given velocity. This method will honor the dead zone.
- Parameters:
-
angle | The direction given by an angle between 0° and 360°. |
velocity | A velocity between 0.0 and 1.0. |
- (void) rotateToHeading: |
|
(float) |
angle |
|
Method to rotate Sphero to a heading without moving the ball. Used during calibration.
- Parameters:
-
angle | A heading angle between 0° to 360° |
- (void) startCalibration |
|
|
|
Starts the calibration mode for Sphero. This mainly sets up the calibration LED.
- (void) startControlledBoost |
|
|
|
Tells the robot to move at the given velocity for the boost time. During the time interval, the user can control the robot's direction but the velocity is fixed.
- (void) stopCalibrated: |
|
(BOOL) |
calibrate |
|
Stop calibration mode for Sphero.
- Parameters:
-
calibrate | YES to calibrate for new heading, and NO to stop calibration without setting calibration on the ball. |
Stops the device from moving.
Property Documentation
- (float) boostTimeScale [read, write, assign] |
The fraction of 25.5 seconds for a boost. Default value is 1.0.
- See also:
- - jump
- (BOOL) calibrating [read, assign] |
Property for clients to check that the robot is being calibrated.
- Returns:
- YES if the robot is being calibrated, otherwise NO if in normal mode.
- (float) controlledBoostVelocity [read, write, assign] |
Property for assigning a velocity for controlled boosts.
- (float) deadZoneSize [read, write, assign] |
Provides a deadzone in terms of a fraction of full velocity.
Property to set and access the drive algorithm. A RKSteeringWheelDriveMethod is created by default.
- See also:
- RKDriveAlgorithm
- (double) stopOffset [read, write, assign] |
Property for setting an offset to adjust what is consider a stop point for the input. Depends on the drive method used.
- See also:
- RKDriveMethod
The documentation for this class was generated from the following file: