RobotLib  1
A set of software wrappers for Rovio, Roomba and NXT robots written in C#.
 All Classes Namespaces Functions Variables Enumerations Properties Pages
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
Rovio.API.Movement Class Reference

All movement commands. More...

Inheritance diagram for Rovio.API.Movement:
Rovio.API.MovementComponent Rovio.Component

Classes

class  ManualDriveComponent
 Manual drive commands. Majority of the drive commands feature the speed parameter: 1 (fastest) - 10 (slowest). Note that depending on the type of surface, the robot might have problems executing commands with very low speeds (i.e. it will stall). More...
 
class  MCUReportComponent
 Provides a run-time report from Rovio's microcontroller. Run the Update() method before accessing individual parameters of the report. This solution reduces the data traffic when accessing multiple parameters at the same time. More...
 
class  MovementResponseException
 Report errors in movement responses received from Rovio. More...
 
class  ReportComponent
 
class  TuningParametersComponent
 Manage robot parameters used during navigation: homing, docking and automatic driving. More...
 

Public Types

enum  NavigationState {
  IDLE = 0, HOMING = 1, DOCKING = 2, PLAYING_PATH = 3,
  RECORDING_PATH = 4
}
 Rovio's navigation state. More...
 
enum  ChargerStatus { IDLE = 0, COMPLETED = 1, CHARGING = 2, ERROR = 3 }
 Charger status. More...
 

Public Member Functions

 Movement (Robot _robot)
 The constructor.
 
string GetReport ()
 Get the current status of the robot (in a string format). Refer to Report for accessing individual items of this report.
 
void StartRecording ()
 Start recording a path.
 
void AbortRecording ()
 Stop recording and discard a path.
 
void StopRecording (string path)
 Stop recording and store a path.
 
void DeletePath (string path)
 Delete the specified path.
 
string GetPathList ()
 Get a list of stored paths.
 
void PlayPathForward ()
 Replay the specified path from the closest point to the last one.
 
void PlayPathBackward ()
 Replay the specified path from the closest point to the first one.
 
void StopPlaying ()
 Stop playing the current path.
 
void PausePlaying ()
 Pause playing the current path.
 
void RenamePath (string old_path, string new_path)
 Rename the specified path.
 
void GoHome ()
 Drive to home location without docking.
 
void GoHomeAndDock ()
 Drive to home location with docking.
 
void UpdateHomePosition ()
 Use the current location as home location.
 
void SetTuningParameters ()
 Set homing, docking and driving parameters. Refer to TuningParameters for setting the individual elements.
 
string GetTuningParameters ()
 Get homing, docking and driving parameters (in a string format). Refer to TuningParameters for accessing individual elements of the report.
 
void ResetNavStateMachine ()
 Stop and reset to idle.
 
void FrontLight (bool value)
 Switch on/off the front LED.
 
void IRSensor (bool value)
 Switch on/off the power of the IR sensor.
 
string GetMCUReport ()
 Get the report from the robot's microcontroller. Refer to MCUReport for accessing individual items of the report.
 
void ClearAllPaths ()
 Delete all stored paths.
 
NavigationState GetStatus ()
 Return the navigation status.
 
void SaveParameter (int index, int value)
 Store value for the specified parameter.
 
int ReadParameter (int index)
 Read the specified parameter value.
 
string GetLibNSVersion ()
 NorthStar/TrueTrack version.
 
void EmailImage (string email_address)
 Email the current image / set an action (in path recording mode).
 
void ResetHomeLocation ()
 Clear home location.
 
- Public Member Functions inherited from Rovio.API.MovementComponent
 MovementComponent (Robot _robot)
 The constructor.
 
virtual string Request (string value)
 Request and parse the movement command.
 
- Public Member Functions inherited from Rovio.Component
 Component (Robot _robot)
 The constructor.
 
virtual void Update ()
 The Update function that manually refreshes the state of a given component (e.g. when AutoUpdate = false)
 

Public Attributes

ReportComponent Report
 Report commands.
 
ManualDriveComponent ManualDrive
 Manual Drive commands.
 
TuningParametersComponent TuningParameters
 Tuning Parameters commands.
 
MCUReportComponent MCUReport
 MCU Report commands.
 

Additional Inherited Members

- Protected Member Functions inherited from Rovio.API.MovementComponent
string GetParameter (string value)
 Parse the specific parameter and return its value.
 
- Protected Attributes inherited from Rovio.API.MovementComponent
string report
 Stores the latest response from the robot. Usefull for commands supporting multiple fields in the response.
 

Detailed Description

All movement commands.

Some of the commands perform multiple actions or return multiple data items (i.e. GetReport(), ManualDrive, GetTuningParameters(), GetMCUReport()). There is a dedicated class implemented for each such command.

Path related commands use the TrueTrack sensor and might require careful timing if issued in a sequence.

Member Enumeration Documentation

Charger status.

Rovio's navigation state.

Enumerator:
IDLE 

Idle.

HOMING 

Driving home.

DOCKING 

Docking.

PLAYING_PATH 

Playing a path.

RECORDING_PATH 

Recoring a path.

Member Function Documentation

string Rovio.API.Movement.GetReport ( )

Get the current status of the robot (in a string format). Refer to Report for accessing individual items of this report.

Remarks:

  • Rovio will resist going outside NorthStar coverage area while recording path
  • Rovio will stop recording if coverage is lost
  • Rovio will stop recording if user connection is lost
string Rovio.API.Movement.GetTuningParameters ( )

Get homing, docking and driving parameters (in a string format). Refer to TuningParameters for accessing individual elements of the report.

The parameters include: LeftRight, Forward, Reverse, DriveTurn, HomingTurn, ManDrive, ManTurn and DockTimeout.

void Rovio.API.Movement.PausePlaying ( )

Pause playing the current path.

The playback continues whith the next pause command and stops completely with the stop command.

void Rovio.API.Movement.PlayPathBackward ( )

Replay the specified path from the closest point to the first one.

If the NorthStar signal is lost the playback is interrupted.

void Rovio.API.Movement.PlayPathForward ( )

Replay the specified path from the closest point to the last one.

If the NorthStar signal is lost the playback is interrupted.

void Rovio.API.Movement.SetTuningParameters ( )

Set homing, docking and driving parameters. Refer to TuningParameters for setting the individual elements.

The parameters include: LeftRight, Forward, Reverse, DriveTurn, HomingTurn, ManDrive, ManTurn and DockTimeout.

Member Data Documentation

ManualDriveComponent Rovio.API.Movement.ManualDrive

Manual Drive commands.

MCUReportComponent Rovio.API.Movement.MCUReport

MCU Report commands.

ReportComponent Rovio.API.Movement.Report

Report commands.

TuningParametersComponent Rovio.API.Movement.TuningParameters

Tuning Parameters commands.


The documentation for this class was generated from the following file: