Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Gripper commands examples

Add-on devices such as robot grippers often require software extensions, called URCaps, to be installed on the robot controller. URCaps typically provide custom instructions which are not part of standard URScript. Plugins of the extension type are used so that custom instructions can be called by ur_ros_rtde.

OnRobot soft gripper

In this package are provided implementation examples of commands that can be used to interact with an OnRobot soft gripper. To control the gripper it is mandatory to:

  1. Install and configure the OnRobot SG

  2. Install the OnRobot URCap using the robot teach pendant.

  3. Clone ur_rtde and apply one of the patches provided in ur_ros_rtde/config. Then install the package.
    Two patches are available, each identified by a commit hash. They are functionally equivalent but differ slightly to match different versions of the ur_rtde repository.
    Patches for newer versions can be easily derived from the existing ones.

    # optional: remove ur_rtde binaries if installed with apt
    sudo apt remove --purge librtde librtde-dev
    
    # clone ur_rtde
    cd <desired_path>
    git clone https://gitlab.com/sdurobotics/ur_rtde.git
    cd ur_rtde
    git submodule update --init --recursive
    
    # apply the patch
    git apply <path>.patch
    
    # install ur_rtde
    mkdir build
    cd build
    cmake ..
    make 
    sudo make install
  4. Compile ur_ros_rtde_gripper_commands package.

    cd <ros_workspace_path>
    colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to ur_ros_rtde_gripper_commands
  5. Remove the plugins implemented in this package from the blacklist in the example launch file.

If everything was set up as indicated above, the CommandServer will be able to discover and load the plugins related to OnRobot commands.
Each command, as done for the other plugins, will be exposed as an action server.
The command server can be launched and commands can be requested to the robot as shown in the tutorials.

Example: control the SG gripper by setting its width using sg_grip:

# Run in a new terminal
ros2 action send_goal /ur_ros_rtde/sg_grip_command ur_ros_rtde_gripper_commands/action/SgGrip "{target_width: 30}"