This stack includes ros2_control
drivers for Force Dimension SDK compatible haptic interfaces.
Tested with a Humble ROS distribution only (Ubuntu 22.04 LTS)
Warning
The vendor package fd_sdk_vendor is now required! Please follow the installation steps carefully.
The driver was currently tested on the following haptic devices:
Required setup : Ubuntu 22.04 LTS
- Install
ros2
packages. The current development is based ofros2 humble
. Installation steps are described here. - Source your
ros2
environment:NOTE: The ros2 environment needs to be sources in every used terminal. If only one distribution of ros2 is used, it can be added to thesource /opt/ros/humble/setup.bash
~/.bashrc
file. - Install
colcon
and its extensions :sudo apt install python3-colcon-common-extensions
- Create a new ros2 workspace:
mkdir ~/ros2_ws/src
- Pull relevant packages, install dependencies (including the vendor pkg fd_sdk_vendor):
cd ~/ros2_ws cd src git clone https://github.com/ICube-Robotics/forcedimension_ros2.git vcs import . < forcedimension_ros2/forcedimension_ros2.repos rosdep install --ignore-src --from-paths . -y -r
- Compile and source the workspace by using:
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --symlink-install source install/setup.bash
An example launch file is provided with this stack in the fd_bringup
package. The driver can be run using
ros2 launch fd_bringup fd.launch.py
The device end-effector pose can then be found in the /fd/ee_pose
and wrench can be set on the /fd_controller/commands
topic.
Note that the default launch config is for the Omega 3 device (orientation and clutch OFF).
You can test the readings using plotjuggler and the force control by requesting a (small) force along X axis:
ros2 topic pub -r 1000 \
/fd/fd_controller/commands std_msgs/msg/Float64MultiArray "data: [0.5, 0.0, 0.0]"
USB devices require su
privileges to operate unless allowed in udev rules
To declare a new device :
-
run
lsusb -v
which givesidVendor = 0x1451 Force Dimension idProduct = 0x0301
-
Create and edit udev rules file
sudo nano /etc/udev/rules.d/10-omega_3_USB.rules
and in the file write
ATTRS{idProduct}=="[PRODUCT_ID]", ATTRS{idVendor}=="[VENDOR ID]", MODE="666", GROUP="plugdev"
Note:
[PRODUCT_ID]
isidProduct
without0x
, same for[VENDOR ID]
-
To apply the new rule run
sudo udevadm trigger
-
You can try your setup by running the
HapticDesk
executable from the sdkfd_hardware/external/sdk-3.14.0/bin
folder. If the haptic device is recognized, you are ready to go.
ICube Laboratory, University of Strasbourg, France
Maciej Bednarczyk: m.bednarczyk@unistra.fr, @github: mcbed