Go to the documentation of this file.
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";
void StoreNow(void)
Store current time internally.
#define USING_NAMESPACE_SDH
Base class for exceptions in the SDHLibrary-CPP.
char const * __copyright__
Very simple class to measure elapsed time.
double Elapsed(void) const
Return time in seconds elapsed between the time stored in the object and now.
Implementation of a class to parse common SDH related command line options.
double MoveHand(bool sequ=true)
This file contains interface and implementation of class #SDH::cDBG, a class for colorfull debug mess...
std::vector< double > GetFingerMaxAngle(int iFinger)
void OpenCommunication(NS_SDH cSDH &hand)
static char const * GetLibraryRelease(void)
class for command line option parsing holding option parsing results
void SetFingerTargetAngle(int iFinger, std::vector< double > const &angles)
#SDH::cSDH is the end user interface class to control a SDH (SCHUNK Dexterous Hand).
A class to print colored debug messages.
int main(int argc, char **argv)
std::vector< double > GetFingerActualAngle(int iFinger)
This file contains some basic definitions (defines, macros, datatypes)
std::vector< double > GetFingerMinAngle(int iFinger)
double ToRange(double v, double min, double max)
Interface of auxilliary utility functions for SDHLibrary-CPP.
This file contains settings to make the SDHLibrary compile on differen systems:
static char const * GetLibraryName(void)
USING_NAMESPACE_SDH NAMESPACE_SDH_START std::ostream * g_sdh_debug_log
This file contains the interface to class #SDH::cSDH, the end user class to access the SDH from a PC.
virtual const char * what() const
int Parse(int argc, char **argv, char const *helptext, char const *progname, char const *version, char const *libname, char const *librelease)
void Close(bool leave_enabled=false)
Interface of auxilliary utility functions for SDHLibrary-CPP.
#define SDH_ASSERT_TYPESIZES()
macro to assert that the defined typedefs have the expected sizes
sdhlibrary_cpp
Author(s): Dirk Osswald
autogenerated on Wed Mar 2 2022 01:00:58