nanover.trajectory.frame_publisher module
- class nanover.trajectory.frame_publisher.FramePublisher
Bases:
TrajectoryServiceServicer
An implementation of a trajectory service. Call send_frame to send data to clients when called by other python code.
- SubscribeFrames(request, context)
Subscribe to all the frames produced by the service.
This method publishes all the frames produced by the trajectory service, starting when the client subscribes.
- SubscribeLatestFrames(request, context)
Subscribe to the last produced frames produced by the service.
This method publishes the latest frame available at the time of yielding.
- close()
- frame_queues: DictOfQueues
- last_frame_index: int
- last_request_id: int
- subscribe_latest_frames(*, frame_interval=0.03333333333333333, cancellation, queue_class=<class 'nanover.utilities.request_queues.GetFrameResponseAggregatingQueue'>)
Yield the most recent frame, if changed, at a regular interval. Terminates when cancellation token is cancelled.