Public Member Functions | Protected Attributes | Private Attributes
gazebo::GstCameraPlugin Class Reference

A Gazebo plugin that can be attached to a camera and then streams the video data using gstreamer. It streams to a configurable UDP port, default is 5600. More...

#include <gazebo_gst_camera_plugin.h>

List of all members.

Public Member Functions

void gstCallback (GstElement *appsrc)
 GstCameraPlugin ()
virtual void Load (sensors::SensorPtr sensor, sdf::ElementPtr sdf)
virtual void OnNewFrame (const unsigned char *image, unsigned int width, unsigned int height, unsigned int depth, const std::string &format)
void startGstThread ()
virtual ~GstCameraPlugin ()

Protected Attributes

rendering::CameraPtr camera
unsigned int depth
std::string format
unsigned int height
sensors::CameraSensorPtr parentSensor
float rate
int udpPort
unsigned int width

Private Attributes

GstBuffer * frameBuffer
std::mutex frameBufferMutex
GstClockTime gstTimestamp
GMainLoop * mainLoop
std::string namespace_
event::ConnectionPtr newFrameConnection
transport::NodePtr node_handle_
const std::string topicName = "gst_video"

Detailed Description

A Gazebo plugin that can be attached to a camera and then streams the video data using gstreamer. It streams to a configurable UDP port, default is 5600.

Connect to the stream via command line with: gst-launch-1.0 -v udpsrc port=5600 caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264' \ ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink fps-update-interval=1000 sync=false

Definition at line 44 of file gazebo_gst_camera_plugin.h.


Constructor & Destructor Documentation

Definition at line 161 of file gazebo_gst_camera_plugin.cpp.

Definition at line 168 of file gazebo_gst_camera_plugin.cpp.


Member Function Documentation

void GstCameraPlugin::gstCallback ( GstElement *  appsrc)

Definition at line 43 of file gazebo_gst_camera_plugin.cpp.

void GstCameraPlugin::Load ( sensors::SensorPtr  sensor,
sdf::ElementPtr  sdf 
) [virtual]

Definition at line 183 of file gazebo_gst_camera_plugin.cpp.

void GstCameraPlugin::OnNewFrame ( const unsigned char *  image,
unsigned int  width,
unsigned int  height,
unsigned int  depth,
const std::string format 
) [virtual]

Definition at line 246 of file gazebo_gst_camera_plugin.cpp.

Definition at line 76 of file gazebo_gst_camera_plugin.cpp.


Member Data Documentation

rendering::CameraPtr gazebo::GstCameraPlugin::camera [protected]

Definition at line 66 of file gazebo_gst_camera_plugin.h.

unsigned int gazebo::GstCameraPlugin::depth [protected]

Definition at line 59 of file gazebo_gst_camera_plugin.h.

Definition at line 61 of file gazebo_gst_camera_plugin.h.

Definition at line 74 of file gazebo_gst_camera_plugin.h.

Definition at line 75 of file gazebo_gst_camera_plugin.h.

GstClockTime gazebo::GstCameraPlugin::gstTimestamp [private]

Definition at line 77 of file gazebo_gst_camera_plugin.h.

unsigned int gazebo::GstCameraPlugin::height [protected]

Definition at line 59 of file gazebo_gst_camera_plugin.h.

GMainLoop* gazebo::GstCameraPlugin::mainLoop [private]

Definition at line 76 of file gazebo_gst_camera_plugin.h.

Definition at line 71 of file gazebo_gst_camera_plugin.h.

Definition at line 68 of file gazebo_gst_camera_plugin.h.

transport::NodePtr gazebo::GstCameraPlugin::node_handle_ [private]

Definition at line 70 of file gazebo_gst_camera_plugin.h.

sensors::CameraSensorPtr gazebo::GstCameraPlugin::parentSensor [protected]

Definition at line 65 of file gazebo_gst_camera_plugin.h.

float gazebo::GstCameraPlugin::rate [protected]

Definition at line 60 of file gazebo_gst_camera_plugin.h.

const std::string gazebo::GstCameraPlugin::topicName = "gst_video" [private]

Definition at line 72 of file gazebo_gst_camera_plugin.h.

Definition at line 63 of file gazebo_gst_camera_plugin.h.

unsigned int gazebo::GstCameraPlugin::width [protected]

Definition at line 59 of file gazebo_gst_camera_plugin.h.


The documentation for this class was generated from the following files:


rotors_gazebo_plugins
Author(s): Fadri Furrer, Michael Burri, Mina Kamel, Janosch Nikolic, Markus Achtelik
autogenerated on Thu Apr 18 2019 02:43:43