65 "Move proximal and distal joints of finger 1 three times by 10 degrees, stop movement when halfway done.\n(C++ demo application using the SDHLibrary-CPP library.)\n" 68 " - Make SDH connected via Ethernet move.\n" 69 " The SDH has IP-Address 192.168.1.42 and is attached to TCP port 23.\n" 70 " (Requires at least SDH-firmware v0.0.3.1)\n" 71 " > demo-simple2 --tcp=192.168.1.42:23\n" 73 " - Make SDH connected to port 2 = COM3 move:\n" 74 " > demo-simple2 -p 2\n" 76 " - Make SDH connected to USB to RS232 converter 0 move:\n" 77 " > demo-simple2 --sdh_rs_device=/dev/ttyUSB0 \n" 79 " - Get the version info of both the joint controllers and the tactile \n" 80 " sensor firmware from an SDH connected via Ethernet.\n" 81 " The joint controllers and the tactile sensors have a common IP-Address,\n" 82 " here 192.168.1.42. The SDH controller is attached to the \n" 83 " default TCP port 23 and the tactile sensors to the default TCP port 13000.\n" 84 " (Requires at least SDH-firmware v0.0.3.2)\n" 85 " > demo-simple2 --tcp=192.168.1.42 --dsa_tcp -v\n" 87 " - Get the version info of an SDH connected to port 2 = COM3 \n" 88 " > demo-simple2 --port=2 -v\n";
89 char const*
__author__ =
"Dirk Osswald: dirk.osswald@de.schunk.com";
90 char const*
__url__ =
"http://www.schunk.com";
91 char const*
__version__ =
"$Id: demo-simple2.cpp 10351 2013-06-18 16:28:14Z Osswald2 $";
99 int main(
int argc,
char** argv )
116 cdbg <<
"Debug messages of " << argv[0] <<
" are printed like this.\n";
128 cdbg <<
"Successfully created cSDH instance\n";
132 cdbg <<
"Successfully opened communication to SDH\n";
153 std::vector<double> fta = faa;
161 std::cout <<
"Moving finger " << iFinger <<
" between faa=" << faa <<
" and fta=" << fta <<
"\n";
164 for (
int i=0; i<3; i++ )
198 std::cerr <<
"demo-simple2 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 SetVelocityProfile(eVelocityProfile velocity_profile)
void SetFingerTargetAngle(int iFinger, std::vector< double > const &angles)
A class to print colored debug messages.
std::vector< double > GetFingerActualAngle(int iFinger)
Implementation of a class to parse common SDH related command line options.
double MoveFinger(std::vector< int >const &fingers, bool sequ=true)
eVelocityProfile
An enum for all possible SDH internal velocity profile types.
static char const * GetLibraryRelease(void)
std::vector< double > GetFingerMinAngle(int iFinger)
eVelocityProfile GetVelocityProfile(void)
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.
void SetController(cSDHBase::eControllerType controller)
Interface of auxilliary utility functions for SDHLibrary-CPP.
virtual const char * what() const
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
char const * __copyright__
This file contains settings to make the SDHLibrary compile on differen systems:
static char const * GetLibraryName(void)
This file contains some basic definitions (defines, macros, datatypes)
class for command line option parsing holding option parsing results
int main(int argc, char **argv)
USING_NAMESPACE_SDH NAMESPACE_SDH_START std::ostream * g_sdh_debug_log
std::vector< double > GetFingerMaxAngle(int iFinger)