Node for using the Geomagic Touch X connected via ethernet with the Robot Operating System 2 (ROS 2).
Currently tested and working with ROS 2 Foxy (Ubuntu 20.04
).
Note
Please install the device drivers, see e.g. install-3ds-touch-drivers-2022.sh and the SDK, see e.g. install-3ds-openhaptics-3.4.sh.
- Clone this driver into your workspace, install dependencies, and build:
git clone https://github.com/RViMLab/geomagic_touch_x_ros2.git src/geomagic_touch_x_ros2
rosdep install --from-paths src -r -i -y
colcon build --symlink-install
- Plug in the device to your computer via Ethernet.
- Setup a new connection:
- Name: Haptic TouchX
- IPv4 Method: "Link-Local Only"
- IPv6 Method: "Link-Local Only"
Run this each time you use the device.
- Plug in the device to your computer via Ethernet.
- Ensure the correct wired connection is selected.
ros2 launch geomagic_touch_x setup.launch.py
- Click "Rescan for Devices", this should ensure we can find the device.
- Click "Pairing", and just after click the pairing button on the device.
- The device should successfully pair.
- Click "Apply" and then "Ok".
If this doesn't work, then see the official documentation provided with your device.
Run this each time you use the device after the device has been paired (see previous section).
ros2 launch geomagic_touch_x calibrate.launch.py
- Click the "Select" tab.
- Then click the next button (right arrow) at the bottom of the dialog box.
- Move the stylus in each axis (X, Y, Z) to properly calibrate the device.
- Once each axis is calibrated, its icon will turn green.
- Step through each other test, and then once each is complete, click the cross to exit the diagonostic setup.
If this doesn't work, then see the official documentation provided with your device.
This is the main ROS 2 component you need to launch to set/get the state of the haptic device.
update_rate
(int): rate to run driver at in Hzframe_id
(string): frame ID for published stamped twistchild_frame_id
(string): child frame ID for published stamped twistdevice_name
(string): the name of the device, this can be set during pairing (see above)
~/command/wrench
(geometry_msgs/Wrench
): the force that should be commanded at the device end-effector. Note, only the linear part is used for the Touch X device.
~/twist
(geometry_msgs/Twist
): the linear and angular velocity of the device end-effector.~/joint_states
(sensor_msgs/JointState
): the joint states of the device.
The transform of the device end-effector is broadcast using the tf2
library.
The base frame is touch_x_base
and the child frame is touch_x_ee
.