gscam_nodelet.cpp
Go to the documentation of this file.
00001 
00002 #include <ros/ros.h>
00003 #include <nodelet/nodelet.h>
00004 #include <pluginlib/class_list_macros.h>
00005 #include <gscam/gscam_nodelet.h>
00006 
00007 PLUGINLIB_DECLARE_CLASS(gscam, GSCamNodelet, gscam::GSCamNodelet, nodelet::Nodelet) 
00008 
00009 namespace gscam {
00010   GSCamNodelet::GSCamNodelet() :
00011     nodelet::Nodelet(),
00012     gscam_driver_(NULL),
00013     stream_thread_(NULL)
00014   {
00015   }
00016 
00017   GSCamNodelet::~GSCamNodelet() 
00018   {
00019     stream_thread_->join();
00020   }
00021 
00022   void GSCamNodelet::onInit()
00023   {
00024     gscam_driver_.reset(new gscam::GSCam(this->getNodeHandle(), this->getPrivateNodeHandle()));
00025     stream_thread_.reset(new boost::thread(boost::bind(&GSCam::run, gscam_driver_.get())));
00026   }
00027 }


gscam
Author(s): Jonathan Bohren , Graylin Trevor Jay , Christopher Crick
autogenerated on Wed Aug 26 2015 11:41:15