Skip to content

Latest commit

 

History

History
105 lines (87 loc) · 4.35 KB

README.md

File metadata and controls

105 lines (87 loc) · 4.35 KB

forcedimension_ros2

This stack includes ros2_control drivers for Force Dimension SDK compatible haptic interfaces.

Tested with Jazzy and Humble ROS distributions only

Licence CI (humble) CI (jazzy) CI (rolling)

Warning

The vendor package fd_sdk_vendor is now required! Please follow the installation steps carefully.

Note

Although still online, the foxy and galactic branches are not maintained anymore and might be obsolete.

Compatible devices

The driver was currently tested on the following haptic devices:

Usage

Getting Started

Required setup : Ubuntu 24.04 LTS

  1. Install ros2 packages. The current development is based of ros2 jazzy. Installation steps are described here.
  2. Source your ros2 environment:
    source /opt/ros/jazzy/setup.bash
    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 the ~/.bashrc file.
  3. Install colcon and its extensions :
    sudo apt install python3-colcon-common-extensions
  4. Create a new ros2 workspace:
    mkdir ~/ros2_ws/src
  5. 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
  6. Compile and source the workspace by using:
    colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --symlink-install
    source install/setup.bash

Running the driver

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]"

Practical information

Initialize usb device

USB devices require su privileges to operate unless allowed in udev rules

To declare a new device :

  1. run lsusb -v which gives

    idVendor = 0x1451 Force Dimension
    idProduct = 0x0301
  2. 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] is idProduct without 0x, same for [VENDOR ID]

  3. To apply the new rule run

    sudo udevadm trigger
  4. You can try your setup by running the HapticDesk executable from the sdk fd_hardware/external/sdk-3.14.0/bin folder. If the haptic device is recognized, you are ready to go.

Contacts

icube

ICube Laboratory, University of Strasbourg, France

Maciej Bednarczyk: m.bednarczyk@unistra.fr, @github: mcbed