Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Private Attributes
DaboArmNodeDriver Class Reference

IRI ROS Specific Driver Class. More...

#include <dabo_arm_node_driver.h>

Inheritance diagram for DaboArmNodeDriver:
Inheritance graph
[legend]

List of all members.

Public Types

typedef
dabo_arm_node::DaboArmNodeConfig 
Config
 define config type

Public Member Functions

bool closeDriver (void)
 close driver
void config_update (Config &new_cfg, uint32_t level=0)
 config update
 DaboArmNodeDriver (void)
 constructor
std::string get_config_file (unsigned int index)
int get_feedback_rate (void)
std::string get_motion_seq_file (unsigned int index)
std::string get_motion_sequence_complete_event_id (void)
float get_motion_sequence_completed_percentage (void)
std::string get_motion_sequence_error_event_id (void)
std::string get_motion_sequence_error_message (void)
unsigned int get_num_config_files (void)
unsigned int get_num_motion_seq_files (void)
void get_position (std::vector< double > &position)
 function to get the current position of all motors
void get_velocity (std::vector< double > &velocity)
 function to get the current velocity of all motors
void move_absolute_angle (std::vector< double > &position, std::vector< double > &velocity)
 functions to move the group of motors in position control
void move_relative_angle (std::vector< double > &position, std::vector< double > &velocity)
 functions to move the group of motors in position control
bool openDriver (void)
 open driver
void pause_motion_sequence (void)
void resume_motion_sequence (void)
void start_motion_sequence (std::string &filename)
void start_motion_sequence (std::vector< TDynamixelMotionStep > &seq)
bool startDriver (void)
 start driver
void stop (void)
 function to stop all motors
void stop_motion_sequence (void)
bool stopDriver (void)
 stop driver
 ~DaboArmNodeDriver (void)
 Destructor.

Public Attributes

Config config_
 config variable

Protected Member Functions

void scan_XML_files (void)

Private Attributes

std::string arm_config_file
CSegwayDynArm * arm_driver
std::vector< std::string > config_files
int feedback_rate
std::vector< std::string > motion_seq_files
std::string xml_path

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 DaboArmNodeDriver 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 DaboArmNodeConfig.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 56 of file dabo_arm_node_driver.h.


Member Typedef Documentation

typedef dabo_arm_node::DaboArmNodeConfig DaboArmNodeDriver::Config

define config type

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

Definition at line 79 of file dabo_arm_node_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 18 of file dabo_arm_node_driver.cpp.

Destructor.

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

Definition at line 300 of file dabo_arm_node_driver.cpp.


Member Function Documentation

bool DaboArmNodeDriver::closeDriver ( void  ) [virtual]

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 89 of file dabo_arm_node_driver.cpp.

void DaboArmNodeDriver::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 110 of file dabo_arm_node_driver.cpp.

std::string DaboArmNodeDriver::get_config_file ( unsigned int  index)

Definition at line 272 of file dabo_arm_node_driver.cpp.

Definition at line 295 of file dabo_arm_node_driver.cpp.

std::string DaboArmNodeDriver::get_motion_seq_file ( unsigned int  index)

Definition at line 286 of file dabo_arm_node_driver.cpp.

Definition at line 194 of file dabo_arm_node_driver.cpp.

Definition at line 218 of file dabo_arm_node_driver.cpp.

Definition at line 202 of file dabo_arm_node_driver.cpp.

Definition at line 210 of file dabo_arm_node_driver.cpp.

unsigned int DaboArmNodeDriver::get_num_config_files ( void  )

Definition at line 267 of file dabo_arm_node_driver.cpp.

Definition at line 281 of file dabo_arm_node_driver.cpp.

void DaboArmNodeDriver::get_position ( std::vector< double > &  position)

function to get the current position of all motors

Definition at line 255 of file dabo_arm_node_driver.cpp.

void DaboArmNodeDriver::get_velocity ( std::vector< double > &  velocity)

function to get the current velocity of all motors

Definition at line 261 of file dabo_arm_node_driver.cpp.

void DaboArmNodeDriver::move_absolute_angle ( std::vector< double > &  position,
std::vector< double > &  velocity 
)

functions to move the group of motors in position control

Definition at line 227 of file dabo_arm_node_driver.cpp.

void DaboArmNodeDriver::move_relative_angle ( std::vector< double > &  position,
std::vector< double > &  velocity 
)

functions to move the group of motors in position control

Definition at line 238 of file dabo_arm_node_driver.cpp.

bool DaboArmNodeDriver::openDriver ( void  ) [virtual]

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 64 of file dabo_arm_node_driver.cpp.

Definition at line 176 of file dabo_arm_node_driver.cpp.

Definition at line 182 of file dabo_arm_node_driver.cpp.

void DaboArmNodeDriver::scan_XML_files ( void  ) [protected]

Definition at line 28 of file dabo_arm_node_driver.cpp.

void DaboArmNodeDriver::start_motion_sequence ( std::string &  filename)

Definition at line 149 of file dabo_arm_node_driver.cpp.

void DaboArmNodeDriver::start_motion_sequence ( std::vector< TDynamixelMotionStep > &  seq)

Definition at line 162 of file dabo_arm_node_driver.cpp.

bool DaboArmNodeDriver::startDriver ( void  ) [virtual]

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 100 of file dabo_arm_node_driver.cpp.

void DaboArmNodeDriver::stop ( void  )

function to stop all motors

Reimplemented from driver_base::Driver.

Definition at line 249 of file dabo_arm_node_driver.cpp.

Definition at line 188 of file dabo_arm_node_driver.cpp.

bool DaboArmNodeDriver::stopDriver ( void  ) [virtual]

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 105 of file dabo_arm_node_driver.cpp.


Member Data Documentation

std::string DaboArmNodeDriver::arm_config_file [private]

Definition at line 63 of file dabo_arm_node_driver.h.

CSegwayDynArm* DaboArmNodeDriver::arm_driver [private]

Definition at line 61 of file dabo_arm_node_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 87 of file dabo_arm_node_driver.h.

Definition at line 66 of file dabo_arm_node_driver.h.

Definition at line 69 of file dabo_arm_node_driver.h.

Definition at line 67 of file dabo_arm_node_driver.h.

std::string DaboArmNodeDriver::xml_path [private]

Definition at line 64 of file dabo_arm_node_driver.h.


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


dabo_arm_node
Author(s): Sergi Hernandez Juan
autogenerated on Fri Dec 6 2013 21:40:30