Go to the documentation of this file.
62 "Demonstrate the use of the GripHand command.\n"
63 "(C++ demo application using the SDHLibrary-CPP library.)\n"
66 " - Make SDH connected via Ethernet move.\n"
67 " The SDH has IP-Address 192.168.1.42 and is attached to TCP port 23.\n"
68 " (Requires at least SDH-firmware v0.0.3.1)\n"
69 " > demo-griphand --tcp=192.168.1.42:23\n"
71 " - Make SDH connected to port 2 = COM3 move:\n"
72 " > demo-griphand -p 2\n"
74 " - Make SDH connected to USB to RS232 converter 0 move:\n"
75 " > demo-griphand --sdh_rs_device=/dev/ttyUSB0 \n"
77 " - Get the version info of both the joint controllers and the tactile \n"
78 " sensor firmware from an SDH connected via Ethernet.\n"
79 " The joint controllers and the tactile sensors have a common IP-Address,\n"
80 " here 192.168.1.42. The SDH controller is attached to the \n"
81 " default TCP port 23 and the tactile sensors to the default TCP port 13000.\n"
82 " (Requires at least SDH-firmware v0.0.3.2)\n"
83 " > demo-griphand --tcp=192.168.1.42 --dsa_tcp -v\n"
85 " - Get the version info of an SDH connected to port 2 = COM3 \n"
86 " > demo-griphand --port=2 -v\n";
87 char const*
__author__ =
"Dirk Osswald: dirk.osswald@de.schunk.com";
88 char const*
__url__ =
"http://www.schunk.com";
89 char const*
__version__ =
"$Id: demo-griphand.cpp 10351 2013-06-18 16:28:14Z Osswald2 $";
96 "usage: demo-griphand [options]\n"
100 int main(
int argc,
char** argv )
117 cdbg <<
"Debug messages of " << argv[0] <<
" are printed like this.\n";
127 cdbg <<
"Successfully created cSDH instance\n";
131 cdbg <<
"Successfully opened communication to SDH\n";
138 double velocity = 40.0;
144 std::cout <<
"Performing GripHand() for grasp " << int(grasp_id) <<
"=\"" << hand.
GetStringFromGraspId( grasp_id ) <<
"\"\n"; std::cout.flush();
147 std::cout <<
" close_ratio = 0.0 (fully open)..."; std::cout.flush();
148 hand.
GripHand( grasp_id, close_ratio, velocity,
true );
149 std::cout <<
" finished\n"; std::cout.flush();
153 std::cout <<
" close_ratio = 0.5 (half closed)..."; std::cout.flush();
154 hand.
GripHand( grasp_id, close_ratio, velocity,
true );
155 std::cout <<
" finished\n"; std::cout.flush();
159 std::cout <<
" close_ratio = 1.0 (fully closed)..."; std::cout.flush();
160 hand.
GripHand( grasp_id, close_ratio, velocity,
true );
161 std::cout <<
" finished\n"; std::cout.flush();
166 std::cout <<
" reopening..."; std::cout.flush();
167 hand.
GripHand( grasp_id, close_ratio, velocity,
true );
168 std::cout <<
" finished\n"; std::cout.flush();
178 std::cerr <<
"demo-griphand main(): An exception was caught: " << e->
what() <<
"\n";
#define USING_NAMESPACE_SDH
Base class for exceptions in the SDHLibrary-CPP.
@ eGID_DIMENSION
Endmarker and dimension.
Implementation of a class to parse common SDH related command line options.
void OpenCommunication(NS_SDH cSDH &hand)
static char const * GetLibraryRelease(void)
@ eCT_POSE
coordinated position controller (position per axis => "pose controller"), all axes start and stop mov...
class for command line option parsing holding option parsing results
#SDH::cSDH is the end user interface class to control a SDH (SCHUNK Dexterous Hand).
A class to print colored debug messages.
This file contains some basic definitions (defines, macros, datatypes)
char const * __copyright__
@ eGID_CENTRICAL
centrical grasp: ???
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)
int main(int argc, char **argv)
void SetController(cSDHBase::eControllerType controller)
eGraspId
The enum values of the known grasps.
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
double GripHand(eGraspId grip, double close, double velocity, bool sequ=true)
static char const * GetStringFromGraspId(eGraspId grasp_id)
Return a ptr to a (static) string describing grasp id grasp_id.
sdhlibrary_cpp
Author(s): Dirk Osswald
autogenerated on Wed Mar 2 2022 01:00:58