RobotKit API
Public Member Functions | Static Public Member Functions | Properties
RKRollCommand Class Reference

Class to send roll commands to change a robot's heading and speed. More...

#import <RKRollCommand.h>

Inheritance diagram for RKRollCommand:
RKDeviceCommand RKDeviceMessage

List of all members.

Public Member Functions

(id) - initWithHeading:velocity:

Static Public Member Functions

(void) + sendCommandWithHeading:velocity:
(void) + sendCommandWithHeading:velocity:stopped:
(void) + sendStop
(void) + resendCurrent
(void) + setStickyVelocity:
(void) + unsetStickyVelocity
(BOOL) + isVelocityStuck
(float) + currentHeading
(float) + currentVelocity
(BOOL) + isCurrentlyStopped

Properties

float heading
float velocity
BOOL stop

Detailed Description

Nonmutable class that encapsulates a roll command. This command takes an angle and velocity which the robot uses to stear to this new heading and speed.

See also:
RKRollResponse

Member Function Documentation

+ (float) currentHeading

The current heading the robot acknoledged as it's heading.

+ (float) currentVelocity

The current velocity the robot acknowledged as it's velocity.

- (id) initWithHeading: (float)  heading
velocity: (float)  velocity 

Initializer that sets the heading and velocity for the command.

See also:
+ sendCommandWithHeading:velocity:
Parameters:
headingThe angle in degrees from 0 to 360 for the robot to head to.
velocityThe velocity from 0.0, no motion, to 1.0, full velocity for the robot to travel at.
Returns:
The initialized instance.
+ (BOOL) isCurrentlyStopped

Indicates if the robot has acknowledged a full stop.

+ (BOOL) isVelocityStuck

Indicates if an new instance of RKRollCommand will be stuck to a set velocity.

+ (void) resendCurrent

Resend the current heading and velocity values.

+ (void) sendCommandWithHeading: (float)  heading
velocity: (float)  velocity 

Sends a roll command to the robot for the heading and velocity.

Parameters:
headingThe angle in degrees from 0 to 360 for the robot to head to.
velocityThe velocity from 0.0, no motion, to 1.0, full velocity for the robot to travel at.
+ (void) sendCommandWithHeading: (float)  heading
velocity: (float)  velocity
stopped: (BOOL)  state 
Deprecated:
Use sendCommandWithHeading:velocity: to change the robot's heading and velocity, and use sendStop for a full stop.
+ (void) sendStop

Stops the robot in it's tracks

+ (void) setStickyVelocity: (float)  velocity

This sets a velocity that sticks for all instances of RKRollCommand.

+ (void) unsetStickyVelocity

Clears the sticky velocity, so all new instances of RKRollCommand use the velocity parameter.


Property Documentation

- (float) heading [read, assign]

The angle in degrees set for the heading.

- (BOOL) stop [read, write, assign]

Indicates if this command will stop the robot.

- (float) velocity [read, assign]

The new velocity for the robot.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties