C# Class CSharpSlam.RobotControl

Represents the control functions of a Neobotix robot and the visual appearance on the computer screen.
Inheritance: IRobotControl
Mostra file Open project: samub/CSharpSlam Class Usage Examples

Private Properties

Property Type Description
CalculatePose void
GetLaserScannerData ].double[
PoseChanged void
RequestLaserScannerDataRefresh void
StartSimulation void
StopSimulation void

Public Methods

Method Description
ClearMap ( ) : void

Clears the layer data collected for the map.

Connect ( string host ) : int

Function for connecting to the robot.

Disconnect ( ) : void

Disconnects the robot.

GetLayers ( ) : Layers

TODO: test function, should be removed later

GetWheelSpeed ( ) : double[]
OnSimulationStateChanged ( ) : void

Trigger for the simulation state change event.

RobotControl ( ) : System

Initializes a new instance of the RobotControl class.

SetSimulationState ( SimulationCommand command ) : void

Starts, stops or resets the V-REP EDU simulation according to the given command.

SetWheelSpeed ( double linAng ) : void
SetWheelSpeed ( double r, double l ) : void

Sets the speed of the joints of the robot.

Private Methods

Method Description
CalculatePose ( object sender, EventArgs e ) : void

Switch Pose data between Localization and Mapbuilder classes. Localization calculates the new Pose data from the given layers by the Mapbuilder and then give it back to the sender.

GetLaserScannerData ( ) : ].double[

Collects the laser scanner data from the simulator.

PoseChanged ( object sender, EventArgs e ) : void

Switch Pose data between Localization and Mapbuilder classes when any changes happened.

RequestLaserScannerDataRefresh ( object sender, EventArgs e ) : void

Request to refresh the laser scanner data.

StartSimulation ( ) : void

Starts the simulation in the V-REP EDU application and begins drawing the map on a new thread.

StopSimulation ( ) : void

Stops the simulation in the V-REP EDU application and aborts the map drawing thread.

Method Details

ClearMap() public method

Clears the layer data collected for the map.
public ClearMap ( ) : void
return void

Connect() public method

Function for connecting to the robot.
public Connect ( string host ) : int
host string Address of the robot.
return int

Disconnect() public method

Disconnects the robot.
public Disconnect ( ) : void
return void

GetLayers() public method

TODO: test function, should be removed later
public GetLayers ( ) : Layers
return Layers

GetWheelSpeed() public method

public GetWheelSpeed ( ) : double[]
return double[]

OnSimulationStateChanged() public method

Trigger for the simulation state change event.
public OnSimulationStateChanged ( ) : void
return void

RobotControl() public method

Initializes a new instance of the RobotControl class.
public RobotControl ( ) : System
return System

SetSimulationState() public method

Starts, stops or resets the V-REP EDU simulation according to the given command.
public SetSimulationState ( SimulationCommand command ) : void
command SimulationCommand The given command.
return void

SetWheelSpeed() public method

public SetWheelSpeed ( double linAng ) : void
linAng double
return void

SetWheelSpeed() public method

Sets the speed of the joints of the robot.
public SetWheelSpeed ( double r, double l ) : void
r double The right joint.
l double The left joint.
return void