Go to the documentation of this file.
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";
void SetAxisTargetVelocity(std::vector< int > const &axes, std::vector< double > const &velocities)
#define USING_NAMESPACE_SDH
Base class for exceptions in the SDHLibrary-CPP.
@ eVP_RAMP
ramp velocity profile
Implementation of a class to parse common SDH related command line options.
int main(int argc, char **argv)
std::vector< double > GetFingerMaxAngle(int iFinger)
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...
eVelocityProfile
An enum for all possible SDH internal velocity profile types.
class for command line option parsing holding option parsing results
void SetVelocityProfile(eVelocityProfile velocity_profile)
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.
std::vector< double > GetFingerActualAngle(int iFinger)
This file contains some basic definitions (defines, macros, datatypes)
std::vector< double > GetFingerMinAngle(int iFinger)
char const * __copyright__
double ToRange(double v, double min, double max)
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 SetController(cSDHBase::eControllerType controller)
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 MoveFinger(std::vector< int >const &fingers, bool sequ=true)
eVelocityProfile GetVelocityProfile(void)
@ All
A meta-value that means "access all possible values".
sdhlibrary_cpp
Author(s): Dirk Osswald
autogenerated on Wed Mar 2 2022 01:00:58