Download the Geomagic Touch drivers and the SDK for your platform following the links at https://3dssupport.microsoftcrmportals.com/knowledgebase/article/KA-01405/en-us and follow the enclosed instructions.
In Windows, the environment variable OH_SDK_BASE
should be set by the installer
pointing to the location where the driver and the SDK are installed.
In Linux, remember to set LC_NUMERIC=en_US.UTF-8
in the environment,
prior to pairing the device. This will make the driver work outside US.
- YARP
- icub-contrib-common (only for examples and tests)
- Set up the building project by means of cmake. If you need to compile some physical drivers you need, remember
to enable the relative CMake variable, e.g.
ENABLE_geomagicdriver
. - Compile and install the project.
- Set up the environment variable
hapticdevice_DIR
pointing where the project gets installed (should be the same path used forCMAKE_INSTALL_PREFIX
). - Append to the environment variable
YARP_DATA_DIRS
the path$hapticdevice_DIR/share/hapticdevice
.
First, check whether the YARP drivers got installed correctly.
Therefore, launch: yarpdev --list
and see if hapticdevicewrapper
, hapticdeviceclient
, geomagicdriver
are listed down.
You can then run the driver in two ways. For example, for the geomagicdriver
it holds:
yarpdev --device geomagicdriver [option-list]
yarprobotinterface --context geomagic --config geomagic.xml
The available options are:
device-id
"id": a string with the name of the physical device that has been instantiated.name
"port-stem-name": a string specifying the ports stem-name (hapticdevice
by default).period
period: an integer that specifies the period inms
(20 ms
by default).verbosity
level: an integer accounting for the enabled verbosity level (0
by default).
In case the yarprobotinterface
deployer is chosen, then the options are all contained in the corresponding
xml
files that are installed in $hapticdevice_DIR/share/hapticdevice/context
path and possibly
customized using the yarp-config
tool.
A YARP module that wants to connect to an haptic device needs to contain the following instructions:
#include <yarp/os/Property.h>
#include <yarp/dev/PolyDriver.h>
#include <yarp/dev/IHapticDevice.h>
yarp::os::Property option;
option.put("device","hapticdeviceclient"); // device name
option.put("remote","/hapticdevice"); // or whatever wrapper stem-name
option.put("local","/local-port"); // any local ports stem-name
yarp::dev::PolyDriver driver;
driver.open(option);
yarp::dev::IHapticDevice *ihap;
driver.view(ihap);
Read YARP documentation to find out more about IHapticDevice interface.
Ugo Pattacini
:hapticdevicewrapper
hapticdeviceclient
Manuelito Scola
:geomagicdriver
Material included here is Copyright of iCub Facility - Istituto Italiano di Tecnologia and is released under the terms of the GPL v2.0 or later. See the file LICENSE for details.