68 "Move proximal and distal joints of finger 1 three times by 0.1745 rad (10 degrees).\n" 69 "(C++ demo application using the SDHLibrary-CPP library.)\n" 72 " - Make SDH connected via Ethernet move.\n" 73 " The SDH has IP-Address 192.168.1.42 and is attached to TCP port 23.\n" 74 " (Requires at least SDH-firmware v0.0.3.1)\n" 75 " > demo-radians --tcp=192.168.1.42:23\n" 77 " - Make SDH connected to port 2 = COM3 move:\n" 78 " > demo-radians -p 2\n" 80 " - Make SDH connected to USB to RS232 converter 0 move:\n" 81 " > demo-radians --sdh_rs_device=/dev/ttyUSB0 \n" 83 " - Get the version info of both the joint controllers and the tactile \n" 84 " sensor firmware from an SDH connected via Ethernet.\n" 85 " The joint controllers and the tactile sensors have a common IP-Address,\n" 86 " here 192.168.1.42. The SDH controller is attached to the \n" 87 " default TCP port 23 and the tactile sensors to the default TCP port 13000.\n" 88 " (Requires at least SDH-firmware v0.0.3.2)\n" 89 " > demo-radians --tcp=192.168.1.42 --dsa_tcp -v\n" 91 " - Get the version info of an SDH connected to port 2 = COM3 \n" 92 " > demo-radians --port=2 -v\n";
93 char const*
__author__ =
"Dirk Osswald: dirk.osswald@de.schunk.com";
94 char const*
__url__ =
"http://www.schunk.com";
95 char const*
__version__ =
"$Id: demo-radians.cpp 11045 2013-11-27 15:12:49Z Osswald2 $";
102 "usage: demo-radians [options]\n" 106 int main(
int argc,
char** argv )
123 cdbg <<
"Debug messages of " << argv[0] <<
" are printed like this.\n";
135 cdbg <<
"Successfully created cSDH instance\n";
139 cdbg <<
"Successfully opened communication to SDH\n";
155 std::vector<double> fta = faa;
157 fta[1] -= 10.0*M_PI/180.0;
158 fta[2] -= 10.0*M_PI/180.0;
163 std::cout <<
"Moving finger " << iFinger <<
" between faa=" << faa <<
" and fta=" << fta <<
"\n";
166 for (
int i=0; i<3; i++ )
189 std::cerr <<
"demo-radians main(): An exception was caught: " << e->
what() <<
"\n";
A meta-value that means "access all possible values".
#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
void SetFingerTargetAngle(int iFinger, std::vector< double > const &angles)
A class to print colored debug messages.
std::vector< double > GetFingerActualAngle(int iFinger)
virtual const char * what() const
Implementation of a class to parse common SDH related command line options.
static char const * GetLibraryName(void)
double MoveFinger(std::vector< int >const &fingers, bool sequ=true)
std::vector< double > GetFingerMinAngle(int iFinger)
coordinated position controller (position per axis => "pose controller"), all axes start and stop mov...
void OpenCommunication(NS_SDH cSDH &hand)
Base class for exceptions in the SDHLibrary-CPP.
char const * __copyright__
void SetController(cSDHBase::eControllerType controller)
Interface of auxilliary utility functions for SDHLibrary-CPP.
void Close(bool leave_enabled=false)
void SetAxisTargetVelocity(std::vector< int > const &axes, std::vector< double > const &velocities)
double ToRange(double v, double min, double max)
#define USING_NAMESPACE_SDH
int main(int argc, char **argv)
static char const * GetLibraryRelease(void)
This file contains settings to make the SDHLibrary compile on differen systems:
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)