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

IRI ROS Specific Driver Class. More...

#include <dynamixel_no_gripper_driver.h>

Inheritance diagram for DynamixelNoGripperDriver:
Inheritance graph
[legend]

List of all members.

Public Types

typedef
iri_dynamixel_no_gripper::DynamixelNoGripperConfig 
Config
 define config type

Public Member Functions

bool close_gripper ()
 gripper will perform a closing action (pick)
bool closeDriver (void)
 close driver
void config_update (Config &new_cfg, uint32_t level=0)
 config update
void disable_gripper ()
 disables the gripper
 DynamixelNoGripperDriver (void)
 constructor
float get_current_angle ()
 returns current angle position of the motor
float get_current_effort ()
 return the current motor effort
bool is_at_max_angle ()
 returns true if the motor is at the maximum angle
bool is_at_min_angle ()
 returns true if the motor is at the minimum angle
bool open_gripper ()
 gripper will perform an opening action (lift)
bool openDriver (void)
 open driver
void scan_XML_files (void)
 Scan for correct configuration xml files.
bool startDriver (void)
 start driver
void stop_gripper ()
 ask gripper to stops its motion
bool stopDriver (void)
 stop driver
 ~DynamixelNoGripperDriver (void)
 Destructor.

Public Attributes

Config config_
 config variable

Private Member Functions

bool move_gripper (const double position_in_radians)
 internal function to perfemor gripper movement

Private Attributes

std::string full_path_
boost::shared_ptr
< CDynamixelGripper > 
gripper_
std::string gripper_config_file_
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 DynamixelNoGripperDriver 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 DynamixelNoGripperConfig.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 dynamixel_no_gripper_driver.h.


Member Typedef Documentation

typedef iri_dynamixel_no_gripper::DynamixelNoGripperConfig DynamixelNoGripperDriver::Config

define config type

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

Definition at line 71 of file dynamixel_no_gripper_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 10 of file dynamixel_no_gripper_driver.cpp.

Destructor.

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

Definition at line 19 of file dynamixel_no_gripper_driver.cpp.


Member Function Documentation

gripper will perform a closing action (pick)

Definition at line 125 of file dynamixel_no_gripper_driver.cpp.

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 68 of file dynamixel_no_gripper_driver.cpp.

void DynamixelNoGripperDriver::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 83 of file dynamixel_no_gripper_driver.cpp.

disables the gripper

Definition at line 166 of file dynamixel_no_gripper_driver.cpp.

returns current angle position of the motor

Definition at line 150 of file dynamixel_no_gripper_driver.cpp.

return the current motor effort

Definition at line 145 of file dynamixel_no_gripper_driver.cpp.

returns true if the motor is at the maximum angle

Definition at line 155 of file dynamixel_no_gripper_driver.cpp.

returns true if the motor is at the minimum angle

Definition at line 161 of file dynamixel_no_gripper_driver.cpp.

bool DynamixelNoGripperDriver::move_gripper ( const double  position_in_radians) [private]

internal function to perfemor gripper movement

gripper will perform an opening action (lift)

Definition at line 120 of file dynamixel_no_gripper_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 45 of file dynamixel_no_gripper_driver.cpp.

Scan for correct configuration xml files.

Definition at line 23 of file dynamixel_no_gripper_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 73 of file dynamixel_no_gripper_driver.cpp.

ask gripper to stops its motion

Definition at line 130 of file dynamixel_no_gripper_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 78 of file dynamixel_no_gripper_driver.cpp.


Member Data Documentation

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 79 of file dynamixel_no_gripper_driver.h.

std::string DynamixelNoGripperDriver::full_path_ [private]

Definition at line 62 of file dynamixel_no_gripper_driver.h.

boost::shared_ptr<CDynamixelGripper> DynamixelNoGripperDriver::gripper_ [private]

Definition at line 59 of file dynamixel_no_gripper_driver.h.

Definition at line 60 of file dynamixel_no_gripper_driver.h.

std::string DynamixelNoGripperDriver::xml_path_ [private]

Definition at line 61 of file dynamixel_no_gripper_driver.h.


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


iri_dynamixel_no_gripper
Author(s): Sergi Foix
autogenerated on Fri Dec 6 2013 20:00:46