This repository contains code to teleoperate the Elfin using Touch X haptic device commands.
This repository was tested in Ubuntu20.04 LTS (Focal Fossa) 64-bit. This repository was specifically tested using the following elements:
- 3D Systems Touch X device with OpenHaptics v3.4 and the Touch Device Driver v2022 available in the same webpage.
- Elfin3 robot arm from Han's Robot. If you are using a different model make sure you change the DH parameters in robot_kinematics.cpp in the ElfinModel class.
- Realsense D405 Depth Camera from Intel. The firmware of the camera was updated to the latest version (5.14) using the realsense-viewer.
You need CXX 11 compiler to compile the project binary. This repository depends on different external libraries that need to be installed in your local pc.
You can download the latest version of Eigen here. In our CMakeLists.txt we look for Eigen in 3rdparty folder inside the project folder. Just create the folder and put Eigen on that folder.
To download and setup OpenHaptics follow the instructions on their webpage. If you followed the instructions properly OpenHaptics shoudl be at /opt/OpenHaptics.
To use the libraries make sure to follow the instructions for librealsense in their github. In our case, we have built from source, but both installation methods worked for me.
To install OpenCV use the following commands on the terminal.
$ sudo apt update
$ sudo apt install libopencv-dev python3-opencv
We use stb to save the images into the disk following the tutorial from librealsense here. You can find STB in their github repository. Clone their repository in your home directory with the following command.
$ git clone https://github.com/nothings/stb.git
Change line 43 in the CMakeLists.txt file to match with your directory to the STB library.