Public Types | Public Member Functions | Public Attributes | Private Attributes
TibiDaboLaser3dDriver Class Reference

IRI ROS Specific Driver Class. More...

#include <tibi_dabo_laser_3d_driver.h>

Inheritance diagram for TibiDaboLaser3dDriver:
Inheritance graph
[legend]

List of all members.

Public Types

typedef
tibi_dabo_laser_3d::TibiDaboLaser3dConfig 
Config
 define config type

Public Member Functions

bool closeDriver (void)
 close driver
void config_update (Config &new_cfg, uint32_t level=0)
 config update
double get_current_angle (void)
double get_current_velocity (void)
double get_fixed_angle (void)
bool is_scan_done (void)
bool is_scan_enabled (void)
void move_absolute_angle (double angle)
bool openDriver (void)
 open driver
void start_scan (void)
bool startDriver (void)
 start driver
bool stopDriver (void)
 stop driver
 TibiDaboLaser3dDriver (void)
 constructor
 ~TibiDaboLaser3dDriver (void)
 Destructor.

Public Attributes

Config config_
 config variable

Private Attributes

int baudrate
double current_max_angle
double current_min_angle
double current_velocity
scan_dir dir
double fixed_angle
double new_max_angle
double new_min_angle
double new_velocity
bool scan_enabled
std::string serial_number
CDynamixelMotor * servo
std::string servo_config_file
unsigned char servo_id

Detailed Description

IRI ROS Specific Driver Class.

This class inherits from the IRI Base class IriBaseDriver, which provides the guidelines to implement any specific driver. The IriBaseDriver class offers an easy framework to integrate functional drivers implemented in C++ with the ROS driver structure. ROS driver_base state transitions are already managed by IriBaseDriver.

The TibiDaboLaser3dDriver class must implement all specific driver requirements to safetely open, close, run and stop the driver at any time. It also must guarantee an accessible interface for all driver's parameters.

The TibiDaboLaser3dConfig.cfg needs to be filled up with those parameters suitable to be changed dynamically by the ROS dyanmic reconfigure application. The implementation of the CIriNode class will manage those parameters through methods like postNodeOpenHook() and reconfigureNodeHook().

Definition at line 55 of file tibi_dabo_laser_3d_driver.h.


Member Typedef Documentation

typedef tibi_dabo_laser_3d::TibiDaboLaser3dConfig TibiDaboLaser3dDriver::Config

define config type

Define a Config type with the TibiDaboLaser3dConfig. All driver implementations will then use the same variable type Config.

Definition at line 83 of file tibi_dabo_laser_3d_driver.h.


Constructor & Destructor Documentation

constructor

In this constructor parameters related to the specific driver can be initalized. Those parameters can be also set in the openDriver() function. Attributes from the main node driver class IriBaseDriver such as loop_rate, may be also overload here.

Definition at line 5 of file tibi_dabo_laser_3d_driver.cpp.

Destructor.

This destructor is called when the object is about to be destroyed.

Definition at line 217 of file tibi_dabo_laser_3d_driver.cpp.


Member Function Documentation

close driver

In this function, the driver must be closed. Variables related to the driver state must also be taken into account. This function is automatically called by IriBaseDriver::doClose(), an state transition is performed if return value equals true.

Returns:
bool successful

Implements iri_base_driver::IriBaseDriver.

Definition at line 67 of file tibi_dabo_laser_3d_driver.cpp.

void TibiDaboLaser3dDriver::config_update ( Config new_cfg,
uint32_t  level = 0 
)

config update

In this function the driver parameters must be updated with the input config variable. Then the new configuration state will be stored in the Config attribute.

Parameters:
new_cfgthe new driver configuration state
levellevel in which the update is taken place

Definition at line 87 of file tibi_dabo_laser_3d_driver.cpp.

Definition at line 174 of file tibi_dabo_laser_3d_driver.cpp.

Definition at line 187 of file tibi_dabo_laser_3d_driver.cpp.

Definition at line 204 of file tibi_dabo_laser_3d_driver.cpp.

Definition at line 136 of file tibi_dabo_laser_3d_driver.cpp.

Definition at line 199 of file tibi_dabo_laser_3d_driver.cpp.

Definition at line 209 of file tibi_dabo_laser_3d_driver.cpp.

open driver

In this function, the driver must be openned. Openning errors must be taken into account. This function is automatically called by IriBaseDriver::doOpen(), an state transition is performed if return value equals true.

Returns:
bool successful

Implements iri_base_driver::IriBaseDriver.

Definition at line 24 of file tibi_dabo_laser_3d_driver.cpp.

Definition at line 122 of file tibi_dabo_laser_3d_driver.cpp.

start driver

After this function, the driver and its thread will be started. The driver and related variables should be properly setup. This function is automatically called by IriBaseDriver::doStart(), an state transition is performed if return value equals true.

Returns:
bool successful

Implements iri_base_driver::IriBaseDriver.

Definition at line 77 of file tibi_dabo_laser_3d_driver.cpp.

stop driver

After this function, the driver's thread will stop its execution. The driver and related variables should be properly setup. This function is automatically called by IriBaseDriver::doStop(), an state transition is performed if return value equals true.

Returns:
bool successful

Implements iri_base_driver::IriBaseDriver.

Definition at line 82 of file tibi_dabo_laser_3d_driver.cpp.


Member Data Documentation

Definition at line 62 of file tibi_dabo_laser_3d_driver.h.

config variable

This variable has all the driver parameters defined in the cfg config file. Is updated everytime function config_update() is called.

Definition at line 91 of file tibi_dabo_laser_3d_driver.h.

Definition at line 71 of file tibi_dabo_laser_3d_driver.h.

Definition at line 72 of file tibi_dabo_laser_3d_driver.h.

Definition at line 70 of file tibi_dabo_laser_3d_driver.h.

Definition at line 75 of file tibi_dabo_laser_3d_driver.h.

Definition at line 74 of file tibi_dabo_laser_3d_driver.h.

Definition at line 68 of file tibi_dabo_laser_3d_driver.h.

Definition at line 69 of file tibi_dabo_laser_3d_driver.h.

Definition at line 67 of file tibi_dabo_laser_3d_driver.h.

Definition at line 73 of file tibi_dabo_laser_3d_driver.h.

std::string TibiDaboLaser3dDriver::serial_number [private]

Definition at line 61 of file tibi_dabo_laser_3d_driver.h.

CDynamixelMotor* TibiDaboLaser3dDriver::servo [private]

Definition at line 59 of file tibi_dabo_laser_3d_driver.h.

Definition at line 65 of file tibi_dabo_laser_3d_driver.h.

unsigned char TibiDaboLaser3dDriver::servo_id [private]

Definition at line 64 of file tibi_dabo_laser_3d_driver.h.


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


tibi_dabo_laser_3d
Author(s): Sergi Hernandez Juan
autogenerated on Fri Dec 6 2013 23:22:07