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

This class extends the VioParametersReader class in order to use ROS services and topics. More...

#include <RosParametersReader.hpp>

Inheritance diagram for okvis::RosParametersReader:
okvis::VioParametersReader

Public Member Functions

 RosParametersReader ()
 The default constructor. More...
 
 RosParametersReader (const std::string &filename)
 The constructor. This calls readConfigFile(). More...
 
- Public Member Functions inherited from okvis::VioParametersReader
EIGEN_MAKE_ALIGNED_OPERATOR_NEW VioParametersReader ()
 The default constructor. More...
 
 VioParametersReader (const std::string &filename)
 The constructor. This calls readConfigFile(). More...
 
virtual ~VioParametersReader ()
 Trivial destructor. More...
 
void readConfigFile (const std::string &filename)
 Read and parse a config file. To get the result call getParameters(). More...
 
bool getParameters (okvis::VioParameters &parameters) const
 Get parameters. More...
 

Private Member Functions

virtual bool getCameraCalibration (std::vector< CameraCalibration, Eigen::aligned_allocator< CameraCalibration >> &calibrations, cv::FileStorage &configurationFile)
 Get the camera calibration. More...
 
bool getCalibrationViaRosService (std::vector< CameraCalibration, Eigen::aligned_allocator< CameraCalibration >> &calibrations) const
 Get the camera calibration via the ROS service advertised by the visensor node. More...
 
bool getCalibrationViaRosTopic (std::vector< CameraCalibration, Eigen::aligned_allocator< CameraCalibration >> &calibrations) const
 Get the camera calibration via the ROS topic /calibrationX. More...
 

Additional Inherited Members

- Public Attributes inherited from okvis::VioParametersReader
bool useDriver
 Directly interface with driver without ROS message passing. More...
 
std::shared_ptr< void > viSensor
 
- Protected Member Functions inherited from okvis::VioParametersReader
bool parseBoolean (cv::FileNode node, bool &val) const
 Parses booleans from a cv::FileNode. OpenCV sadly has no implementation like this. More...
 
bool getCalibrationViaConfig (std::vector< CameraCalibration, Eigen::aligned_allocator< CameraCalibration >> &calibrations, cv::FileNode cameraNode) const
 Get the camera calibration via the configuration file. More...
 
bool getCalibrationViaVisensorAPI (std::vector< CameraCalibration, Eigen::aligned_allocator< CameraCalibration >> &calibrations) const
 Get the camera calibrations via the visensor API. More...
 
- Protected Attributes inherited from okvis::VioParametersReader
bool readConfigFile_
 If readConfigFile() has been called at least once this is true. More...
 
okvis::VioParameters vioParameters_
 The parameters. More...
 

Detailed Description

This class extends the VioParametersReader class in order to use ROS services and topics.

Constructor & Destructor Documentation

okvis::RosParametersReader::RosParametersReader ( )

The default constructor.

okvis::RosParametersReader::RosParametersReader ( const std::string &  filename)

The constructor. This calls readConfigFile().

Parameters
filenameConfiguration filename.

Member Function Documentation

bool okvis::RosParametersReader::getCalibrationViaRosService ( std::vector< CameraCalibration, Eigen::aligned_allocator< CameraCalibration >> &  calibrations) const
private

Get the camera calibration via the ROS service advertised by the visensor node.

Parameters
[out]calibrationsThe calibrations.
Returns
True if successful.
bool okvis::RosParametersReader::getCalibrationViaRosTopic ( std::vector< CameraCalibration, Eigen::aligned_allocator< CameraCalibration >> &  calibrations) const
private

Get the camera calibration via the ROS topic /calibrationX.

Remarks
Only supports visensor_msgs.
Parameters
[out]calibrationsThe calibrations.
Returns
True if successful.
bool okvis::RosParametersReader::getCameraCalibration ( std::vector< CameraCalibration, Eigen::aligned_allocator< CameraCalibration >> &  calibrations,
cv::FileStorage &  configurationFile 
)
privatevirtual

Get the camera calibration.

This looks for the calibration in the configuration file first. If useDriver==false it will next try to get the calibration via the ROS service advertised by the ViSensor node. If still unsuccessful it will try to find the calibration in the ROS-topic /calibrationX. If useDriver==true it will try to directly get the calibration from the sensor.

Parameters
calibrationsThe calibrations.
configurationFileThe config file.
Returns
True if reading of the calibration was successful.

Reimplemented from okvis::VioParametersReader.


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