OKVIS ROS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
okvis::Subscriber Class Reference

This class handles all the buffering of incoming data. More...

#include <Subscriber.hpp>

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW ~Subscriber ()
 
 Subscriber (ros::NodeHandle &nh, okvis::VioInterface *vioInterfacePtr, const okvis::VioParametersReader &param_reader)
 Constructor. This will either subscribe to the relevant ROS topics or start up the sensor and register the callbacks directly there. More...
 
void setNodeHandle (ros::NodeHandle &nh)
 Set the node handle. This sets up the callbacks. This is called in the constructor. More...
 

Protected Member Functions

ROS callbacks
void imageCallback (const sensor_msgs::ImageConstPtr &msg, unsigned int cameraIndex)
 The image callback. More...
 
void depthImageCallback (const sensor_msgs::ImageConstPtr &, unsigned int)
 The depth image callback. More...
 
void imuCallback (const sensor_msgs::ImuConstPtr &msg)
 The IMU callback. More...
 
Direct (no ROS) callbacks and other sensor related methods.
void initialiseDriverCallbacks ()
 Initialise callbacks. Called in constructor. More...
 
void startSensors (const std::vector< unsigned int > &camRate, const unsigned int imuRate)
 Start up sensor. More...
 
void directImuCallback (boost::shared_ptr< visensor::ViImuMsg > imu_ptr, visensor::ViErrorCode error)
 The IMU callback. More...
 
void directFrameCallback (visensor::ViFrame::Ptr frame_ptr, visensor::ViErrorCode error)
 The image callback. More...
 
void directFrameCornerCallback (visensor::ViFrame::Ptr frame_ptr, visensor::ViCorner::Ptr corners_ptr)
 The callback for images including detected corners. More...
 
void configCallback (okvis_ros::CameraConfig &config, uint32_t level)
 Dynamic reconfigure callback. More...
 

Protected Attributes

std::shared_ptr
< visensor::ViSensorDriver > 
sensor_
 The sensor API. More...
 
dynamic_reconfigure::Server
< okvis_ros::CameraConfig > 
cameraConfigReconfigureService_
 dynamic reconfigure service. More...
 
okvis::VioInterfacevioInterface_
 The VioInterface. (E.g. ThreadedKFVio) More...
 
okvis::VioParameters vioParameters_
 The parameters and settings. More...
 
Node and subscriber related
ros::NodeHandle * nh_
 The node handle. More...
 
image_transport::ImageTransport * imgTransport_
 The image transporter. More...
 
std::vector
< image_transport::Subscriber > 
imageSubscribers_
 The image message subscriber. More...
 
ros::Subscriber subImu_
 The IMU message subscriber. More...
 

Detailed Description

This class handles all the buffering of incoming data.

Constructor & Destructor Documentation

okvis::Subscriber::~Subscriber ( )
okvis::Subscriber::Subscriber ( ros::NodeHandle &  nh,
okvis::VioInterface vioInterfacePtr,
const okvis::VioParametersReader param_reader 
)

Constructor. This will either subscribe to the relevant ROS topics or start up the sensor and register the callbacks directly there.

Parameters
nhThe ROS node handle.
vioInterfacePtrPointer to the VioInterface.
param_readerParameter reader.

Member Function Documentation

void okvis::Subscriber::configCallback ( okvis_ros::CameraConfig &  config,
uint32_t  level 
)
protected

Dynamic reconfigure callback.

void okvis::Subscriber::depthImageCallback ( const sensor_msgs::ImageConstPtr &  ,
unsigned  int 
)
inlineprotected

The depth image callback.

Warning
Not implemented.
void okvis::Subscriber::directFrameCallback ( visensor::ViFrame::Ptr  frame_ptr,
visensor::ViErrorCode  error 
)
protected

The image callback.

void okvis::Subscriber::directFrameCornerCallback ( visensor::ViFrame::Ptr  frame_ptr,
visensor::ViCorner::Ptr  corners_ptr 
)
protected

The callback for images including detected corners.

Warning
Not implemented.
void okvis::Subscriber::directImuCallback ( boost::shared_ptr< visensor::ViImuMsg >  imu_ptr,
visensor::ViErrorCode  error 
)
protected

The IMU callback.

void okvis::Subscriber::imageCallback ( const sensor_msgs::ImageConstPtr &  msg,
unsigned int  cameraIndex 
)
protected

The image callback.

void okvis::Subscriber::imuCallback ( const sensor_msgs::ImuConstPtr &  msg)
protected

The IMU callback.

void okvis::Subscriber::initialiseDriverCallbacks ( )
protected

Initialise callbacks. Called in constructor.

void okvis::Subscriber::setNodeHandle ( ros::NodeHandle &  nh)

Set the node handle. This sets up the callbacks. This is called in the constructor.

void okvis::Subscriber::startSensors ( const std::vector< unsigned int > &  camRate,
const unsigned int  imuRate 
)
protected

Start up sensor.

Warning
Call initialiseDriverCallbacks() first to initialise sensor API.

Member Data Documentation

dynamic_reconfigure::Server<okvis_ros::CameraConfig> okvis::Subscriber::cameraConfigReconfigureService_
protected

dynamic reconfigure service.

std::vector<image_transport::Subscriber> okvis::Subscriber::imageSubscribers_
protected

The image message subscriber.

image_transport::ImageTransport* okvis::Subscriber::imgTransport_
protected

The image transporter.

ros::NodeHandle* okvis::Subscriber::nh_
protected

The node handle.

std::shared_ptr<visensor::ViSensorDriver> okvis::Subscriber::sensor_
protected

The sensor API.

ros::Subscriber okvis::Subscriber::subImu_
protected

The IMU message subscriber.

okvis::VioInterface* okvis::Subscriber::vioInterface_
protected
okvis::VioParameters okvis::Subscriber::vioParameters_
protected

The parameters and settings.


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