![]() |
BotNavSim
v0.4.3
Mobile Robot Simulation
|
Robot class bridges the gap between sensors and INavigation. The navigation direction is cached in Robot.navigationCommand. This class does not implement any physics simulation. Robot locomotion models are implemented in other classes that require this component for communications and data. More...
Public Member Functions | |
delegate void | SensorData (ProximityData data) |
Sensor callback delegate type More... | |
void | NavigateToDestination () |
Enable sensors, start moving toward destination using INavigation More... | |
void | Reset () |
Reset the robot, disable sensors More... | |
void | ReceiveSensorData (ProximityData data) |
Sensor data callback passes proximity data to INavigation More... | |
Public Attributes | |
bool | manualControl |
If true, the robot navigation is controlled using the keyboard. More... | |
bool | moveEnabled |
A flag indicating whether the robot should try moving. More... | |
float | stopDistance |
The maximum distance from the destination before setting atDestination to true . More... | |
Transform | destination |
Reference to the destination GameObject More... | |
Vector3 | centerOfMassOffset |
RigidBody center of mass offset vector in local coordinates. More... | |
Properties | |
INavigation | navigation [get, set] |
Interface to the navigation assembly. More... | |
Vector3 | navigationCommand [get, private set] |
The cached navigation bearing from INavigation. More... | |
bool | pathFound [get] |
Gets a value indicating whether navigation found a path to destination. More... | |
Vector3 | position [get, set] |
Gets or sets the transform position. More... | |
Transform | cameraMount [get, private set] |
The first-person perspective camera position. More... | |
Bounds | bounds [get] |
Gets the bounds of the robot for IObservable More... | |
bool | atDestination [get] |
float | distanceToDestination [get] |
bool | isStuck [get] |
int | stuckpc [get] |
![]() | |
string | name [get] |
Gets the name of the observable object More... | |
Bounds | bounds [get] |
Gets the bounds of the observable object (size and location) More... | |
Private Member Functions | |
void | Awake () |
void | Update () |
void | OnDrawGizmos () |
IEnumerator | StuckDetector () |
IEnumerator | RecordPath () |
Private Attributes | |
INavigation | _navigation |
Sensor[] | _sensors |
Vector3 | _move |
int | _stuckCounter |
Vector3[] | _positions |
BotPath | _path |
Vector3 | _size |
Robot class bridges the gap between sensors and INavigation. The navigation direction is cached in Robot.navigationCommand. This class does not implement any physics simulation. Robot locomotion models are implemented in other classes that require this component for communications and data.
|
private |
Definition at line 210 of file Robot.cs.
void Robot.NavigateToDestination | ( | ) |
Enable sensors, start moving toward destination using INavigation
Definition at line 164 of file Robot.cs.
|
private |
Definition at line 286 of file Robot.cs.
void Robot.ReceiveSensorData | ( | ProximityData | data | ) |
Sensor data callback passes proximity data to INavigation
data | Data. |
Definition at line 188 of file Robot.cs.
|
private |
Definition at line 323 of file Robot.cs.
void Robot.Reset | ( | ) |
Reset the robot, disable sensors
Definition at line 176 of file Robot.cs.
delegate void Robot.SensorData | ( | ProximityData | data | ) |
Sensor callback delegate type
|
private |
Definition at line 302 of file Robot.cs.
|
private |
Definition at line 231 of file Robot.cs.
|
private |
Vector3 Robot.centerOfMassOffset |
Transform Robot.destination |
bool Robot.manualControl |
bool Robot.moveEnabled |
float Robot.stopDistance |
The maximum distance from the destination before setting atDestination to true
.
|
get |
Gets the bounds of the robot for IObservable
|
getprivate set |
|
getset |
Interface to the navigation assembly.
When set, the INavigation interface is initialised: INavigation.searchBounds is set, INavigation.origin is set, INavigation.destination is set.
|
getprivate set |
The cached navigation bearing from INavigation.
|
get |
Gets a value indicating whether navigation found a path to destination.
true
if path found; otherwise, false
.
|
getset |