RealSenseIsolate class
An isolate to read RGB, depth, and colorized frames from the RealSense.
While using the RealSense SDK for depth streaming, OpenCV cannot access the standard RGB frames, so it is necessary for this isolate to grab the RGB frames as well.
Since the RealSense is being used for autonomy, certain settings that could interfere with the autonomy program are not allowed to be changed, even for the RGB camera.
- Inheritance
-
- Object
- IsolateChild<
IsolatePayload, VideoCommand> - CameraIsolate
- RealSenseIsolate
Constructors
- RealSenseIsolate({required CameraDetails details})
- Creates an isolate to read from the RealSense camera.
Properties
- camera → RealSenseInterface
-
The native RealSense object. MUST be
late
so it isn't initialized on the parent isolate.latefinal - details → CameraDetails
-
Holds the current details of the camera.
finalinherited
- fpsCount ↔ int
-
Records how many FPS this camera is actually running at.
getter/setter pairinherited
- fpsTimer ↔ Timer?
-
A timer to log out the fpsCount every 5 seconds using sendLog.
getter/setter pairinherited
- frameTimer ↔ Timer?
-
A timer to read from the camera at an FPS given by details.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → Object
-
The ID of this child. Used to identify it to the parent.
finalinherited
- name → CameraName
-
The name of this camera (where it is on the rover).
no setterinherited
-
receiver
↔ TypedReceivePort<
VideoCommand> -
The type-safe ReceivePort that will receive messages of type
R
from the parent.latefinalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusTimer ↔ Timer?
-
A timer to periodically send the camera status to the dashboard.
getter/setter pairinherited
Methods
-
dispose(
) → void -
Disposes of this camera and all other resources.
inherited
-
disposeCamera(
) → void -
Closes and releases the camera.
override
-
init(
TypedSendPort< IsolatePayload< port) → voidIsolatePayload, VideoCommand> > -
Saves the given
TypedSendPort
, and creates aTypedReceivePort
to send to the parent.inherited -
initCamera(
) → void -
Initializes the camera and starts streaming.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onData(
VideoCommand data) → void -
A callback to run when new data is received from the parent.
override
-
run(
) → Future< void> -
Runs when the child isolate is spawned, after init is called.
inherited
-
send(
IsolatePayload obj) → void -
Sends data to the parent.
inherited
-
sendFrame(
OpenCVImage image, {CameraDetails? detailsOverride}) → void -
Sends an individual frame to the dashboard.
inherited
-
sendFrames(
) → void -
Reads frame/s from the camera and sends it/them.
override
-
sendLog(
LogLevel level, String message) → void -
Logs a message by sending a LogPayload to the parent isolate.
inherited
-
sendRgbFrame(
Pointer< Uint8> rawRGB) → void - Sends the RealSense's RGB frame and optionally detects ArUco tags.
-
sendStatus(
[dynamic _]) → void -
Sends the current status to the dashboard.
inherited
-
start(
) → void -
Starts the camera and timers.
inherited
-
stop(
) → void -
Cancels all timers and stops reading the camera.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateDetails(
CameraDetails newDetails, {bool restart = true}) → void -
Updates the camera's details, which will take effect on the next sendFrame call.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited