Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
prosilica_camera::ProsilicaNodelet Class Reference
Inheritance diagram for prosilica_camera::ProsilicaNodelet:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ProsilicaNodelet ()
virtual ~ProsilicaNodelet ()

Private Types

enum  CameraState {
  OPENING, CAMERA_NOT_FOUND, FORMAT_ERROR, ERROR,
  OK
}
typedef
dynamic_reconfigure::Server
< prosilica_camera::ProsilicaCameraConfig > 
ReconfigureServer

Private Member Functions

bool frameToImage (tPvFrame *frame, sensor_msgs::Image &image)
std::string getAvailableCameras ()
void getCurrentState (diagnostic_updater::DiagnosticStatusWrapper &stat)
void kill (unsigned long guid)
void loadIntrinsics ()
virtual void onInit ()
void onInitImpl ()
void openCamera ()
void pollCallback (polled_camera::GetPolledImage::Request &req, polled_camera::GetPolledImage::Response &rsp, sensor_msgs::Image &image, sensor_msgs::CameraInfo &info)
bool processFrame (tPvFrame *frame, sensor_msgs::Image &img, sensor_msgs::CameraInfo &cam_info)
void publishImage (tPvFrame *frame)
void publishImage (tPvFrame *frame, ros::Time time)
void reconfigureCallback (prosilica_camera::ProsilicaCameraConfig &config, uint32_t level)
bool setCameraInfo (sensor_msgs::SetCameraInfoRequest &req, sensor_msgs::SetCameraInfoResponse &rsp)
void start ()
void stop ()
void syncInCallback (const std_msgs::HeaderConstPtr &msg)
void updateCallback (const ros::TimerEvent &event)

Private Attributes

bool auto_adjust_stream_bytes_per_second_
sensor_msgs::CameraInfo cam_info_
boost::shared_ptr
< prosilica::Camera
camera_
enum
prosilica_camera::ProsilicaNodelet::CameraState 
camera_state_
boost::recursive_mutex config_mutex_
int count_
tPvUint32 dummy
std::string frame_id_
RollingSum< unsigned long > frames_completed_acc_
unsigned long frames_completed_total_
RollingSum< unsigned long > frames_dropped_acc_
unsigned long frames_dropped_total_
unsigned long guid_
std::string hw_id_
image_transport::CameraPublisher image_publisher_
sensor_msgs::Image img_
boost::thread init_thread_
std::string intrinsics_
std::string ip_address_
prosilica_camera::ProsilicaCameraConfig last_config_
tPvUint32 max_binning_x
tPvUint32 max_binning_y
double open_camera_retry_period_
RollingSum< unsigned long > packets_missed_acc_
unsigned long packets_missed_total_
RollingSum< unsigned long > packets_received_acc_
unsigned long packets_received_total_
polled_camera::PublicationServer poll_srv_
boost::shared_ptr
< ReconfigureServer
reconfigure_server_
tPvUint32 sensor_height_
tPvUint32 sensor_width_
ros::ServiceServer set_camera_info_srv_
std::string state_info_
ros::Time trig_time_
std::string trig_timestamp_topic_
int trigger_mode_
ros::Subscriber trigger_sub_
double update_rate_
ros::Timer update_timer_
diagnostic_updater::Updater updater

Static Private Attributes

static const int WINDOW_SIZE = 100

Detailed Description

Definition at line 63 of file prosilica_nodelet.cpp.


Member Typedef Documentation

typedef dynamic_reconfigure::Server<prosilica_camera::ProsilicaCameraConfig> prosilica_camera::ProsilicaNodelet::ReconfigureServer [private]

Definition at line 142 of file prosilica_nodelet.cpp.


Member Enumeration Documentation

Enumerator:
OPENING 
CAMERA_NOT_FOUND 
FORMAT_ERROR 
ERROR 
OK 

Definition at line 146 of file prosilica_nodelet.cpp.


Constructor & Destructor Documentation

Make sure we interrupt initialization (if it happened to still execute).

Definition at line 68 of file prosilica_nodelet.cpp.

Definition at line 95 of file prosilica_nodelet.cpp.


Member Function Documentation

bool prosilica_camera::ProsilicaNodelet::frameToImage ( tPvFrame frame,
sensor_msgs::Image &  image 
) [inline, private]

Definition at line 609 of file prosilica_nodelet.cpp.

Definition at line 316 of file prosilica_nodelet.cpp.

Definition at line 884 of file prosilica_nodelet.cpp.

void prosilica_camera::ProsilicaNodelet::kill ( unsigned long  guid) [inline, private]

Make sure we interrupt initialization (if it happened to still execute).

Definition at line 422 of file prosilica_nodelet.cpp.

Definition at line 327 of file prosilica_nodelet.cpp.

virtual void prosilica_camera::ProsilicaNodelet::onInit ( ) [inline, private, virtual]

We will be retrying to open camera until it is open, which may block the thread. Nodelet::onInit() should not block, hence spawning a new thread to do initialization.

Implements nodelet::Nodelet.

Definition at line 165 of file prosilica_nodelet.cpp.

initialize prosilica if necessary

Retrieve parameters from server

Definition at line 174 of file prosilica_nodelet.cpp.

Definition at line 235 of file prosilica_nodelet.cpp.

void prosilica_camera::ProsilicaNodelet::pollCallback ( polled_camera::GetPolledImage::Request &  req,
polled_camera::GetPolledImage::Response &  rsp,
sensor_msgs::Image &  image,
sensor_msgs::CameraInfo &  info 
) [inline, private]

Definition at line 500 of file prosilica_nodelet.cpp.

bool prosilica_camera::ProsilicaNodelet::processFrame ( tPvFrame frame,
sensor_msgs::Image &  img,
sensor_msgs::CameraInfo &  cam_info 
) [inline, private]
Todo:
Match time stamp from frame to ROS time?
Todo:
Binning values retrieved here may differ from the ones used to actually capture the frame! Maybe need to clear queue when changing binning and/or stuff binning values into context?

Definition at line 561 of file prosilica_nodelet.cpp.

void prosilica_camera::ProsilicaNodelet::publishImage ( tPvFrame frame) [inline, private]

Definition at line 443 of file prosilica_nodelet.cpp.

void prosilica_camera::ProsilicaNodelet::publishImage ( tPvFrame frame,
ros::Time  time 
) [inline, private]

Definition at line 448 of file prosilica_nodelet.cpp.

void prosilica_camera::ProsilicaNodelet::reconfigureCallback ( prosilica_camera::ProsilicaCameraConfig &  config,
uint32_t  level 
) [inline, private]

Trigger mode

Todo:
Replicating logic from polledCallback

If exception thrown due to bad settings, it will fail to start camera Reload last good config

Definition at line 689 of file prosilica_nodelet.cpp.

bool prosilica_camera::ProsilicaNodelet::setCameraInfo ( sensor_msgs::SetCameraInfoRequest &  req,
sensor_msgs::SetCameraInfoResponse &  rsp 
) [inline, private]

Definition at line 632 of file prosilica_nodelet.cpp.

void prosilica_camera::ProsilicaNodelet::start ( ) [inline, private]

Definition at line 366 of file prosilica_nodelet.cpp.

void prosilica_camera::ProsilicaNodelet::stop ( ) [inline, private]

Definition at line 412 of file prosilica_nodelet.cpp.

Definition at line 547 of file prosilica_nodelet.cpp.

void prosilica_camera::ProsilicaNodelet::updateCallback ( const ros::TimerEvent event) [inline, private]

Definition at line 473 of file prosilica_nodelet.cpp.


Member Data Documentation

Definition at line 133 of file prosilica_nodelet.cpp.

sensor_msgs::CameraInfo prosilica_camera::ProsilicaNodelet::cam_info_ [private]

Definition at line 120 of file prosilica_nodelet.cpp.

Definition at line 110 of file prosilica_nodelet.cpp.

boost::recursive_mutex prosilica_camera::ProsilicaNodelet::config_mutex_ [private]

Definition at line 141 of file prosilica_nodelet.cpp.

Definition at line 137 of file prosilica_nodelet.cpp.

Definition at line 136 of file prosilica_nodelet.cpp.

Definition at line 122 of file prosilica_nodelet.cpp.

Definition at line 158 of file prosilica_nodelet.cpp.

Definition at line 157 of file prosilica_nodelet.cpp.

Definition at line 158 of file prosilica_nodelet.cpp.

Definition at line 157 of file prosilica_nodelet.cpp.

Definition at line 123 of file prosilica_nodelet.cpp.

Definition at line 124 of file prosilica_nodelet.cpp.

Definition at line 114 of file prosilica_nodelet.cpp.

sensor_msgs::Image prosilica_camera::ProsilicaNodelet::img_ [private]

Definition at line 119 of file prosilica_nodelet.cpp.

Definition at line 111 of file prosilica_nodelet.cpp.

Definition at line 155 of file prosilica_nodelet.cpp.

Definition at line 125 of file prosilica_nodelet.cpp.

prosilica_camera::ProsilicaCameraConfig prosilica_camera::ProsilicaNodelet::last_config_ [private]

Definition at line 140 of file prosilica_nodelet.cpp.

Definition at line 136 of file prosilica_nodelet.cpp.

Definition at line 136 of file prosilica_nodelet.cpp.

Definition at line 126 of file prosilica_nodelet.cpp.

Definition at line 160 of file prosilica_nodelet.cpp.

Definition at line 159 of file prosilica_nodelet.cpp.

Definition at line 160 of file prosilica_nodelet.cpp.

Definition at line 159 of file prosilica_nodelet.cpp.

Definition at line 115 of file prosilica_nodelet.cpp.

Definition at line 143 of file prosilica_nodelet.cpp.

Definition at line 135 of file prosilica_nodelet.cpp.

Definition at line 135 of file prosilica_nodelet.cpp.

Definition at line 116 of file prosilica_nodelet.cpp.

Definition at line 154 of file prosilica_nodelet.cpp.

Definition at line 128 of file prosilica_nodelet.cpp.

Definition at line 127 of file prosilica_nodelet.cpp.

Definition at line 132 of file prosilica_nodelet.cpp.

Definition at line 117 of file prosilica_nodelet.cpp.

Definition at line 131 of file prosilica_nodelet.cpp.

Definition at line 112 of file prosilica_nodelet.cpp.

Definition at line 162 of file prosilica_nodelet.cpp.

const int prosilica_camera::ProsilicaNodelet::WINDOW_SIZE = 100 [static, private]

Definition at line 156 of file prosilica_nodelet.cpp.


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


prosilica_camera
Author(s): Maintained by William Woodall - wwoodall@willowgarage.com, Contributions by Allison Thackston - allison.thackston@nasa.gov
autogenerated on Thu Jun 6 2019 20:28:48