Public Member Functions | Public Attributes | Protected Attributes
MapDemonCtrl Class Reference

#include <demonstrator_control.h>

Inheritance diagram for MapDemonCtrl:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual bool close ()
 Close.
virtual std::string getErrorMessage () const
virtual std::vector< double > getPositions ()
 Gets the current positions.
virtual std::vector< double > getVelocities ()
 Gets the current velcities.
virtual bool init (DemonstratorParams *params)
 Initializing.
virtual bool isInitialized () const
 MapDemonCtrl (DemonstratorParams *params)
 Constructor.
virtual bool movePos (const std::vector< double > &target_positions)
virtual bool recover ()
 Recovery after emergency stop or power supply failure.
virtual bool runCalibration ()
bool setMaxVelocity (const std::vector< double > &velocities)
virtual void setVelocity ()
 Sets the maximum angular velocity (rad/s) for the Joints, use with care!
virtual bool stop ()
virtual bool updatePositions ()
virtual ~MapDemonCtrl ()
 Destructor.

Public Attributes

pthread_mutex_t m_mutex

Protected Attributes

int device_handle_
double encoder_
std::string error_message_
bool initialized_
ros::Time last_time_pub_
std::vector< double > old_positions_
DemonstratorParamsparams_
std::vector< double > positions_
SerialDevicesd_
bool serial_device_opened_
std::vector< double > velocities_

Detailed Description

Definition at line 13 of file demonstrator_control.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 14 of file demonstrator_control.cpp.

Destructor.

shut the robot position output

Definition at line 24 of file demonstrator_control.cpp.


Member Function Documentation

bool MapDemonCtrl::close ( ) [virtual]

Close.

Reimplemented in MapDemonCtrlMaestro.

Definition at line 452 of file demonstrator_control.cpp.

virtual std::string MapDemonCtrl::getErrorMessage ( ) const [inline, virtual]

Definition at line 38 of file demonstrator_control.h.

virtual std::vector<double> MapDemonCtrl::getPositions ( ) [inline, virtual]

Gets the current positions.

Definition at line 62 of file demonstrator_control.h.

virtual std::vector<double> MapDemonCtrl::getVelocities ( ) [inline, virtual]

Gets the current velcities.

Definition at line 70 of file demonstrator_control.h.

bool MapDemonCtrl::init ( DemonstratorParams params) [virtual]

Initializing.

get serial port configurable parameters

now open serial port

this is for security. in case the robot is already outputing data, shut it...

...and flush serial port input buffer

run pan calibration

Reimplemented in MapDemonCtrlMaestro.

Definition at line 37 of file demonstrator_control.cpp.

virtual bool MapDemonCtrl::isInitialized ( ) const [inline, virtual]

Definition at line 28 of file demonstrator_control.h.

bool MapDemonCtrl::movePos ( const std::vector< double > &  target_positions) [virtual]

TODO: Mathematically simplify

convert radians to step number, consider offset

convert radians to step number, consider offset

Reimplemented in MapDemonCtrlMaestro.

Definition at line 217 of file demonstrator_control.cpp.

bool MapDemonCtrl::recover ( ) [virtual]

Recovery after emergency stop or power supply failure.

shut reposition messages from the robot

Reimplemented in MapDemonCtrlMaestro.

Definition at line 464 of file demonstrator_control.cpp.

bool MapDemonCtrl::runCalibration ( ) [virtual]

Shut robot output in case it was already enabled...

...and flush serial port input buffer

Run encoder calibration

get messages till 'L' is received (this is necessary because if the message output of the robot was enabled, between the flush buffer and this we still could have received a few characters from that, before the 'L'.

if tryout

Reposition to Home in case of existant Offsets

Reimplemented in MapDemonCtrlMaestro.

Definition at line 168 of file demonstrator_control.cpp.

bool MapDemonCtrl::setMaxVelocity ( const std::vector< double > &  velocities)
virtual void MapDemonCtrl::setVelocity ( ) [inline, virtual]

Sets the maximum angular velocity (rad/s) for the Joints, use with care!

A Value of 0.5 is already pretty fast, you probably don't want anything more than one...

Reimplemented in MapDemonCtrlMaestro.

Definition at line 56 of file demonstrator_control.h.

bool MapDemonCtrl::stop ( ) [virtual]

Reimplemented in MapDemonCtrlMaestro.

Definition at line 421 of file demonstrator_control.cpp.

bool MapDemonCtrl::updatePositions ( ) [virtual]

Get next position str

Check for processable string

lookup 'R', skip :

check angular difference between reported step count and encoder position.

Reimplemented in MapDemonCtrlMaestro.

Definition at line 364 of file demonstrator_control.cpp.


Member Data Documentation

Definition at line 80 of file demonstrator_control.h.

double MapDemonCtrl::encoder_ [protected]

Definition at line 92 of file demonstrator_control.h.

std::string MapDemonCtrl::error_message_ [protected]

Definition at line 96 of file demonstrator_control.h.

bool MapDemonCtrl::initialized_ [protected]

Definition at line 79 of file demonstrator_control.h.

Definition at line 94 of file demonstrator_control.h.

pthread_mutex_t MapDemonCtrl::m_mutex

Definition at line 24 of file demonstrator_control.h.

std::vector<double> MapDemonCtrl::old_positions_ [protected]

Definition at line 88 of file demonstrator_control.h.

Definition at line 83 of file demonstrator_control.h.

std::vector<double> MapDemonCtrl::positions_ [protected]

Definition at line 87 of file demonstrator_control.h.

Definition at line 85 of file demonstrator_control.h.

Definition at line 81 of file demonstrator_control.h.

std::vector<double> MapDemonCtrl::velocities_ [protected]

Definition at line 90 of file demonstrator_control.h.


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


cob_3d_mapping_demonstrator
Author(s): Georg Arbeiter
autogenerated on Wed Aug 26 2015 11:03:46