Public Types | Public Member Functions | Private Member Functions | Private Attributes
pcl::RobotEyeGrabber Class Reference

Grabber for the Ocular Robotics RobotEye sensor. More...

#include <robot_eye_grabber.h>

Inheritance diagram for pcl::RobotEyeGrabber:
Inheritance graph
[legend]

List of all members.

Public Types

typedef void( sig_cb_robot_eye_point_cloud_xyzi )(const boost::shared_ptr< const pcl::PointCloud< pcl::PointXYZI > > &)
 Signal used for the point cloud callback. This signal is sent when the accumulated number of points reaches the limit specified by setSignalPointCloudSize().

Public Member Functions

unsigned short getDataPort () const
virtual float getFramesPerSecond () const
 Returns the number of frames per second.
virtual std::string getName () const
 Obtains the name of this I/O Grabber.
boost::shared_ptr
< pcl::PointCloud
< pcl::PointXYZI > > 
getPointCloud () const
 Returns the point cloud with point accumulated by the grabber. It is not safe to access this point cloud except if the grabber is stopped or during the grabber callback.
const boost::asio::ip::address & getSensorAddress () const
std::size_t getSignalPointCloudSize () const
virtual bool isRunning () const
 Check if the grabber is still running.
 RobotEyeGrabber ()
 RobotEyeGrabber default constructor.
 RobotEyeGrabber (const boost::asio::ip::address &ipAddress, unsigned short port=443)
 RobotEyeGrabber constructor taking a specified IP address and data port.
void setDataPort (unsigned short port)
 Set/get the port number which receives data from the sensor. The default is 443.
void setSensorAddress (const boost::asio::ip::address &ipAddress)
 Set/get ip address of the sensor that sends the data. The default is address_v4::any ().
void setSignalPointCloudSize (std::size_t numerOfPoints)
 Set/get the number of points to accumulate before the grabber callback is signaled. The default is 1000.
virtual void start ()
 Starts the RobotEye grabber. The grabber runs on a separate thread, this call will return without blocking.
virtual void stop ()
 Stops the RobotEye grabber.
virtual ~RobotEyeGrabber () throw ()
 virtual Destructor inherited from the Grabber interface. It never throws.

Private Member Functions

void asyncSocketReceive ()
void computeXYZI (pcl::PointXYZI &pointXYZI, unsigned char *pointData)
void consumerThreadLoop ()
void convertPacketData (unsigned char *dataPacket, size_t length)
void resetPointCloud ()
void socketCallback (const boost::system::error_code &error, std::size_t numberOfBytes)
void socketThreadLoop ()

Private Attributes

boost::shared_ptr< boost::thread > consumer_thread_
unsigned short data_port_
boost::asio::io_service io_service_
pcl::SynchronizedQueue
< boost::shared_array
< unsigned char > > 
packet_queue_
boost::signals2::signal
< sig_cb_robot_eye_point_cloud_xyzi > * 
point_cloud_signal_
boost::shared_ptr
< pcl::PointCloud
< pcl::PointXYZI > > 
point_cloud_xyzi_
unsigned char receive_buffer_ [500]
boost::asio::ip::udp::endpoint sender_endpoint_
boost::asio::ip::address sensor_address_
size_t signal_point_cloud_size_
boost::shared_ptr
< boost::asio::ip::udp::socket > 
socket_
boost::shared_ptr< boost::thread > socket_thread_
bool terminate_thread_

Detailed Description

Grabber for the Ocular Robotics RobotEye sensor.

Definition at line 56 of file robot_eye_grabber.h.


Member Typedef Documentation

typedef void( pcl::RobotEyeGrabber::sig_cb_robot_eye_point_cloud_xyzi)(const boost::shared_ptr< const pcl::PointCloud< pcl::PointXYZI > > &)

Signal used for the point cloud callback. This signal is sent when the accumulated number of points reaches the limit specified by setSignalPointCloudSize().

Definition at line 64 of file robot_eye_grabber.h.


Constructor & Destructor Documentation

RobotEyeGrabber default constructor.

Definition at line 42 of file robot_eye_grabber.cpp.

pcl::RobotEyeGrabber::RobotEyeGrabber ( const boost::asio::ip::address &  ipAddress,
unsigned short  port = 443 
)

RobotEyeGrabber constructor taking a specified IP address and data port.

Definition at line 53 of file robot_eye_grabber.cpp.

virtual Destructor inherited from the Grabber interface. It never throws.

Definition at line 64 of file robot_eye_grabber.cpp.


Member Function Documentation

Definition at line 237 of file robot_eye_grabber.cpp.

void pcl::RobotEyeGrabber::computeXYZI ( pcl::PointXYZI pointXYZI,
unsigned char *  pointData 
) [private]

Definition at line 192 of file robot_eye_grabber.cpp.

Definition at line 150 of file robot_eye_grabber.cpp.

void pcl::RobotEyeGrabber::convertPacketData ( unsigned char *  dataPacket,
size_t  length 
) [private]

Definition at line 164 of file robot_eye_grabber.cpp.

unsigned short pcl::RobotEyeGrabber::getDataPort ( ) const

Definition at line 93 of file robot_eye_grabber.cpp.

float pcl::RobotEyeGrabber::getFramesPerSecond ( ) const [virtual]

Returns the number of frames per second.

Implements pcl::Grabber.

Definition at line 79 of file robot_eye_grabber.cpp.

Obtains the name of this I/O Grabber.

Returns:
The name of the grabber

Implements pcl::Grabber.

Definition at line 72 of file robot_eye_grabber.cpp.

Returns the point cloud with point accumulated by the grabber. It is not safe to access this point cloud except if the grabber is stopped or during the grabber callback.

Definition at line 135 of file robot_eye_grabber.cpp.

const boost::asio::ip::address & pcl::RobotEyeGrabber::getSensorAddress ( ) const

Definition at line 107 of file robot_eye_grabber.cpp.

Definition at line 121 of file robot_eye_grabber.cpp.

bool pcl::RobotEyeGrabber::isRunning ( ) const [virtual]

Check if the grabber is still running.

Returns:
TRUE if the grabber is running, FALSE otherwise

Implements pcl::Grabber.

Definition at line 86 of file robot_eye_grabber.cpp.

Definition at line 142 of file robot_eye_grabber.cpp.

void pcl::RobotEyeGrabber::setDataPort ( unsigned short  port)

Set/get the port number which receives data from the sensor. The default is 443.

Definition at line 100 of file robot_eye_grabber.cpp.

void pcl::RobotEyeGrabber::setSensorAddress ( const boost::asio::ip::address &  ipAddress)

Set/get ip address of the sensor that sends the data. The default is address_v4::any ().

Definition at line 114 of file robot_eye_grabber.cpp.

void pcl::RobotEyeGrabber::setSignalPointCloudSize ( std::size_t  numerOfPoints)

Set/get the number of points to accumulate before the grabber callback is signaled. The default is 1000.

Definition at line 128 of file robot_eye_grabber.cpp.

void pcl::RobotEyeGrabber::socketCallback ( const boost::system::error_code &  error,
std::size_t  numberOfBytes 
) [private]

Definition at line 249 of file robot_eye_grabber.cpp.

Definition at line 228 of file robot_eye_grabber.cpp.

void pcl::RobotEyeGrabber::start ( ) [virtual]

Starts the RobotEye grabber. The grabber runs on a separate thread, this call will return without blocking.

Implements pcl::Grabber.

Definition at line 270 of file robot_eye_grabber.cpp.

void pcl::RobotEyeGrabber::stop ( ) [virtual]

Stops the RobotEye grabber.

Implements pcl::Grabber.

Definition at line 295 of file robot_eye_grabber.cpp.


Member Data Documentation

boost::shared_ptr<boost::thread> pcl::RobotEyeGrabber::consumer_thread_ [private]

Definition at line 133 of file robot_eye_grabber.h.

unsigned short pcl::RobotEyeGrabber::data_port_ [private]

Definition at line 125 of file robot_eye_grabber.h.

boost::asio::io_service pcl::RobotEyeGrabber::io_service_ [private]

Definition at line 130 of file robot_eye_grabber.h.

pcl::SynchronizedQueue<boost::shared_array<unsigned char> > pcl::RobotEyeGrabber::packet_queue_ [private]

Definition at line 135 of file robot_eye_grabber.h.

Definition at line 137 of file robot_eye_grabber.h.

Definition at line 136 of file robot_eye_grabber.h.

unsigned char pcl::RobotEyeGrabber::receive_buffer_[500] [private]

Definition at line 126 of file robot_eye_grabber.h.

boost::asio::ip::udp::endpoint pcl::RobotEyeGrabber::sender_endpoint_ [private]

Definition at line 129 of file robot_eye_grabber.h.

boost::asio::ip::address pcl::RobotEyeGrabber::sensor_address_ [private]

Definition at line 128 of file robot_eye_grabber.h.

Definition at line 124 of file robot_eye_grabber.h.

boost::shared_ptr<boost::asio::ip::udp::socket> pcl::RobotEyeGrabber::socket_ [private]

Definition at line 131 of file robot_eye_grabber.h.

boost::shared_ptr<boost::thread> pcl::RobotEyeGrabber::socket_thread_ [private]

Definition at line 132 of file robot_eye_grabber.h.

Definition at line 123 of file robot_eye_grabber.h.


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


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:43:11