Class RangeFinderController
A RangeFinder is a device that throw only one laser beam to measure the distance and/or intensity.
Inherited Members
Namespace: Mechatronics.SensorSDK
Syntax
[NodeCategory("Controller", "RangeFinder", NodeTick.Synchronous, (LifeCycle)0, 0F, NodeMode.Standard, false)]
public class RangeFinderController : NodeRuntime
Fields
framePeriod
Declaration
[Tooltip("Period that define a frame of data.")]
[Field("framePeriod", PortDirection.Right, FieldExtra.Write)]
[SerializeField]
protected PortType<float> framePeriod
Field Value
Type | Description |
---|---|
PortType<Single> |
samplingRate
Declaration
[Tooltip("Sensor sampling frequency (Sample per seconds)")]
[Field("Sampling rate", PortDirection.Left, FieldExtra.Read)]
[SerializeField]
protected PortType<uint> samplingRate
Field Value
Type | Description |
---|---|
PortType<UInt32> |
samplingRequest
Declaration
[Tooltip("List of orientations where to take a sample from.")]
[Field("SamplingRequest", PortDirection.Right, FieldExtra.Write)]
[SerializeField]
protected PortType<SamplingRequest> samplingRequest
Field Value
Type | Description |
---|---|
PortType<SamplingRequest> |
Methods
Enable(Scheduler.ClockState)
Initialize the controller.
Declaration
public override void Enable(Scheduler.ClockState clockState)
Parameters
Type | Name | Description |
---|---|---|
Scheduler.ClockState | clockState | The parameters of the waveform associated to this node |
Overrides
OnTick(Double, Double, Scheduler.ClockState, Scheduler.Signal)
Trigger a measurement based on the _samplingRate.
Declaration
public override bool OnTick(double now, double eventTime, Scheduler.ClockState clockState, Scheduler.Signal signal)
Parameters
Type | Name | Description |
---|---|---|
Double | now | The current time in seconds of the scheduler clocksource |
Double | eventTime | The current time in seconds of the scheduler waveform. This is independent from the clocksource time and aligned to every rising edge time in the waveform. |
Scheduler.ClockState | clockState | The current parameters of the waveform event associated to this node |
Scheduler.Signal | signal | Signals that the scheduler pass to the OnTick event receiver. These are signals that describe the action that should be done in the Node. For example, integrate this tick as multiple events. |
Returns
Type | Description |
---|---|
Boolean | Returns true if time integration was performed |