57 char const*
__help__ =
"Move proximal and distal joints of finger 1 three times by 10 degrees and measure time for these actions.\n(C++ demo application using the SDHLibrary-CPP library.)";
58 char const*
__author__ =
"Dirk Osswald: dirk.osswald@de.schunk.com";
59 char const*
__url__ =
"http://www.schunk.com";
60 char const*
__version__ =
"$Id: demo-simple-withtiming.cpp 6265 2010-12-02 13:59:45Z Osswald2 $";
67 "usage: demo-simple-withtiming [options]\n" 71 int main(
int argc,
char** argv )
88 cdbg <<
"Debug messages of " << argv[0] <<
" are printed like this.\n";
100 cdbg <<
"Successfully created cSDH instance\n";
104 cdbg <<
"Successfully opened communication to SDH\n";
116 std::vector<double> fta = faa;
118 std::vector<double> faa2;
126 std::cout <<
"Moving finger " << iFinger <<
" between faa=" << faa <<
" and fta=" << fta <<
"\n";
129 double dt1, dt2, dt3, T;
131 std::cout <<
"SetFingerTargetAngle\t";
132 std::cout <<
"GetFingerActualAngle\t";
133 std::cout <<
"MoveHand\t";
135 for (
int i=0; i<20; i++ )
162 std::cout << dt1 <<
"\t" << dt2 <<
"\t" << dt3 <<
"\n";
189 std::cout << dt1 <<
"\t" << dt2 <<
"\t" << dt3 <<
"\n";
199 std::cerr <<
"demo-simple-withtiming main(): An exception was caught: " << e->
what() <<
"\n";
#SDH::cSDH is the end user interface class to control a SDH (SCHUNK Dexterous Hand).
int Parse(int argc, char **argv, char const *helptext, char const *progname, char const *version, char const *libname, char const *librelease)
This file contains the interface to class #SDH::cSDH, the end user class to access the SDH from a PC...
#define SDH_ASSERT_TYPESIZES()
macro to assert that the defined typedefs have the expected sizes
Interface of auxilliary utility functions for SDHLibrary-CPP.
void StoreNow(void)
Store current time internally.
void SetFingerTargetAngle(int iFinger, std::vector< double > const &angles)
double Elapsed(void) const
Return time in seconds elapsed between the time stored in the object and now.
A class to print colored debug messages.
std::vector< double > GetFingerActualAngle(int iFinger)
int main(int argc, char **argv)
virtual const char * what() const
Implementation of a class to parse common SDH related command line options.
static char const * GetLibraryName(void)
This file contains interface and implementation of class #SDH::cDBG, a class for colorfull debug mess...
std::vector< double > GetFingerMinAngle(int iFinger)
void OpenCommunication(NS_SDH cSDH &hand)
Base class for exceptions in the SDHLibrary-CPP.
char const * __copyright__
Interface of auxilliary utility functions for SDHLibrary-CPP.
void Close(bool leave_enabled=false)
double ToRange(double v, double min, double max)
#define USING_NAMESPACE_SDH
static char const * GetLibraryRelease(void)
This file contains settings to make the SDHLibrary compile on differen systems:
Very simple class to measure elapsed time.
double MoveHand(bool sequ=true)
This file contains some basic definitions (defines, macros, datatypes)
class for command line option parsing holding option parsing results
USING_NAMESPACE_SDH NAMESPACE_SDH_START std::ostream * g_sdh_debug_log
std::vector< double > GetFingerMaxAngle(int iFinger)