payloadcomputerdroneprojekt.camera.gazebo_sitl package#

Submodules#

payloadcomputerdroneprojekt.camera.gazebo_sitl.gazebo_cam module#

class payloadcomputerdroneprojekt.camera.gazebo_sitl.gazebo_cam.GazeboCamera(config)[source]#

Bases: AbstractCamera

get_current_frame()[source]#

Capture the current frame from the camera. :return: The captured frame.

start_camera(config=None)[source]#

Start the camera with the given configuration. :param config: Optional configuration for the camera.

stop_camera()[source]#

Stop the camera.

payloadcomputerdroneprojekt.camera.gazebo_sitl.gazebo_camera_lib module#

class payloadcomputerdroneprojekt.camera.gazebo_sitl.gazebo_camera_lib.Video(port=5600)[source]#

Bases: object

BlueRov video capture class constructor

port#

Video UDP port

Type:

int

video_codec#

Source h264 parser

Type:

string

video_decode#

Transform YUV (12bits) to BGR (24bits)

Type:

string

video_pipe#

GStreamer top-level pipeline

Type:

object

video_sink#

Gstreamer sink element

Type:

object

video_sink_conf#

Sink configuration

Type:

string

video_source#

Udp source ip and port

Type:

string

callback(sink)[source]#
frame()[source]#

Get Frame

Returns:

bool and image frame, cap.read() output

Return type:

iterable

frame_available()[source]#

Check if frame is available

Returns:

true if frame is available

Return type:

bool

static gst_to_opencv(sample)[source]#

Transform byte array into np array

Parameters:

sample (TYPE) – Description

Returns:

Description

Return type:

TYPE

run()[source]#

Get frame to update _frame

start_gst(config=None)[source]#

Start gstreamer pipeline and sink Pipeline description list e.g:

[
‘videotestsrc ! decodebin’, ‘! videoconvert !

video/x-raw,format=(string)BGR ! videoconvert’,

‘! appsink’

]

Parameters:

config (list, optional) – Gstreamer pileline description list

Module contents#