architecture.dox File Reference


Short overview of the SDHLibrary-CPP and SDH architecture More...

Detailed Description


Short overview of the SDHLibrary-CPP and SDH architecture

Overview

Naming convention:
As a convention "SDH" (capital letters) is used to refer to the physical device, the three fingered SCHUNK Dexterous Hand, while "sdh" (small letters) refers to the PC-software that communicates with the physical SDH device. Within the "sdh" PC-software further entities can be distinguished: The C++ library SDHLibrary-CPP.so (on Linux) or SDHLibrary-CPP.dll (on Windows/cygwin) that contains the complete sdh library including the user interface class #SDH::cSDH. This #SDH::cSDH class will be described in detail below.
Basic structure:
The basic structure of the components looks like this:
dot_inline_dotgraph_1.png
Basic architecture:
There are several classes defined in SDHLibrary-CPP:
Example use:
An exemplary use of the sdh module in a user application in C++ might look like this:
...
// Include the cSDH interface
include <sdh.h>
// Create an instance "hand" of the class cSDH:
cSDH hand;
// Open communication to the SDH device via default serial port 0 == "COM1"
hand.OpenRS232();
// Perform some action:
// get the current actual axis angles of finger 0
std::vector<double> faa = hand.GetFingerActualAngle( 0 );
// modify these by decreasing the proximal and the distal axis angles:
std::vector<double> fta = faa;
fta[1] -= 10;
fta[2] -= 10;
// set modified angles as new target angles:
hand.SetFingerTargetAngle( 0, fta );
// now make the finger move there:
hand.MoveFinger( 0 );
// Finally close connection to SDH again (This automatically
// switches off the axis controllers to prevent overheating):
hand.Close();

Real example code is available in the demo-*.cpp code files, see e.g.

Definition in file architecture.dox.

cSDH::OpenRS232
void OpenRS232(int _port=0, unsigned long _baudrate=115200, double _timeout=-1, char const *_device_format_string="/dev/ttyS%d")
Definition: sdh.cpp:733
cSDH::SetFingerTargetAngle
void SetFingerTargetAngle(int iFinger, std::vector< double > const &angles)
Definition: sdh.cpp:1755
cSDH
#SDH::cSDH is the end user interface class to control a SDH (SCHUNK Dexterous Hand).
Definition: sdh.h:172
cSDH::GetFingerActualAngle
std::vector< double > GetFingerActualAngle(int iFinger)
Definition: sdh.cpp:1798
cSDH::Close
void Close(bool leave_enabled=false)
Definition: sdh.cpp:888
cSDH::MoveFinger
double MoveFinger(std::vector< int >const &fingers, bool sequ=true)
Definition: sdh.cpp:1967


sdhlibrary_cpp
Author(s): Dirk Osswald
autogenerated on Wed Mar 2 2022 01:00:58