![]() |
BotNavSim
v0.4.3
Mobile Robot Simulation
|
Parameter sensor is a 2D FOV sensor model, loosely based on real ultrasonic sensor behaviour More...
Public Member Functions | |
override void | Enable (Robot.SensorData callback) |
Enable this instance and pass the reference to the Robot.SensorData callback function to be called when the sensor has new information to share. More... | |
override void | Disable () |
Disable this instance. More... | |
Public Attributes | |
bool | drawDebug = true |
If true the sensor will use Draw to draw raycast lines in the simulation More... | |
float | FOV = 20f |
The field of view angle in degrees. More... | |
float | maxRange = 20f |
The maximum distance for each raycast. More... | |
float | updateDt = 0.2f |
The sensor update delta time in seconds. More... | |
Properties | |
bool | scanning [get, private set] |
Gets a value indicating whether this ParamSensor is scanning. More... | |
Private Member Functions | |
IEnumerator | UpdateData () |
Update data coroutine. Once started, executes until disabled. Calls _callback on Robot every update. Update rate defined by updateDt More... | |
float | Cast (Vector3 direction) |
Wrapper function for a single raycast. Returns the proximity distance in the specified direction. More... | |
Private Attributes | |
Robot.SensorData | _callback |
The Robot.SensorData callback to pass ProximityData to More... | |
ProximityData | _data |
Cached ProximityData from the last UpdateData() scan More... | |
Parameter sensor is a 2D FOV sensor model, loosely based on real ultrasonic sensor behaviour
Definition at line 11 of file ParamSensor.cs.
|
private |
Wrapper function for a single raycast. Returns the proximity distance in the specified direction.
direction | Direction. |
Definition at line 110 of file ParamSensor.cs.
|
virtual |
Disable this instance.
Implements Sensor.
Definition at line 74 of file ParamSensor.cs.
|
virtual |
Enable this instance and pass the reference to the Robot.SensorData callback function to be called when the sensor has new information to share.
callback | Callback. |
Implements Sensor.
Definition at line 67 of file ParamSensor.cs.
|
private |
Update data coroutine. Once started, executes until disabled. Calls _callback on Robot every update. Update rate defined by updateDt
Definition at line 86 of file ParamSensor.cs.
|
private |
The Robot.SensorData callback to pass ProximityData to
Definition at line 55 of file ParamSensor.cs.
|
private |
Cached ProximityData from the last UpdateData() scan
Definition at line 60 of file ParamSensor.cs.
bool ParamSensor.drawDebug = true |
If true the sensor will use Draw to draw raycast lines in the simulation
Definition at line 20 of file ParamSensor.cs.
float ParamSensor.FOV = 20f |
The field of view angle in degrees.
Definition at line 25 of file ParamSensor.cs.
float ParamSensor.maxRange = 20f |
The maximum distance for each raycast.
Definition at line 30 of file ParamSensor.cs.
float ParamSensor.updateDt = 0.2f |
The sensor update delta time in seconds.
Definition at line 35 of file ParamSensor.cs.
|
getprivate set |
Gets a value indicating whether this ParamSensor is scanning.
true
if scanning; otherwise, false
.
Definition at line 45 of file ParamSensor.cs.