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 |
Definition at line 63 of file prosilica_nodelet.cpp.
typedef dynamic_reconfigure::Server<prosilica_camera::ProsilicaCameraConfig> prosilica_camera::ProsilicaNodelet::ReconfigureServer [private] |
Definition at line 142 of file prosilica_nodelet.cpp.
enum prosilica_camera::ProsilicaNodelet::CameraState [private] |
Definition at line 146 of file prosilica_nodelet.cpp.
virtual prosilica_camera::ProsilicaNodelet::~ProsilicaNodelet | ( | ) | [inline, virtual] |
Make sure we interrupt initialization (if it happened to still execute).
Definition at line 68 of file prosilica_nodelet.cpp.
prosilica_camera::ProsilicaNodelet::ProsilicaNodelet | ( | ) | [inline] |
Definition at line 95 of file prosilica_nodelet.cpp.
bool prosilica_camera::ProsilicaNodelet::frameToImage | ( | tPvFrame * | frame, |
sensor_msgs::Image & | image | ||
) | [inline, private] |
Definition at line 609 of file prosilica_nodelet.cpp.
std::string prosilica_camera::ProsilicaNodelet::getAvailableCameras | ( | ) | [inline, private] |
Definition at line 316 of file prosilica_nodelet.cpp.
void prosilica_camera::ProsilicaNodelet::getCurrentState | ( | diagnostic_updater::DiagnosticStatusWrapper & | stat | ) | [inline, private] |
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.
void prosilica_camera::ProsilicaNodelet::loadIntrinsics | ( | ) | [inline, private] |
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.
void prosilica_camera::ProsilicaNodelet::onInitImpl | ( | ) | [inline, private] |
initialize prosilica if necessary
Retrieve parameters from server
Definition at line 174 of file prosilica_nodelet.cpp.
void prosilica_camera::ProsilicaNodelet::openCamera | ( | ) | [inline, private] |
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] |
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
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.
void prosilica_camera::ProsilicaNodelet::syncInCallback | ( | const std_msgs::HeaderConstPtr & | msg | ) | [inline, private] |
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.
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.
boost::shared_ptr<prosilica::Camera> prosilica_camera::ProsilicaNodelet::camera_ [private] |
Definition at line 110 of file prosilica_nodelet.cpp.
enum prosilica_camera::ProsilicaNodelet::CameraState prosilica_camera::ProsilicaNodelet::camera_state_ [private] |
boost::recursive_mutex prosilica_camera::ProsilicaNodelet::config_mutex_ [private] |
Definition at line 141 of file prosilica_nodelet.cpp.
int prosilica_camera::ProsilicaNodelet::count_ [private] |
Definition at line 137 of file prosilica_nodelet.cpp.
tPvUint32 prosilica_camera::ProsilicaNodelet::dummy [private] |
Definition at line 136 of file prosilica_nodelet.cpp.
std::string prosilica_camera::ProsilicaNodelet::frame_id_ [private] |
Definition at line 122 of file prosilica_nodelet.cpp.
RollingSum<unsigned long> prosilica_camera::ProsilicaNodelet::frames_completed_acc_ [private] |
Definition at line 158 of file prosilica_nodelet.cpp.
unsigned long prosilica_camera::ProsilicaNodelet::frames_completed_total_ [private] |
Definition at line 157 of file prosilica_nodelet.cpp.
RollingSum<unsigned long> prosilica_camera::ProsilicaNodelet::frames_dropped_acc_ [private] |
Definition at line 158 of file prosilica_nodelet.cpp.
unsigned long prosilica_camera::ProsilicaNodelet::frames_dropped_total_ [private] |
Definition at line 157 of file prosilica_nodelet.cpp.
unsigned long prosilica_camera::ProsilicaNodelet::guid_ [private] |
Definition at line 123 of file prosilica_nodelet.cpp.
std::string prosilica_camera::ProsilicaNodelet::hw_id_ [private] |
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.
boost::thread prosilica_camera::ProsilicaNodelet::init_thread_ [private] |
Definition at line 111 of file prosilica_nodelet.cpp.
std::string prosilica_camera::ProsilicaNodelet::intrinsics_ [private] |
Definition at line 155 of file prosilica_nodelet.cpp.
std::string prosilica_camera::ProsilicaNodelet::ip_address_ [private] |
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.
tPvUint32 prosilica_camera::ProsilicaNodelet::max_binning_x [private] |
Definition at line 136 of file prosilica_nodelet.cpp.
tPvUint32 prosilica_camera::ProsilicaNodelet::max_binning_y [private] |
Definition at line 136 of file prosilica_nodelet.cpp.
double prosilica_camera::ProsilicaNodelet::open_camera_retry_period_ [private] |
Definition at line 126 of file prosilica_nodelet.cpp.
RollingSum<unsigned long> prosilica_camera::ProsilicaNodelet::packets_missed_acc_ [private] |
Definition at line 160 of file prosilica_nodelet.cpp.
unsigned long prosilica_camera::ProsilicaNodelet::packets_missed_total_ [private] |
Definition at line 159 of file prosilica_nodelet.cpp.
RollingSum<unsigned long> prosilica_camera::ProsilicaNodelet::packets_received_acc_ [private] |
Definition at line 160 of file prosilica_nodelet.cpp.
unsigned long prosilica_camera::ProsilicaNodelet::packets_received_total_ [private] |
Definition at line 159 of file prosilica_nodelet.cpp.
Definition at line 115 of file prosilica_nodelet.cpp.
boost::shared_ptr<ReconfigureServer> prosilica_camera::ProsilicaNodelet::reconfigure_server_ [private] |
Definition at line 143 of file prosilica_nodelet.cpp.
tPvUint32 prosilica_camera::ProsilicaNodelet::sensor_height_ [private] |
Definition at line 135 of file prosilica_nodelet.cpp.
tPvUint32 prosilica_camera::ProsilicaNodelet::sensor_width_ [private] |
Definition at line 135 of file prosilica_nodelet.cpp.
Definition at line 116 of file prosilica_nodelet.cpp.
std::string prosilica_camera::ProsilicaNodelet::state_info_ [private] |
Definition at line 154 of file prosilica_nodelet.cpp.
Definition at line 128 of file prosilica_nodelet.cpp.
std::string prosilica_camera::ProsilicaNodelet::trig_timestamp_topic_ [private] |
Definition at line 127 of file prosilica_nodelet.cpp.
int prosilica_camera::ProsilicaNodelet::trigger_mode_ [private] |
Definition at line 132 of file prosilica_nodelet.cpp.
Definition at line 117 of file prosilica_nodelet.cpp.
double prosilica_camera::ProsilicaNodelet::update_rate_ [private] |
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.