Static Public Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
usb_cam::UsbCam Class Reference

#include <usb_cam.h>

Inheritance diagram for usb_cam::UsbCam:
Inheritance graph
[legend]

Static Public Member Functions

static UsbCamInstance ()
 
- Static Public Member Functions inherited from usb_cam::AbstractV4LUSBCam
static std::vector< capture_format_t > & get_supported_formats ()
 

Static Protected Member Functions

static void frame_timer_callback (const ros::TimerEvent &event)
 
static bool service_start_callback (std_srvs::Empty::Request &request, std_srvs::Empty::Response &response)
 
static bool service_stop_callback (std_srvs::Empty::Request &request, std_srvs::Empty::Response &response)
 
static bool service_supported_controls_callback (std_srvs::Trigger::Request &request, std_srvs::Trigger::Response &response)
 
static bool service_supported_formats_callback (std_srvs::Trigger::Request &request, std_srvs::Trigger::Response &response)
 
- Static Protected Member Functions inherited from usb_cam::AbstractV4LUSBCam
static void adjust_camera ()
 
static void close_handlers ()
 
static bool decode_ffmpeg (const void *src, int len, camera_image_t *dest)
 
static bool init ()
 
static bool init_decoder ()
 
static bool process_image (const void *src, int len, camera_image_t *dest)
 
static camera_image_tread_frame ()
 
static void release_device ()
 
static void run_grabber (unsigned int &buffer_size)
 
static bool set_v4l_parameter (const std::string &param, bool value)
 
static bool set_v4l_parameter (const std::string &param, const std::string &value)
 
static bool set_v4l_parameter (const std::string &param, int value)
 
static bool set_v4l_parameter (const std::string &param, long value)
 
static bool start ()
 
static bool start_capture ()
 
static bool suspend ()
 
static void v4l_query_controls ()
 

Protected Attributes

ros::Timer _frame_timer
 
image_transport::CameraPublisher _image_pub
 
image_transport::ImageTransport _image_transport
 
sensor_msgs::Image _img_msg
 
ros::ServiceServer _service_start
 
std::string _service_start_name
 
ros::ServiceServer _service_stop
 
std::string _service_stop_name
 
ros::ServiceServer _service_supported_controls
 
ros::ServiceServer _service_supported_formats
 
ros::NodeHandle node
 
- Protected Attributes inherited from usb_cam::AbstractV4LUSBCam
camera_image_t _image
 

Static Protected Attributes

static std::string camera_frame_id = "head_camera"
 
static camera_info_manager::CameraInfoManagercamera_info = nullptr
 
static std::string camera_info_url = ""
 
static std::string camera_name = "head_camera"
 
static std::string camera_transport_suffix = "image_raw"
 
static bool create_suspended = false
 
static ros::Timerframe_timer = nullptr
 
static image_transport::CameraPublisherimage_pub = nullptr
 
static image_transport::ImageTransportimage_transport = nullptr
 
static sensor_msgs::Image * img_msg = nullptr
 
static ros::ServiceServerservice_start = nullptr
 
static ros::ServiceServerservice_stop = nullptr
 
static ros::ServiceServerservice_supported_controls = nullptr
 
static ros::ServiceServerservice_supported_formats = nullptr
 
- Static Protected Attributes inherited from usb_cam::AbstractV4LUSBCam
static AVCodec * avcodec = nullptr
 
static AVCodecContext * avcodec_context = nullptr
 
static AVFrame * avframe_camera = nullptr
 
static int avframe_camera_size = 0
 
static AVFrame * avframe_rgb = nullptr
 
static int avframe_rgb_size = 0
 
static AVDictionary * avoptions = nullptr
 
static AVPacket * avpkt = nullptr
 
static bufferbuffers = nullptr
 
static unsigned int buffers_count = 0
 
static bool capturing = false
 
static AVCodecID codec_id = AV_CODEC_ID_NONE
 
static color_format_t color_format = COLOR_FORMAT_UNKNOWN
 
static std::string color_format_name = "yuv422p"
 
static std::vector< camera_control_tcontrols = std::vector<camera_control_t>()
 
static const time_t epoch_time_shift_us = util::get_epoch_time_shift_us()
 
static int file_dev = -1
 
static int framerate = 10
 
static bool full_ffmpeg_log = false
 
static std::set< std::string > ignore_controls = std::set<std::string>()
 
static camera_image_timage = nullptr
 
static int image_height = 240
 
static int image_width = 320
 
static io_method_t io_method = io_method_t::IO_METHOD_MMAP
 
static std::string io_method_name = "mmap"
 
static bool monochrome = false
 
static pixel_format_t pixel_format = PIXEL_FORMAT_UNKNOWN
 
static std::string pixel_format_name = "uyvy"
 
static bool streaming_status = false
 
static std::vector< capture_format_tsupported_formats = std::vector<capture_format_t>()
 
static unsigned int v4l_pixel_format = V4L2_PIX_FMT_UYVY
 
static std::string video_device_name = "/dev/video0"
 
static struct SwsContext * video_sws = nullptr
 

Private Member Functions

UsbCam operator= (const UsbCam &root)=delete
 
 UsbCam ()
 
 UsbCam (const UsbCam &root)=delete
 
virtual ~UsbCam ()
 

Additional Inherited Members

- Public Member Functions inherited from usb_cam::AbstractV4LUSBCam
virtual ~AbstractV4LUSBCam ()
 
- Protected Member Functions inherited from usb_cam::AbstractV4LUSBCam
 AbstractV4LUSBCam ()
 
 AbstractV4LUSBCam (const AbstractV4LUSBCam &root)=delete
 

Detailed Description

Definition at line 86 of file usb_cam.h.

Constructor & Destructor Documentation

◆ UsbCam() [1/2]

UsbCam::UsbCam ( )
explicitprivate

Definition at line 116 of file usb_cam.cpp.

◆ ~UsbCam()

UsbCam::~UsbCam ( )
privatevirtual

Definition at line 312 of file usb_cam.cpp.

◆ UsbCam() [2/2]

usb_cam::UsbCam::UsbCam ( const UsbCam root)
privatedelete

Member Function Documentation

◆ frame_timer_callback()

void UsbCam::frame_timer_callback ( const ros::TimerEvent event)
staticprotected

Definition at line 281 of file usb_cam.cpp.

◆ Instance()

usb_cam::UsbCam & usb_cam::UsbCam::Instance ( )
static

Definition at line 317 of file usb_cam.cpp.

◆ operator=()

UsbCam usb_cam::UsbCam::operator= ( const UsbCam root)
privatedelete

◆ service_start_callback()

bool UsbCam::service_start_callback ( std_srvs::Empty::Request &  request,
std_srvs::Empty::Response &  response 
)
staticprotected

Definition at line 68 of file usb_cam.cpp.

◆ service_stop_callback()

bool UsbCam::service_stop_callback ( std_srvs::Empty::Request &  request,
std_srvs::Empty::Response &  response 
)
staticprotected

Definition at line 73 of file usb_cam.cpp.

◆ service_supported_controls_callback()

bool UsbCam::service_supported_controls_callback ( std_srvs::Trigger::Request &  request,
std_srvs::Trigger::Response &  response 
)
staticprotected

Definition at line 101 of file usb_cam.cpp.

◆ service_supported_formats_callback()

bool UsbCam::service_supported_formats_callback ( std_srvs::Trigger::Request &  request,
std_srvs::Trigger::Response &  response 
)
staticprotected

Definition at line 78 of file usb_cam.cpp.

Member Data Documentation

◆ _frame_timer

ros::Timer usb_cam::UsbCam::_frame_timer
protected

Definition at line 133 of file usb_cam.h.

◆ _image_pub

image_transport::CameraPublisher usb_cam::UsbCam::_image_pub
protected

Definition at line 140 of file usb_cam.h.

◆ _image_transport

image_transport::ImageTransport usb_cam::UsbCam::_image_transport
protected

Definition at line 143 of file usb_cam.h.

◆ _img_msg

sensor_msgs::Image usb_cam::UsbCam::_img_msg
protected

Definition at line 138 of file usb_cam.h.

◆ _service_start

ros::ServiceServer usb_cam::UsbCam::_service_start
protected

Definition at line 148 of file usb_cam.h.

◆ _service_start_name

std::string usb_cam::UsbCam::_service_start_name
protected

Definition at line 147 of file usb_cam.h.

◆ _service_stop

ros::ServiceServer usb_cam::UsbCam::_service_stop
protected

Definition at line 153 of file usb_cam.h.

◆ _service_stop_name

std::string usb_cam::UsbCam::_service_stop_name
protected

Definition at line 152 of file usb_cam.h.

◆ _service_supported_controls

ros::ServiceServer usb_cam::UsbCam::_service_supported_controls
protected

Definition at line 161 of file usb_cam.h.

◆ _service_supported_formats

ros::ServiceServer usb_cam::UsbCam::_service_supported_formats
protected

Definition at line 157 of file usb_cam.h.

◆ camera_frame_id

std::string UsbCam::camera_frame_id = "head_camera"
staticprotected

Definition at line 168 of file usb_cam.h.

◆ camera_info

camera_info_manager::CameraInfoManager * UsbCam::camera_info = nullptr
staticprotected

Definition at line 142 of file usb_cam.h.

◆ camera_info_url

std::string UsbCam::camera_info_url = ""
staticprotected

Definition at line 170 of file usb_cam.h.

◆ camera_name

std::string UsbCam::camera_name = "head_camera"
staticprotected

Definition at line 167 of file usb_cam.h.

◆ camera_transport_suffix

std::string UsbCam::camera_transport_suffix = "image_raw"
staticprotected

Definition at line 169 of file usb_cam.h.

◆ create_suspended

bool UsbCam::create_suspended = false
staticprotected

Definition at line 129 of file usb_cam.h.

◆ frame_timer

ros::Timer * UsbCam::frame_timer = nullptr
staticprotected

Definition at line 134 of file usb_cam.h.

◆ image_pub

image_transport::CameraPublisher * UsbCam::image_pub = nullptr
staticprotected

Definition at line 141 of file usb_cam.h.

◆ image_transport

image_transport::ImageTransport * UsbCam::image_transport = nullptr
staticprotected

Definition at line 144 of file usb_cam.h.

◆ img_msg

sensor_msgs::Image * UsbCam::img_msg = nullptr
staticprotected

Definition at line 139 of file usb_cam.h.

◆ node

ros::NodeHandle usb_cam::UsbCam::node
protected

Definition at line 132 of file usb_cam.h.

◆ service_start

ros::ServiceServer * UsbCam::service_start = nullptr
staticprotected

Definition at line 149 of file usb_cam.h.

◆ service_stop

ros::ServiceServer * UsbCam::service_stop = nullptr
staticprotected

Definition at line 154 of file usb_cam.h.

◆ service_supported_controls

ros::ServiceServer * UsbCam::service_supported_controls = nullptr
staticprotected

Definition at line 162 of file usb_cam.h.

◆ service_supported_formats

ros::ServiceServer * UsbCam::service_supported_formats = nullptr
staticprotected

Definition at line 158 of file usb_cam.h.


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


usb_cam
Author(s): Benjamin Pitzer
autogenerated on Sun Sep 3 2023 02:44:54