65 "Move axes 1,2 and 3 to a specific point.\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-simple3 --tcp=192.168.1.42:23\n" 73 " - Make SDH connected to port 2 = COM3 move:\n" 74 " > demo-simple3 -p 2\n" 76 " - Make SDH connected to USB to RS232 converter 0 move:\n" 77 " > demo-simple3 --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-simple3 --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-simple3 --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-simple3.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";
126 cdbg <<
"Successfully created cSDH instance\n";
130 cdbg <<
"Successfully opened communication to SDH\n";
138 std::vector<int> axes123;
139 axes123.push_back( 1 );
140 axes123.push_back( 2 );
141 axes123.push_back( 3 );
143 std::vector<double> angles123;
144 angles123.push_back( -20.0 );
145 angles123.push_back( -30.0 );
146 angles123.push_back( -40.0 );
194 std::cerr <<
"demo-simple3 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
A class to print colored debug messages.
void WaitAxis(std::vector< int > const &axes, double timeout=-1.0)
Implementation of a class to parse common SDH related command line options.
static char const * GetLibraryRelease(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)
void SetAxisTargetAngle(std::vector< int > const &axes, std::vector< double > const &angles)
#define USING_NAMESPACE_SDH
std::vector< double > GetAxisTargetAngle(std::vector< int > const &axes)
char const * __copyright__
double MoveAxis(std::vector< int >const &axes, bool sequ=true)
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)
int main(int argc, char **argv)
class for command line option parsing holding option parsing results
USING_NAMESPACE_SDH NAMESPACE_SDH_START std::ostream * g_sdh_debug_log
std::vector< int > all_axes
A vector with indices of all axes (in natural order), including the virtual axis. ...