├── .gitignore ├── .travis.yml ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── robotiq ├── CMakeLists.txt └── package.xml ├── robotiq_2f_140_gripper_gazebo ├── CMakeLists.txt ├── config │ └── robotiq_2f_140_gripper_controllers.yaml ├── launch │ ├── inc │ │ ├── load_robotiq_2f_140_gripper.launch │ │ └── robotiq_2f_140_gripper_control.launch │ └── robotiq_2f_140_bringup.launch ├── package.xml └── urdf │ ├── robotiq_arg2f_140.xacro │ └── robotiq_arg2f_140_macro.xacro ├── robotiq_2f_140_gripper_visualization ├── CMakeLists.txt ├── README.md ├── launch │ ├── load_robotiq_2f_140.launch │ └── view_robotiq_2f_140.launch ├── meshes │ ├── collision │ │ ├── robotiq_arg2f_140_inner_finger.stl │ │ ├── robotiq_arg2f_140_inner_knuckle.stl │ │ ├── robotiq_arg2f_140_outer_finger.stl │ │ ├── robotiq_arg2f_140_outer_knuckle.stl │ │ ├── robotiq_arg2f_base_link.stl │ │ └── robotiq_arg2f_coupling.stl │ └── visual │ │ ├── robotiq_arg2f_140_inner_finger.stl │ │ ├── robotiq_arg2f_140_inner_knuckle.stl │ │ ├── robotiq_arg2f_140_outer_finger.stl │ │ ├── robotiq_arg2f_140_outer_knuckle.stl │ │ ├── robotiq_arg2f_base_link.stl │ │ └── robotiq_arg2f_coupling.stl ├── package.xml ├── urdf │ ├── inc │ │ └── robotiq_arg2f_140_transmissions.xacro │ ├── robotiq_arg2f_140.xacro │ └── robotiq_arg2f_140_macro.xacro └── visualize.rviz ├── robotiq_2f_85_gripper_gazebo ├── CMakeLists.txt ├── config │ └── robotiq_2f_85_gripper_controllers.yaml ├── launch │ ├── inc │ │ ├── load_robotiq_2f_85_gripper.launch │ │ └── robotiq_2f_85_gripper_control.launch │ └── robotiq_2f_85_bringup.launch ├── package.xml └── urdf │ ├── robotiq_arg2f_85.xacro │ └── robotiq_arg2f_85_macro.xacro ├── robotiq_2f_85_gripper_visualization ├── CMakeLists.txt ├── README.md ├── launch │ ├── load_robotiq_2f_85.launch │ └── view_robotiq_2f_85.launch ├── meshes │ ├── collision │ │ ├── robotiq_arg2f_85_base_link.stl │ │ ├── robotiq_arg2f_85_inner_finger.dae │ │ ├── robotiq_arg2f_85_inner_knuckle.dae │ │ ├── robotiq_arg2f_85_outer_finger.dae │ │ ├── robotiq_arg2f_85_outer_knuckle.dae │ │ └── robotiq_arg2f_base_link.stl │ └── visual │ │ ├── robotiq_arg2f_85_base_link.dae │ │ ├── robotiq_arg2f_85_inner_finger.dae │ │ ├── robotiq_arg2f_85_inner_knuckle.dae │ │ ├── robotiq_arg2f_85_outer_finger.dae │ │ ├── robotiq_arg2f_85_outer_knuckle.dae │ │ ├── robotiq_arg2f_85_pad.dae │ │ ├── robotiq_arg2f_base_link.stl │ │ └── robotiq_gripper_coupling.stl ├── package.xml ├── urdf │ ├── inc │ │ └── robotiq_arg2f_85_transmissions.xacro │ ├── robotiq_arg2f_85.xacro │ └── robotiq_arg2f_85_macro.xacro └── visualize.rviz ├── robotiq_2f_c2_gripper_visualization ├── CMakeLists.txt ├── launch │ └── test_robotiq_c2_model.launch ├── meshes │ └── robotiq_c2 │ │ ├── collision │ │ ├── robotiq_85_gripper_adapter_plate.dae │ │ ├── robotiq_85_gripper_base.dae │ │ ├── robotiq_85_gripper_joint_0_L.dae │ │ ├── robotiq_85_gripper_joint_0_R.dae │ │ ├── robotiq_85_gripper_joint_1_L.dae │ │ ├── robotiq_85_gripper_joint_1_R.dae │ │ ├── robotiq_85_gripper_joint_2_L.dae │ │ ├── robotiq_85_gripper_joint_2_R.dae │ │ ├── robotiq_85_gripper_joint_3_L.dae │ │ └── robotiq_85_gripper_joint_3_R.dae │ │ └── visual │ │ ├── adapter_plate.dae │ │ ├── robotiq_85_gripper_adapter_plate.dae │ │ ├── robotiq_85_gripper_base.dae │ │ ├── robotiq_85_gripper_joint_0_L.dae │ │ ├── robotiq_85_gripper_joint_0_R.dae │ │ ├── robotiq_85_gripper_joint_1_L.dae │ │ ├── robotiq_85_gripper_joint_1_R.dae │ │ ├── robotiq_85_gripper_joint_2_L.dae │ │ ├── robotiq_85_gripper_joint_2_R.dae │ │ ├── robotiq_85_gripper_joint_3_L.dae │ │ └── robotiq_85_gripper_joint_3_R.dae ├── package.xml ├── urdf │ ├── robotiq_c2_model.urdf │ ├── robotiq_c2_model.xacro │ └── robotiq_c2_model_macro.xacro └── visualize.rviz ├── robotiq_2f_gripper_action_server ├── CMakeLists.txt ├── include │ └── robotiq_2f_gripper_action_server │ │ └── robotiq_2f_gripper_action_server.h ├── launch │ └── robotiq_2f_gripper_action_server.launch ├── package.xml └── src │ ├── robotiq_2f_gripper_action_server.cpp │ ├── robotiq_2f_gripper_action_server_client_test.cpp │ └── robotiq_2f_gripper_action_server_node.cpp ├── robotiq_2f_gripper_control ├── CMakeLists.txt ├── include │ └── robotiq_2f_gripper_control │ │ └── robotiq_2f_gripper_ethercat_client.h ├── launch │ └── robotiq_2f_gripper_ethercat.launch ├── mainpage.dox ├── msg │ ├── Robotiq2FGripper_robot_input.msg │ └── Robotiq2FGripper_robot_output.msg ├── nodes │ ├── Robotiq2FGripperRtuNode.py │ ├── Robotiq2FGripperSimpleController.py │ ├── Robotiq2FGripperStatusListener.py │ └── Robotiq2FGripperTcpNode.py ├── package.xml ├── setup.py └── src │ └── robotiq_2f_gripper_control │ ├── __init__.py │ ├── baseRobotiq2FGripper.py │ ├── robotiq_2f_gripper_ctrl.py │ ├── robotiq_2f_gripper_ethercat_client.cpp │ └── robotiq_2f_gripper_ethercat_node.cpp ├── robotiq_3f_gripper_articulated_gazebo ├── CMakeLists.txt ├── launch │ └── robotiq_gripper_empty_world.launch └── package.xml ├── robotiq_3f_gripper_articulated_gazebo_plugins ├── CMakeLists.txt ├── include │ └── robotiq_3f_gripper_articulated_gazebo_plugins │ │ └── RobotiqHandPlugin.h ├── package.xml └── src │ └── RobotiqHandPlugin.cpp ├── robotiq_3f_gripper_articulated_msgs ├── CMakeLists.txt ├── msg │ ├── Robotiq3FGripperRobotInput.msg │ └── Robotiq3FGripperRobotOutput.msg └── package.xml ├── robotiq_3f_gripper_control ├── CMakeLists.txt ├── cfg │ └── Robotiq3FGripper.cfg ├── include │ └── robotiq_3f_gripper_control │ │ ├── robotiq_3f_gripper_api.h │ │ ├── robotiq_3f_gripper_can_client.h │ │ ├── robotiq_3f_gripper_client_base.h │ │ ├── robotiq_3f_gripper_diagnostics.h │ │ ├── robotiq_3f_gripper_ethercat_client.h │ │ ├── robotiq_3f_gripper_hw_interface.h │ │ └── robotiq_3f_gripper_ros.h ├── launch │ ├── robotiq_3f_gripper_can.launch │ └── robotiq_3f_gripper_ethercat.launch ├── mainpage.dox ├── nodes │ ├── Robotiq3FGripperSimpleController.py │ ├── Robotiq3FGripperStatusListener.py │ └── Robotiq3FGripperTcpNode.py ├── package.xml ├── setup.py └── src │ ├── robotiq_3f_gripper_can_node.cpp │ ├── robotiq_3f_gripper_control │ ├── __init__.py │ ├── baseRobotiq3FGripper.py │ ├── robotiq_3f_gripper_api.cpp │ ├── robotiq_3f_gripper_can_client.cpp │ ├── robotiq_3f_gripper_diagnostics.cpp │ ├── robotiq_3f_gripper_ethercat_client.cpp │ ├── robotiq_3f_gripper_hw_interface.cpp │ └── robotiq_3f_gripper_ros.cpp │ └── robotiq_3f_gripper_ethercat_node.cpp ├── robotiq_3f_gripper_joint_state_publisher ├── CMakeLists.txt ├── README.md ├── package.xml └── src │ └── robotiq_3f_gripper_joint_states.cpp ├── robotiq_3f_gripper_visualization ├── CMakeLists.txt ├── cfg │ ├── robotiq-3f-gripper_articulated.urdf │ ├── robotiq-3f-gripper_articulated.xacro │ ├── robotiq-3f-gripper_articulated_macro.xacro │ ├── robotiq-3f-gripper_finger_articulated_macro.xacro │ ├── robotiq-3f-gripper_mesh.urdf │ ├── robotiq-3f-gripper_mesh.xacro │ ├── robotiq-3f-gripper_mesh.xml │ ├── robotiq-3f-gripper_mesh_macro.xacro │ └── robotiq_hand_macro.urdf.xacro ├── launch │ └── robotiq_gripper_upload.launch ├── mainpage.dox ├── meshes │ ├── robotiq-3f-gripper │ │ ├── collision │ │ │ ├── GRIPPER_CLOSED.stl │ │ │ ├── GRIPPER_OPEN.stl │ │ │ ├── GRIPPER_OPEN_FINGER_1.stl │ │ │ ├── GRIPPER_OPEN_FINGER_2.stl │ │ │ ├── GRIPPER_OPEN_FINGER_3.stl │ │ │ └── GRIPPER_OPEN_PALM.stl │ │ └── visual │ │ │ ├── GRIPPER_CLOSED.stl │ │ │ ├── GRIPPER_OPEN.stl │ │ │ ├── GRIPPER_OPEN_FINGER_1.stl │ │ │ ├── GRIPPER_OPEN_FINGER_2.stl │ │ │ ├── GRIPPER_OPEN_FINGER_3.stl │ │ │ └── GRIPPER_OPEN_PALM.stl │ └── robotiq-3f-gripper_articulated │ │ ├── collision │ │ ├── link_0.STL │ │ ├── link_1.STL │ │ ├── link_2.STL │ │ ├── link_3.STL │ │ └── palm.STL │ │ └── visual │ │ ├── link_0.dae │ │ ├── link_1.dae │ │ ├── link_2.dae │ │ ├── link_3.dae │ │ └── palm.dae └── package.xml ├── robotiq_3f_rviz ├── CMakeLists.txt ├── icons │ └── classes │ │ └── Robotiq3FingerPanel.png ├── package.xml ├── plugin_description.xml └── src │ ├── panel.ui │ └── robotiq_3f_rviz.cpp ├── robotiq_ethercat ├── CMakeLists.txt ├── README.md ├── include │ └── robotiq_ethercat │ │ └── ethercat_manager.h ├── package.xml └── src │ └── ethercat_manager.cpp ├── robotiq_ft_sensor ├── CMakeLists.txt ├── include │ └── robotiq_ft_sensor │ │ ├── rq_int.h │ │ ├── rq_sensor_com.h │ │ └── rq_sensor_state.h ├── launch │ ├── rviz_sesion.rviz │ └── visualize_ft300.launch ├── meshes │ ├── collision │ │ ├── mountings │ │ │ └── robotiq_ft300-G-062-COUPLING_G-50-4M6-1D6_20181119.STL │ │ ├── robotiq_ft300.STL │ │ └── robotiq_fts150.stl │ └── visual │ │ ├── mountings │ │ └── robotiq_ft300-G-062-COUPLING_G-50-4M6-1D6_20181119.STL │ │ ├── robotiq_ft300.STL │ │ └── robotiq_fts150.stl ├── msg │ └── ft_sensor.msg ├── nodes │ ├── rq_sensor.cpp │ └── rq_test_sensor.cpp ├── package.xml ├── src │ ├── rq_sensor_com.cpp │ └── rq_sensor_state.cpp ├── srv │ └── sensor_accessor.srv └── urdf │ ├── examples_of_macros │ └── example_use_robotiq_ft300.xacro │ ├── robotiq_ft300.urdf.xacro │ └── robotiq_fts150.urdf.xacro ├── robotiq_modbus_rtu ├── CMakeLists.txt ├── mainpage.dox ├── package.xml ├── setup.py └── src │ └── robotiq_modbus_rtu │ ├── __init__.py │ └── comModbusRtu.py └── robotiq_modbus_tcp ├── CMakeLists.txt ├── mainpage.dox ├── package.xml ├── setup.py └── src └── robotiq_modbus_tcp ├── __init__.py └── comModbusTcp.py /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.py[cod] 3 | 4 | # C extensions 5 | *.so 6 | 7 | # Packages 8 | *.egg 9 | *.egg-info 10 | dist 11 | build 12 | eggs 13 | parts 14 | bin 15 | var 16 | sdist 17 | develop-eggs 18 | .installed.cfg 19 | lib 20 | lib64 21 | __pycache__ 22 | 23 | # Installer logs 24 | pip-log.txt 25 | 26 | # Unit test / coverage reports 27 | .coverage 28 | .tox 29 | nosetests.xml 30 | 31 | # Translations 32 | *.mo 33 | 34 | # Mr Developer 35 | .mr.developer.cfg 36 | .project 37 | .pydevproject 38 | *.autosave 39 | 40 | CATKIN_IGNORE 41 | *.user 42 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | dist: xenial 3 | language: generic 4 | compiler: 5 | - gcc 6 | notifications: 7 | email: 8 | on_success: never 9 | on_failure: never 10 | env: 11 | global: 12 | - ROS_DISTRO=kinetic 13 | matrix: 14 | - ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu 15 | - ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu 16 | - ROS_DISTRO="kinetic" PRERELEASE=true 17 | - ROS_DISTRO="melodic" PRERELEASE=true 18 | matrix: 19 | allow_failures: 20 | - env: ROS_DISTRO="kinetic" PRERELEASE=true 21 | - env: ROS_DISTRO="melodic" PRERELEASE=true 22 | install: 23 | - git clone https://github.com/ros-industrial/industrial_ci.git .ci_config 24 | script: 25 | - source .ci_config/travis.sh 26 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ROS-Industrial is a community project. We welcome contributions from any source, from those who are extremely active to casual users. The following sections outline the steps on how to contribute to ROS-Industrial. It assumes there is an existing repository to which one would like to contribute (item 1 in the figure above) and one is familiar with the Git "Fork and Branch" workflow, detailed [here](http://blog.scottlowe.org/2015/01/27/using-fork-branch-git-workflow/). 2 | 3 | 1. Before any development is undertaken, a contributor would communicate a need and/or issue to the ROS-Industrial community. This can be done by submitting an issue on the appropriate GitHub repo, the [issues repo](https://github.com/ros-industrial/ros_industrial_issues), or by posting a message in the [ROS-Industrial category on ROS Discourse](//swri-ros-pkg-dev@googlegroups.com). . Doing so may save you time if similar development is underway and ensure that whatever approach you take is acceptable to the community of reviewers once it is submitted. 4 | 2. The second step (item 2) is to implement your change. If you are working on a code contribution, we highly recommend you utilize the [ROS Qt-Creator Plug-in](http://rosindustrial.org/news/2016/6/9/ros-qt-ide-plugin). Verify that your change successfully builds and passes all tests. 5 | 3. Next, push your changes to a "feature" branch in your personal fork of the repo and issue a pull request (PR)(item 3). The PR allows maintainers to review the submitted code. Before the PR can be accepted, the maintainer and contributor must agree that the contribution is implemented appropriately. This process can take several back-and-forth steps (see [example](https://github.com/ros-industrial/motoman/pull/89)). Contributors should expect to spend as much time reviewing/changing the code as on the initial implementation. This time can be minimized by communicating with the ROS-Industrial community before any contribution is made. 6 | 4. Issuing a Pull Request (PR) triggers the [Travis Continuous Integrations (CI)](https://github.com/ros-industrial/industrial_ci) step (item 4) which happens automatically in the background. The Travis CI performs several operations, and if any of the steps below fail, then the PR is marked accordingly for the maintainer. 7 | * Travis Workflow: 8 | * Installs a barebones ROS distribution on a fresh Ubuntu virtual machine. 9 | * Creates a catkin workspace and puts the repository in it. 10 | * Uses wstool to check out any from-source dependencies (i.e. other repositories). 11 | * Resolves package dependencies using rosdep (i.e. install packages using apt-get). 12 | * Compiles the catkin workspace. 13 | * Runs all available unit tests. 14 | 5. If the PR passes Travis CI and one of the maintainers is satisfied with the changes, they post a +1 as a comment on the PR (item 5). The +1 signifies that the PR is ready to be merged. All PRs require at least one +1 and pass Travis CI before it can be merged. 15 | 6. The next step (item 6) is for the PR to be merged into the main branch. This is done through the GitHub web interface by selecting the “Merge pull request” button. After the PR is merged, all status badges are updated automatically. 16 | 7. Periodically, the maintainer will release the package (item 7), which then gets sent to the [ROS Build Farm](http://wiki.ros.org/build.ros.org) for Debian creation. 17 | 8. The publishing of the released packages (item 8) is managed by OSRF and is not on a set schedule. This usually happens when all packages for a given distro are built successfully and stable. The current status for the distro kinetic can be found [here](http://repositories.ros.org/status_page/ros_kinetic_default.html) . Navigating to other distros can be done by changing the distro name in the link. 18 | 9. Once the package has been published, it is available to be installed by the developer (item 9). 19 | 10. After the install of a new version, the developer may have questions, experience issues or it may not have the necessary functionality which should all be reported on the packages GitHub repository as an issue (item 10). If an issue is identified or there is missing functionality that the developer requires, the cycle starts back at (item 2). 20 | 21 | For more details, please refer to the [ROS-I wiki](http://wiki.ros.org/Industrial/DevProcess). 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013, ROS-Industrial 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | Redistributions in binary form must reproduce the above copyright notice, this 11 | list of conditions and the following disclaimer in the documentation and/or 12 | other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Robotiq 2 | 3 | ## Status 4 | 5 | As of 2021-05-28, it would appear this repository is ***unmaintained***. 6 | 7 | Robotiq is not maintaining the packages in this repository and the last active maintainer ([jproberge](https://github.com/jproberge)) does not appear to be active any more. 8 | 9 | The ROS-Industrial consortia are not involved: for historical reasons, the `robotiq` repository is hosted on the `ros-industrial` Github organisation, but there is no direct link with any of the other repositories there. 10 | 11 | Please direct support requests to [dof.robotiq.com](https://dof.robotiq.com/). The tracker here is not monitored by Robotiq employees. 12 | 13 | 14 | ## ROS Distro Support 15 | 16 | | | Indigo | Jade | Kinetic | Melodic | 17 | |:-------:|:------:|:----:|:-------:|:-------:| 18 | | Branch | [`indigo-devel`](https://github.com/ros-industrial/robotiq/tree/indigo-devel) | [`jade-devel`](https://github.com/ros-industrial/robotiq/tree/jade-devel) | [`kinetic-devel`](https://github.com/ros-industrial/robotiq/tree/kinetic-devel) | [`kinetic-devel`](https://github.com/ros-industrial/robotiq/tree/kinetic-devel) |) 19 | | Status | supported | not supported | supported | supported | 20 | | Version | [version](http://repositories.ros.org/status_page/ros_indigo_default.html?q=robotiq) | [version](http://repositories.ros.org/status_page/ros_jade_default.html?q=robotiq) | [version](http://repositories.ros.org/status_page/ros_kinetic_default.html?q=robotiq) | [version](http://repositories.ros.org/status_page/ros_melodic_default.html?q=robotiq) | 21 | 22 | ## Travis - Continuous Integration 23 | 24 | Status: [![Build Status](https://travis-ci.com/ros-industrial/robotiq.svg?branch=kinetic-devel)](https://travis-ci.com/ros-industrial/robotiq) 25 | 26 | ## ROS Buildfarm 27 | 28 | There are no up-to-date releases of these packages available from the ROS buildfarm. 29 | 30 | [![support level: community](https://img.shields.io/badge/support%20level-community-lightgray.svg)](http://rosindustrial.org/news/2016/10/7/better-supporting-a-growing-ros-industrial-software-platform) 31 | 32 | Robotiq meta-package. See the [ROS wiki][] page for more information. 33 | 34 | ## License 35 | 36 | [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) 37 | [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) 38 | 39 | ## Contents 40 | 41 | This repo holds source code for all versions > groovy. For those versions <= groovy see: [SVN repo][] 42 | 43 | [ROS wiki]: http://ros.org/wiki/robotiq 44 | [SVN repo]: https://code.google.com/p/swri-ros-pkg/source/browse 45 | 46 | -------------------------------------------------------------------------------- /robotiq/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(robotiq) 3 | find_package(catkin REQUIRED) 4 | catkin_metapackage() 5 | -------------------------------------------------------------------------------- /robotiq/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | robotiq 4 | 1.0.0 5 | ROS drivers for Robotiq Adaptive Grippers and Robotiq Force Torque Sensor 6 | Jean-Philippe Roberge 7 | BSD 8 | http://ros.org/wiki/robotiq 9 | 10 | catkin 11 | robotiq_3f_gripper_visualization 12 | robotiq_modbus_tcp 13 | robotiq_3f_gripper_control 14 | robotiq_2f_gripper_control 15 | robotiq_ft_sensor 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_gazebo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(robotiq_2f_140_gripper_gazebo) 3 | find_package(catkin REQUIRED) 4 | catkin_package() 5 | 6 | install(DIRECTORY config launch urdf 7 | DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) 8 | -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_gazebo/config/robotiq_2f_140_gripper_controllers.yaml: -------------------------------------------------------------------------------- 1 | joint_state_controller: 2 | type: joint_state_controller/JointStateController 3 | publish_rate: &loop_hz 125 4 | 5 | gripper_controller: 6 | type: effort_controllers/GripperActionController 7 | gains: 8 | finger_joint: {p: 10, d: 0.1, i: 1, i_clamp: 1} 9 | joint: finger_joint 10 | action_monitor_rate: 20 11 | goal_tolerance: 0.002 12 | max_effort: 100 13 | stall_velocity_threshold: 0.001 14 | stall_timeout: 1.0 -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_gazebo/launch/inc/load_robotiq_2f_140_gripper.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_gazebo/launch/inc/robotiq_2f_140_gripper_control.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 49 | 50 | 51 | 53 | 54 | -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_gazebo/launch/robotiq_2f_140_bringup.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_gazebo/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | robotiq_2f_140_gripper_gazebo 4 | 1.0.0 5 | 6 | Gazebo wrapper for Robotiq ARG 2-Finger 140mm model C3. 7 | 8 | Matteo Lucchi 9 | Matteo Lucchi 10 | BSD 11 | catkin 12 | roslaunch 13 | controller_manager 14 | effort_controllers 15 | position_controllers 16 | gazebo_ros 17 | gazebo_ros_control 18 | joint_state_controller 19 | robot_state_publisher 20 | gripper_action_controller 21 | robotiq_2f_140_gripper_visualization 22 | roboticsgroup_upatras_gazebo_plugins 23 | 24 | -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_gazebo/urdf/robotiq_arg2f_140.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 44 | 45 | 46 | 49 | 50 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_gazebo/urdf/robotiq_arg2f_140_macro.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 24 | 25 | 32 | 33 | 34 | 35 | 36 | 39 | 40 | 41 | 42 | 43 | ${prefix}finger_joint 44 | ${prefix}left_inner_knuckle_joint 45 | -1.0 46 | 47 | 48 | ${prefix}finger_joint 49 | ${prefix}left_inner_finger_joint 50 | 1.0 51 | 52 | 53 | ${prefix}finger_joint 54 | ${prefix}right_inner_knuckle_joint 55 | -1.0 56 | 57 | 58 | ${prefix}finger_joint 59 | ${prefix}right_inner_finger_joint 60 | 1.0 61 | 62 | 63 | ${prefix}finger_joint 64 | ${prefix}right_finger_joint 65 | -1.0 66 | 67 | 68 | 69 | 70 | 71 | Gazebo/Black 72 | 73 | 74 | Gazebo/Grey 75 | 76 | 77 | Gazebo/Black 78 | 79 | 80 | Gazebo/Grey 81 | 82 | 83 | Gazebo/Black 84 | 85 | 86 | Gazebo/Grey 87 | 88 | 89 | Gazebo/Black 90 | 91 | 92 | Gazebo/Grey 93 | 94 | 95 | Gazebo/Black 96 | 97 | 98 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_visualization/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(robotiq_2f_140_gripper_visualization) 3 | find_package(catkin REQUIRED) 4 | catkin_package() 5 | 6 | install(DIRECTORY meshes DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) 7 | install(DIRECTORY urdf DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) 8 | -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_visualization/README.md: -------------------------------------------------------------------------------- 1 | # Robotiq 140mm 2-Finger-Adaptive-Gripper 2 | 3 | This package contains the URDF files describing the 140mm stroke gripper from robotiq, also known as series **C3**. 4 | 5 | To test the gripper URDF description type 6 | 7 | ``` 8 | roslaunch robotiq_2f_140_gripper_visualization view_robotiq_2f_140.launch 9 | ``` 10 | ## Robot Visual 11 | ![140](https://user-images.githubusercontent.com/8356912/49428409-463f8580-f7a6-11e8-8278-5246acdc5c14.png) 12 | 13 | ## Robot Collision 14 | ![1402](https://user-images.githubusercontent.com/8356912/49428407-463f8580-f7a6-11e8-9c4e-df69e478f107.png) 15 | -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_visualization/launch/load_robotiq_2f_140.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_visualization/launch/view_robotiq_2f_140.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_visualization/meshes/collision/robotiq_arg2f_140_inner_finger.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_2f_140_gripper_visualization/meshes/collision/robotiq_arg2f_140_inner_finger.stl -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_visualization/meshes/collision/robotiq_arg2f_140_inner_knuckle.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_2f_140_gripper_visualization/meshes/collision/robotiq_arg2f_140_inner_knuckle.stl -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_visualization/meshes/collision/robotiq_arg2f_140_outer_finger.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_2f_140_gripper_visualization/meshes/collision/robotiq_arg2f_140_outer_finger.stl -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_visualization/meshes/collision/robotiq_arg2f_140_outer_knuckle.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_2f_140_gripper_visualization/meshes/collision/robotiq_arg2f_140_outer_knuckle.stl -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_visualization/meshes/collision/robotiq_arg2f_base_link.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_2f_140_gripper_visualization/meshes/collision/robotiq_arg2f_base_link.stl -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_visualization/meshes/collision/robotiq_arg2f_coupling.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_2f_140_gripper_visualization/meshes/collision/robotiq_arg2f_coupling.stl -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_visualization/meshes/visual/robotiq_arg2f_140_inner_finger.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_2f_140_gripper_visualization/meshes/visual/robotiq_arg2f_140_inner_finger.stl -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_visualization/meshes/visual/robotiq_arg2f_140_inner_knuckle.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_2f_140_gripper_visualization/meshes/visual/robotiq_arg2f_140_inner_knuckle.stl -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_visualization/meshes/visual/robotiq_arg2f_140_outer_finger.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_2f_140_gripper_visualization/meshes/visual/robotiq_arg2f_140_outer_finger.stl -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_visualization/meshes/visual/robotiq_arg2f_140_outer_knuckle.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_2f_140_gripper_visualization/meshes/visual/robotiq_arg2f_140_outer_knuckle.stl -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_visualization/meshes/visual/robotiq_arg2f_base_link.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_2f_140_gripper_visualization/meshes/visual/robotiq_arg2f_base_link.stl -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_visualization/meshes/visual/robotiq_arg2f_coupling.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_2f_140_gripper_visualization/meshes/visual/robotiq_arg2f_coupling.stl -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_visualization/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | robotiq_2f_140_gripper_visualization 4 | 1.0.0 5 | Robotiq ARG 2-Finger 140mm model C3 description package 6 | BSD 7 | http://ros.org/wiki/robotiq 8 | Ryan Sinnet 9 | Jean-Philippe Roberge 10 | Daniel Ordonez 11 | 12 | catkin 13 | 14 | urdf 15 | 16 | -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_visualization/urdf/inc/robotiq_arg2f_140_transmissions.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | transmission_interface/SimpleTransmission 6 | 7 | ${hw_interface} 8 | 9 | 10 | 1 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /robotiq_2f_140_gripper_visualization/urdf/robotiq_arg2f_140.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /robotiq_2f_85_gripper_gazebo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(robotiq_2f_85_gripper_gazebo) 3 | find_package(catkin REQUIRED) 4 | catkin_package() 5 | 6 | install(DIRECTORY config launch urdf 7 | DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) 8 | -------------------------------------------------------------------------------- /robotiq_2f_85_gripper_gazebo/config/robotiq_2f_85_gripper_controllers.yaml: -------------------------------------------------------------------------------- 1 | joint_state_controller: 2 | type: joint_state_controller/JointStateController 3 | publish_rate: &loop_hz 125 4 | 5 | gripper_controller: 6 | type: effort_controllers/GripperActionController 7 | gains: 8 | finger_joint: {p: 10, d: 0.1, i: 1, i_clamp: 1} 9 | joint: finger_joint 10 | action_monitor_rate: 20 11 | goal_tolerance: 0.002 12 | max_effort: 100 13 | stall_velocity_threshold: 0.001 14 | stall_timeout: 1.0 -------------------------------------------------------------------------------- /robotiq_2f_85_gripper_gazebo/launch/inc/load_robotiq_2f_85_gripper.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /robotiq_2f_85_gripper_gazebo/launch/inc/robotiq_2f_85_gripper_control.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 49 | 50 | 51 | 53 | 54 | -------------------------------------------------------------------------------- /robotiq_2f_85_gripper_gazebo/launch/robotiq_2f_85_bringup.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /robotiq_2f_85_gripper_gazebo/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | robotiq_2f_85_gripper_gazebo 4 | 1.0.0 5 | 6 | Gazebo wrapper for Robotiq ARG 2-Finger 85mm model C3. 7 | 8 | Matteo Lucchi 9 | Matteo Lucchi 10 | BSD 11 | catkin 12 | roslaunch 13 | controller_manager 14 | effort_controllers 15 | position_controllers 16 | gazebo_ros 17 | gazebo_ros_control 18 | joint_state_controller 19 | robot_state_publisher 20 | gripper_action_controller 21 | robotiq_2f_85_gripper_visualization 22 | roboticsgroup_upatras_gazebo_plugins 23 | 24 | -------------------------------------------------------------------------------- /robotiq_2f_85_gripper_gazebo/urdf/robotiq_arg2f_85.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 44 | 45 | 46 | 49 | 50 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /robotiq_2f_85_gripper_gazebo/urdf/robotiq_arg2f_85_macro.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 24 | 25 | 32 | 33 | 34 | 35 | 36 | 39 | 40 | 41 | 42 | 43 | ${prefix}finger_joint 44 | ${prefix}left_inner_knuckle_joint 45 | 1.0 46 | 47 | 48 | ${prefix}finger_joint 49 | ${prefix}left_inner_finger_joint 50 | -1.0 51 | 52 | 53 | ${prefix}finger_joint 54 | ${prefix}right_inner_knuckle_joint 55 | 1.0 56 | 57 | 58 | ${prefix}finger_joint 59 | ${prefix}right_inner_finger_joint 60 | -1.0 61 | 62 | 63 | ${prefix}finger_joint 64 | ${prefix}right_finger_joint 65 | 1.0 66 | 67 | 68 | 69 | 70 | 71 | Gazebo/Black 72 | 73 | 74 | Gazebo/Grey 75 | 76 | 77 | Gazebo/Black 78 | 79 | 80 | Gazebo/Grey 81 | 82 | 83 | Gazebo/Black 84 | 85 | 86 | Gazebo/Grey 87 | 88 | 89 | Gazebo/Black 90 | 91 | 92 | Gazebo/Grey 93 | 94 | 95 | Gazebo/Black 96 | 97 | 98 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /robotiq_2f_85_gripper_visualization/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(robotiq_2f_85_gripper_visualization) 3 | find_package(catkin REQUIRED) 4 | catkin_package() 5 | 6 | install(DIRECTORY meshes DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) 7 | install(DIRECTORY urdf DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) 8 | -------------------------------------------------------------------------------- /robotiq_2f_85_gripper_visualization/README.md: -------------------------------------------------------------------------------- 1 | # Robotiq 85mm 2-Finger-Adaptive-Gripper 2 | 3 | This package contains the URDF files describing the 85mm stroke gripper from robotiq, also known as series **C3**. 4 | 5 | To test the gripper URDF description type 6 | 7 | ``` 8 | roslaunch robotiq_2f_85_gripper_visualization view_robotiq_2f_85.launch 9 | ``` 10 | ## Robot Visual 11 | ![85](https://user-images.githubusercontent.com/8356912/49428405-45a6ef00-f7a6-11e8-822b-c6870c39d445.png) 12 | 13 | ## Robot Collision 14 | ![852](https://user-images.githubusercontent.com/8356912/49428404-450e5880-f7a6-11e8-82a8-564247ebe7fc.png) 15 | 16 | -------------------------------------------------------------------------------- /robotiq_2f_85_gripper_visualization/launch/load_robotiq_2f_85.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | -------------------------------------------------------------------------------- /robotiq_2f_85_gripper_visualization/launch/view_robotiq_2f_85.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /robotiq_2f_85_gripper_visualization/meshes/collision/robotiq_arg2f_85_base_link.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_2f_85_gripper_visualization/meshes/collision/robotiq_arg2f_85_base_link.stl -------------------------------------------------------------------------------- /robotiq_2f_85_gripper_visualization/meshes/collision/robotiq_arg2f_base_link.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_2f_85_gripper_visualization/meshes/collision/robotiq_arg2f_base_link.stl -------------------------------------------------------------------------------- /robotiq_2f_85_gripper_visualization/meshes/visual/robotiq_arg2f_85_pad.dae: -------------------------------------------------------------------------------- 1 | 2 | 3 | 2016-07-17T22:25:43.361178 4 | 2016-07-17T22:25:43.361188 5 | Z_UP 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 0.0 0.0 0.0 1.0 14 | 15 | 16 | 0.0 0.0 0.0 1.0 17 | 18 | 19 | 0.7 0.7 0.7 1.0 20 | 21 | 22 | 1 1 1 1.0 23 | 24 | 25 | 0.0 26 | 27 | 28 | 0.0 0.0 0.0 1.0 29 | 30 | 31 | 0.0 32 | 33 | 34 | 0.0 0.0 0.0 1.0 35 | 36 | 37 | 1.0 38 | 39 | 40 | 41 | 42 | 43 | 0 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 4.38531e-14 -1 -4.451336e-05 4.38531e-14 -1 -4.451336e-05 -4.38531e-14 1 4.451336e-05 -4.38531e-14 1 4.451336e-05 -1 -4.385301e-14 -2.011189e-15 -1 -4.385301e-14 -2.011189e-15 -2.009237e-15 -4.451336e-05 1 -2.009237e-15 -4.451336e-05 1 1 4.385301e-14 2.011189e-15 1 4.385301e-14 2.011189e-15 2.009237e-15 4.451336e-05 -1 2.009237e-15 4.451336e-05 -1 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -10 -23.90175 13.51442 10 -23.9033 48.51442 -10 -23.9033 48.51442 10 -23.90175 13.51442 -10 -18.90175 13.51464 -10 -18.9033 48.51464 10 -18.90175 13.51464 10 -18.9033 48.51464 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |

0 0 1 0 2 0 3 1 1 1 0 1 4 2 5 2 6 2 5 3 7 3 6 3 2 4 5 4 4 4 2 5 4 5 0 5 5 6 2 6 1 6 5 7 1 7 7 7 7 8 1 8 6 8 1 9 3 9 6 9 0 10 4 10 3 10 4 11 6 11 3 11

79 |
80 |
81 |
82 |
83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 |
105 | -------------------------------------------------------------------------------- /robotiq_2f_85_gripper_visualization/meshes/visual/robotiq_arg2f_base_link.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_2f_85_gripper_visualization/meshes/visual/robotiq_arg2f_base_link.stl -------------------------------------------------------------------------------- /robotiq_2f_85_gripper_visualization/meshes/visual/robotiq_gripper_coupling.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_2f_85_gripper_visualization/meshes/visual/robotiq_gripper_coupling.stl -------------------------------------------------------------------------------- /robotiq_2f_85_gripper_visualization/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | robotiq_2f_85_gripper_visualization 4 | 1.0.0 5 | Robotiq ARG 2-Finger 85mm model C3 description package 6 | BSD 7 | http://ros.org/wiki/robotiq 8 | Daniel Ordonez 9 | Daniel Ordonez 10 | Jean-Philippe Roberge 11 | 12 | catkin 13 | 14 | urdf 15 | 16 | -------------------------------------------------------------------------------- /robotiq_2f_85_gripper_visualization/urdf/inc/robotiq_arg2f_85_transmissions.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | transmission_interface/SimpleTransmission 6 | 7 | ${hw_interface} 8 | 9 | 10 | 1 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /robotiq_2f_85_gripper_visualization/urdf/robotiq_arg2f_85.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /robotiq_2f_c2_gripper_visualization/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(robotiq_2f_c2_gripper_visualization) 3 | 4 | find_package(catkin REQUIRED) 5 | 6 | catkin_package() 7 | 8 | install(DIRECTORY urdf DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) 9 | install(DIRECTORY meshes DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) 10 | -------------------------------------------------------------------------------- /robotiq_2f_c2_gripper_visualization/launch/test_robotiq_c2_model.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /robotiq_2f_c2_gripper_visualization/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | robotiq_2f_c2_gripper_visualization 4 | 1.0.0 5 | 6 |

7 | Package containing visual components (urdfs, meshes, etc.) for use in simulating 8 | the 2F-85 or C2 model gripper developed by Robotiq. This package was adapted 9 | from https://github.com/jhu-lcsr-forks/robotiq. 10 |

11 |
12 | 13 | Jean-Philippe Roberge 14 | Kel Guerin 15 | http://ros.org/wiki/robotiq 16 | BSD 17 | 18 | catkin 19 | xacro 20 | 21 |
22 | -------------------------------------------------------------------------------- /robotiq_2f_c2_gripper_visualization/urdf/robotiq_c2_model.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /robotiq_2f_gripper_action_server/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(robotiq_2f_gripper_action_server) 3 | 4 | find_package(catkin REQUIRED COMPONENTS 5 | actionlib 6 | actionlib_msgs 7 | control_msgs 8 | robotiq_2f_gripper_control 9 | roscpp 10 | ) 11 | 12 | catkin_package( 13 | INCLUDE_DIRS include 14 | CATKIN_DEPENDS actionlib actionlib_msgs control_msgs robotiq_2f_gripper_control roscpp 15 | ) 16 | 17 | include_directories(include) 18 | include_directories( 19 | ${catkin_INCLUDE_DIRS} 20 | ${${PROJECT_NAME}_INCLUDE_DIRS} 21 | ) 22 | 23 | # The action server 24 | add_executable(${PROJECT_NAME}_node 25 | include/${PROJECT_NAME}/${PROJECT_NAME}.h 26 | src/${PROJECT_NAME}.cpp 27 | src/${PROJECT_NAME}_node.cpp 28 | ) 29 | 30 | add_dependencies(${PROJECT_NAME}_node 31 | ${PROJECT_NAME}_generate_messages_cpp 32 | ${${PROJECT_NAME}_EXPORTED_TARGETS} 33 | ${robotiq_2f_gripper_control_EXPORTED_TARGETS}) 34 | 35 | target_link_libraries(${PROJECT_NAME}_node 36 | ${catkin_LIBRARIES} 37 | ) 38 | 39 | # The test server 40 | add_executable(${PROJECT_NAME}_client_test 41 | src/${PROJECT_NAME}_client_test.cpp 42 | ) 43 | 44 | add_dependencies(${PROJECT_NAME}_client_test 45 | ${PROJECT_NAME}_generate_messages_cpp 46 | ${robotiq_action_server_EXPORTED_TARGETS}) 47 | 48 | target_link_libraries(${PROJECT_NAME}_client_test 49 | ${catkin_LIBRARIES} 50 | ) 51 | 52 | 53 | install(TARGETS ${PROJECT_NAME}_node 54 | ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 55 | LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 56 | RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 57 | ) 58 | 59 | install(TARGETS ${PROJECT_NAME}_client_test 60 | ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 61 | LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 62 | RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 63 | ) 64 | 65 | install(DIRECTORY include/${PROJECT_NAME}/ 66 | DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} 67 | FILES_MATCHING PATTERN "*.h" 68 | ) 69 | -------------------------------------------------------------------------------- /robotiq_2f_gripper_action_server/include/robotiq_2f_gripper_action_server/robotiq_2f_gripper_action_server.h: -------------------------------------------------------------------------------- 1 | /** 2 | * ActionServer interface to the control_msgs/GripperCommand action 3 | * for a Robotiq 2F gripper 4 | */ 5 | 6 | #ifndef ROBOTIQ_2F_GRIPPER_ACTION_SERVER_H 7 | #define ROBOTIQ_2F_GRIPPER_ACTION_SERVER_H 8 | 9 | // STL 10 | #include 11 | // ROS standard 12 | #include 13 | #include 14 | #include 15 | // Repo specific includes 16 | #include 17 | #include 18 | 19 | 20 | namespace robotiq_2f_gripper_action_server 21 | { 22 | 23 | typedef robotiq_2f_gripper_control::Robotiq2FGripper_robot_input GripperInput; 24 | typedef robotiq_2f_gripper_control::Robotiq2FGripper_robot_output GripperOutput; 25 | 26 | typedef control_msgs::GripperCommandGoal GripperCommandGoal; 27 | typedef control_msgs::GripperCommandFeedback GripperCommandFeedback; 28 | typedef control_msgs::GripperCommandResult GripperCommandResult; 29 | 30 | /** 31 | * @brief Structure containing the parameters necessary to translate 32 | * GripperCommand actions to register-based commands to a 33 | * particular gripper (and vice versa). 34 | * 35 | * The min gap can be less than zero. This represents the case where the 36 | * gripper fingers close and then push forward. 37 | */ 38 | struct Robotiq2FGripperParams 39 | { 40 | double min_gap_; // meters 41 | double max_gap_; 42 | double min_effort_; // N / (Nm) 43 | double max_effort_; 44 | }; 45 | 46 | /** 47 | * @brief The Robotiq2FGripperActionServer class. Takes as arguments the name of the gripper it is to command, 48 | * and a set of parameters that define the physical characteristics of the particular gripper. 49 | * 50 | * Listens for messages on input and publishes on output. Remap these. 51 | */ 52 | class Robotiq2FGripperActionServer 53 | { 54 | public: 55 | Robotiq2FGripperActionServer(const std::string& name, const Robotiq2FGripperParams& params); 56 | 57 | // These functions are meant to be called by simple action server 58 | void goalCB(); 59 | void preemptCB(); 60 | void analysisCB(const GripperInput::ConstPtr& msg); 61 | 62 | private: 63 | void issueActivation(); 64 | 65 | ros::NodeHandle nh_; 66 | actionlib::SimpleActionServer as_; 67 | 68 | ros::Subscriber state_sub_; // Subs to grippers "input" topic 69 | ros::Publisher goal_pub_; // Pubs to grippers "output" topic 70 | 71 | GripperOutput goal_reg_state_; // Goal information in gripper-register form 72 | GripperInput current_reg_state_; // State info in gripper-register form 73 | 74 | /* Used to translate GripperCommands in engineering units 75 | * to/from register states understood by gripper itself. Different 76 | * for different models/generations of Robotiq grippers */ 77 | Robotiq2FGripperParams gripper_params_; 78 | 79 | std::string action_name_; 80 | }; 81 | 82 | } 83 | #endif 84 | -------------------------------------------------------------------------------- /robotiq_2f_gripper_action_server/launch/robotiq_2f_gripper_action_server.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /robotiq_2f_gripper_action_server/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | robotiq_2f_gripper_action_server 4 | 1.0.0 5 | 6 | 7 |

8 | This package defines protocol-agnostic action-server interfaces using the 9 | control_msgs::GripperCommand ROS interface for Robotiq grippers. Depending 10 | on your use case, you may need more fine grained control, but this is 11 | a good place to start. 12 |

13 |
14 | 15 | Jean-Philippe Roberge 16 | Jonathan Meyer 17 | BSD 18 | 19 | catkin 20 | actionlib 21 | actionlib_msgs 22 | control_msgs 23 | robotiq_2f_gripper_control 24 | roscpp 25 | 26 |
27 | -------------------------------------------------------------------------------- /robotiq_2f_gripper_action_server/src/robotiq_2f_gripper_action_server_client_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main (int argc, char **argv) 7 | { 8 | ros::init(argc, argv, "test_robotiq_2f_gripper_action_server"); 9 | 10 | ros::NodeHandle pnh("~"); 11 | 12 | std::string gripper_name; 13 | pnh.param("gripper_name", gripper_name, "gripper"); 14 | 15 | // create the action client 16 | // true causes the client to spin its own thread 17 | actionlib::SimpleActionClient ac(gripper_name, true); 18 | 19 | ROS_INFO("Waiting for action server to start."); 20 | // wait for the action server to start 21 | ac.waitForServer(); //will wait for infinite time 22 | 23 | ROS_INFO("Action server started, sending goal."); 24 | // send a goal to the action 25 | control_msgs::GripperCommandGoal goal; 26 | goal.command.position = -0.01; 27 | goal.command.max_effort = 100.0; 28 | ac.sendGoal(goal); 29 | 30 | //wait for the action to return 31 | bool finished_before_timeout = ac.waitForResult(ros::Duration(30.0)); 32 | 33 | if (finished_before_timeout) 34 | { 35 | actionlib::SimpleClientGoalState state = ac.getState(); 36 | ROS_INFO("Action finished: %s",state.toString().c_str()); 37 | } 38 | else 39 | ROS_INFO("Action did not finish before the time out."); 40 | 41 | //exit 42 | return 0; 43 | } 44 | -------------------------------------------------------------------------------- /robotiq_2f_gripper_action_server/src/robotiq_2f_gripper_action_server_node.cpp: -------------------------------------------------------------------------------- 1 | #include "robotiq_2f_gripper_action_server/robotiq_2f_gripper_action_server.h" 2 | 3 | namespace 4 | { 5 | // Defines a default for the c2 model 85 gripper 6 | robotiq_2f_gripper_action_server::Robotiq2FGripperParams c2_85_defaults() 7 | { 8 | robotiq_2f_gripper_action_server::Robotiq2FGripperParams params; 9 | params.min_gap_ = -.017; 10 | params.max_gap_ = 0.085; 11 | params.min_effort_ = 40.0; // This is a guess. Could not find data with quick search. 12 | params.max_effort_ = 100.0; 13 | 14 | return params; 15 | } 16 | } 17 | 18 | int main(int argc, char** argv) 19 | { 20 | // Can be renamed with standard ROS-node launch interface 21 | ros::init(argc, argv, "gripper_2f_gripper_action_server"); 22 | 23 | // Private Note Handle for retrieving parameter arguments to the server 24 | ros::NodeHandle private_nh("~"); 25 | 26 | std::string gripper_name; 27 | private_nh.param("gripper_name", gripper_name, "gripper"); 28 | 29 | // Fill out 2F-Gripper Params 30 | robotiq_2f_gripper_action_server::Robotiq2FGripperParams cparams = c2_85_defaults(); 31 | 32 | // Min because fingers can push forward before the mechanical stops are reached 33 | private_nh.param("min_gap", cparams.min_gap_, cparams.min_gap_); 34 | private_nh.param("max_gap", cparams.max_gap_, cparams.max_gap_); 35 | private_nh.param("min_effort", cparams.min_effort_, cparams.min_effort_); 36 | private_nh.param("max_effort", cparams.max_effort_, cparams.max_effort_); 37 | 38 | ROS_INFO("Initializing Robotiq action server for gripper: %s", gripper_name.c_str()); 39 | 40 | // The name of the gripper -> this server communicates over name/inputs and name/outputs 41 | robotiq_2f_gripper_action_server::Robotiq2FGripperActionServer gripper (gripper_name, cparams); 42 | 43 | ROS_INFO("Robotiq action-server spinning for gripper: %s", gripper_name.c_str()); 44 | ros::spin(); 45 | } 46 | -------------------------------------------------------------------------------- /robotiq_2f_gripper_control/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html 2 | cmake_minimum_required(VERSION 2.8.3) 3 | project(robotiq_2f_gripper_control) 4 | find_package(catkin REQUIRED COMPONENTS message_generation robotiq_ethercat roscpp rospy) 5 | 6 | #set the default path for built executables to the "bin" directory 7 | #set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) 8 | #set the default path for built libraries to the "lib" directory 9 | #set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) 10 | 11 | ################################### 12 | ## catkin message generation ## 13 | ################################### 14 | add_message_files( 15 | FILES 16 | Robotiq2FGripper_robot_input.msg 17 | Robotiq2FGripper_robot_output.msg 18 | ) 19 | 20 | catkin_python_setup() 21 | 22 | generate_messages() 23 | 24 | ################################### 25 | ## catkin specific configuration ## 26 | ################################### 27 | ## The catkin_package macro generates cmake config files for your package 28 | ## Declare things to be passed to dependent projects 29 | ## LIBRARIES: libraries you create in this project that dependent projects also need 30 | ## CATKIN_DEPENDS: catkin_packages dependent projects also need 31 | ## DEPENDS: system dependencies of this project that dependent projects also need 32 | catkin_package( 33 | INCLUDE_DIRS include 34 | CATKIN_DEPENDS message_runtime robotiq_ethercat roscpp rospy 35 | LIBRARIES ${robotiq_ethercat_LIBRARIES} 36 | ) 37 | 38 | include_directories( 39 | include 40 | ${catkin_INCLUDE_DIRS} 41 | ) 42 | 43 | add_executable(robotiq_2f_gripper_ethercat_node 44 | src/${PROJECT_NAME}/robotiq_2f_gripper_ethercat_client.cpp 45 | src/${PROJECT_NAME}/robotiq_2f_gripper_ethercat_node.cpp 46 | ) 47 | 48 | target_link_libraries(robotiq_2f_gripper_ethercat_node 49 | ${robotiq_ethercat_LIBRARIES} 50 | ${catkin_LIBRARIES} 51 | ) 52 | 53 | add_dependencies(robotiq_2f_gripper_ethercat_node ${PROJECT_NAME}_generate_messages_cpp) 54 | 55 | ############# 56 | ## Install ## 57 | ############# 58 | 59 | # all install targets should use catkin DESTINATION variables 60 | # See http://ros.org/doc/groovy/api/catkin/html/adv_user_guide/variables.html 61 | 62 | install(DIRECTORY include/${PROJECT_NAME}/ 63 | DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} 64 | FILES_MATCHING PATTERN "*.h" 65 | ) 66 | 67 | install( 68 | TARGETS robotiq_2f_gripper_ethercat_node 69 | ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 70 | LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 71 | RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 72 | ) 73 | 74 | install(PROGRAMS nodes/Robotiq2FGripperRtuNode.py nodes/Robotiq2FGripperSimpleController.py nodes/Robotiq2FGripperStatusListener.py nodes/Robotiq2FGripperTcpNode.py 75 | DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) 76 | 77 | install(PROGRAMS src/${PROJECT_NAME}/robotiq_2f_gripper_ctrl.py 78 | DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) 79 | -------------------------------------------------------------------------------- /robotiq_2f_gripper_control/include/robotiq_2f_gripper_control/robotiq_2f_gripper_ethercat_client.h: -------------------------------------------------------------------------------- 1 | #ifndef ROBOTIQ_2F_GRIPPER_ETHERCAT_CLIENT_H 2 | #define ROBOTIQ_2F_GRIPPER_ETHERCAT_CLIENT_H 3 | 4 | #include 5 | #include 6 | 7 | // Forward declaration of EtherCatManager 8 | namespace robotiq_ethercat 9 | { 10 | class EtherCatManager; 11 | } 12 | 13 | namespace robotiq_2f_gripper_control 14 | { 15 | 16 | /** 17 | * \brief This class provides a client for the EtherCAT manager object that 18 | * can translate robot input/output messages and translate them to 19 | * the underlying IO Map. 20 | */ 21 | 22 | class Robotiq2FGripperEtherCatClient 23 | { 24 | public: 25 | typedef robotiq_2f_gripper_control::Robotiq2FGripper_robot_output GripperOutput; 26 | typedef robotiq_2f_gripper_control::Robotiq2FGripper_robot_input GripperInput; 27 | 28 | /** 29 | * \brief Constructs a control interface to a 2F Robotiq gripper on 30 | * the given ethercat network and the given slave_no. 31 | * 32 | * @param[in] manager The interface to an EtherCAT network that the gripper 33 | * is connected to. 34 | * 35 | * @param[in] slave_no The slave number of the gripper on the EtherCAT network 36 | * (>= 1) 37 | */ 38 | Robotiq2FGripperEtherCatClient(robotiq_ethercat::EtherCatManager& manager, int slave_no); 39 | 40 | /** 41 | * \brief Write the given set of control flags to the memory of the gripper 42 | * 43 | * @param[in] output The set of output-register values to write to the gripper 44 | */ 45 | void writeOutputs(const GripperOutput& output); 46 | 47 | /** 48 | * \brief Reads set of input-register values from the gripper. 49 | * \return The gripper input registers as read from the controller IOMap 50 | */ 51 | GripperInput readInputs() const; 52 | 53 | /** 54 | * \brief Reads set of output-register values from the gripper. 55 | * \return The gripper output registers as read from the controller IOMap 56 | */ 57 | GripperOutput readOutputs() const; 58 | 59 | private: 60 | robotiq_ethercat::EtherCatManager& manager_; 61 | const int slave_no_; 62 | }; 63 | 64 | } 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /robotiq_2f_gripper_control/launch/robotiq_2f_gripper_ethercat.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /robotiq_2f_gripper_control/mainpage.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \mainpage 3 | \htmlinclude manifest.html 4 | 5 | \b robotiq_2f_gripper_control 6 | 7 | 10 | 11 | --> 12 | 13 | 14 | */ 15 | -------------------------------------------------------------------------------- /robotiq_2f_gripper_control/msg/Robotiq2FGripper_robot_input.msg: -------------------------------------------------------------------------------- 1 | uint8 gACT 2 | uint8 gGTO 3 | uint8 gSTA 4 | uint8 gOBJ 5 | uint8 gFLT 6 | uint8 gPR 7 | uint8 gPO 8 | uint8 gCU 9 | -------------------------------------------------------------------------------- /robotiq_2f_gripper_control/msg/Robotiq2FGripper_robot_output.msg: -------------------------------------------------------------------------------- 1 | uint8 rACT 2 | uint8 rGTO 3 | uint8 rATR 4 | uint8 rPR 5 | uint8 rSP 6 | uint8 rFR 7 | 8 | -------------------------------------------------------------------------------- /robotiq_2f_gripper_control/nodes/Robotiq2FGripperRtuNode.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Software License Agreement (BSD License) 4 | # 5 | # Copyright (c) 2012, Robotiq, Inc. 6 | # All rights reserved. 7 | # 8 | # Redistribution and use in source and binary forms, with or without 9 | # modification, are permitted provided that the following conditions 10 | # are met: 11 | # 12 | # * Redistributions of source code must retain the above copyright 13 | # notice, this list of conditions and the following disclaimer. 14 | # * Redistributions in binary form must reproduce the above 15 | # copyright notice, this list of conditions and the following 16 | # disclaimer in the documentation and/or other materials provided 17 | # with the distribution. 18 | # * Neither the name of Robotiq, Inc. nor the names of its 19 | # contributors may be used to endorse or promote products derived 20 | # from this software without specific prior written permission. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25 | # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26 | # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 32 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33 | # POSSIBILITY OF SUCH DAMAGE. 34 | # 35 | # Copyright (c) 2012, Robotiq, Inc. 36 | # Revision $Id$ 37 | 38 | """@package docstring 39 | ROS node for controling a Robotiq 2F gripper using the Modbus RTU protocol. 40 | 41 | The script takes as an argument the IP address of the gripper. It initializes a baseRobotiq2FGripper object and adds a comModbusTcp client to it. It then loops forever, reading the gripper status and updating its command. The gripper status is published on the 'Robotiq2FGripperRobotInput' topic using the 'Robotiq2FGripper_robot_input' msg type. The node subscribes to the 'Robotiq2FGripperRobotOutput' topic for new commands using the 'Robotiq2FGripper_robot_output' msg type. Examples are provided to control the gripper (Robotiq2FGripperSimpleController.py) and interpreting its status (Robotiq2FGripperStatusListener.py). 42 | """ 43 | 44 | import roslib; roslib.load_manifest('robotiq_2f_gripper_control') 45 | roslib.load_manifest('robotiq_modbus_rtu') 46 | import rospy 47 | import robotiq_2f_gripper_control.baseRobotiq2FGripper 48 | import robotiq_modbus_rtu.comModbusRtu 49 | import os, sys 50 | from robotiq_2f_gripper_control.msg import _Robotiq2FGripper_robot_input as inputMsg 51 | from robotiq_2f_gripper_control.msg import _Robotiq2FGripper_robot_output as outputMsg 52 | 53 | def mainLoop(device): 54 | 55 | #Gripper is a 2F with a TCP connection 56 | gripper = robotiq_2f_gripper_control.baseRobotiq2FGripper.robotiqbaseRobotiq2FGripper() 57 | gripper.client = robotiq_modbus_rtu.comModbusRtu.communication() 58 | 59 | #We connect to the address received as an argument 60 | gripper.client.connectToDevice(device) 61 | 62 | rospy.init_node('robotiq2FGripper') 63 | 64 | #The Gripper status is published on the topic named 'Robotiq2FGripperRobotInput' 65 | pub = rospy.Publisher('Robotiq2FGripperRobotInput', inputMsg.Robotiq2FGripper_robot_input) 66 | 67 | #The Gripper command is received from the topic named 'Robotiq2FGripperRobotOutput' 68 | rospy.Subscriber('Robotiq2FGripperRobotOutput', outputMsg.Robotiq2FGripper_robot_output, gripper.refreshCommand) 69 | 70 | 71 | #We loop 72 | while not rospy.is_shutdown(): 73 | 74 | #Get and publish the Gripper status 75 | status = gripper.getStatus() 76 | pub.publish(status) 77 | 78 | #Wait a little 79 | #rospy.sleep(0.05) 80 | 81 | #Send the most recent command 82 | gripper.sendCommand() 83 | 84 | #Wait a little 85 | #rospy.sleep(0.05) 86 | 87 | if __name__ == '__main__': 88 | try: 89 | mainLoop(sys.argv[1]) 90 | except rospy.ROSInterruptException: pass 91 | -------------------------------------------------------------------------------- /robotiq_2f_gripper_control/nodes/Robotiq2FGripperTcpNode.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Software License Agreement (BSD License) 4 | # 5 | # Copyright (c) 2012, Robotiq, Inc. 6 | # All rights reserved. 7 | # 8 | # Redistribution and use in source and binary forms, with or without 9 | # modification, are permitted provided that the following conditions 10 | # are met: 11 | # 12 | # * Redistributions of source code must retain the above copyright 13 | # notice, this list of conditions and the following disclaimer. 14 | # * Redistributions in binary form must reproduce the above 15 | # copyright notice, this list of conditions and the following 16 | # disclaimer in the documentation and/or other materials provided 17 | # with the distribution. 18 | # * Neither the name of Robotiq, Inc. nor the names of its 19 | # contributors may be used to endorse or promote products derived 20 | # from this software without specific prior written permission. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25 | # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26 | # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 32 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33 | # POSSIBILITY OF SUCH DAMAGE. 34 | # 35 | # Copyright (c) 2012, Robotiq, Inc. 36 | # Revision $Id$ 37 | 38 | """@package docstring 39 | ROS node for controling a Robotiq 2F gripper using the Modbus TCP protocol. 40 | 41 | The script takes as an argument the IP address of the gripper. It initializes a baseRobotiq2FGripper object and adds a comModbusTcp client to it. It then loops forever, reading the gripper status and updating its command. The gripper status is published on the 'Robotiq2FGripperRobotInput' topic using the 'Robotiq2FGripper_robot_input' msg type. The node subscribes to the 'Robotiq2FGripperRobotOutput' topic for new commands using the 'Robotiq2FGripper_robot_output' msg type. Examples are provided to control the gripper (Robotiq2FGripperSimpleController.py) and interpreting its status (Robotiq2FGripperStatusListener.py). 42 | """ 43 | 44 | import roslib; roslib.load_manifest('robotiq_2f_gripper_control') 45 | roslib.load_manifest('robotiq_modbus_tcp') 46 | import rospy 47 | import robotiq_2f_gripper_control.baseRobotiq2FGripper 48 | import robotiq_modbus_tcp.comModbusTcp 49 | import os, sys 50 | from robotiq_2f_gripper_control.msg import _Robotiq2FGripper_robot_input as inputMsg 51 | from robotiq_2f_gripper_control.msg import _Robotiq2FGripper_robot_output as outputMsg 52 | 53 | def mainLoop(address): 54 | 55 | #Gripper is a 2F with a TCP connection 56 | gripper = robotiq_2f_gripper_control.baseRobotiq2FGripper.robotiqbaseRobotiq2FGripper() 57 | gripper.client = robotiq_modbus_tcp.comModbusTcp.communication() 58 | 59 | #We connect to the address received as an argument 60 | gripper.client.connectToDevice(address) 61 | 62 | rospy.init_node('robotiq2FGripper') 63 | 64 | #The Gripper status is published on the topic named 'Robotiq2FGripperRobotInput' 65 | pub = rospy.Publisher('Robotiq2FGripperRobotInput', inputMsg.Robotiq2FGripper_robot_input) 66 | 67 | #The Gripper command is received from the topic named 'Robotiq2FGripperRobotOutput' 68 | rospy.Subscriber('Robotiq2FGripperRobotOutput', outputMsg.Robotiq2FGripper_robot_output, gripper.refreshCommand) 69 | 70 | 71 | #We loop 72 | while not rospy.is_shutdown(): 73 | 74 | #Get and publish the Gripper status 75 | status = gripper.getStatus() 76 | pub.publish(status) 77 | 78 | #Wait a little 79 | rospy.sleep(0.05) 80 | 81 | #Send the most recent command 82 | gripper.sendCommand() 83 | 84 | #Wait a little 85 | rospy.sleep(0.05) 86 | 87 | if __name__ == '__main__': 88 | try: 89 | #TODO: Add verification that the argument is an IP address 90 | mainLoop(sys.argv[1]) 91 | except rospy.ROSInterruptException: pass 92 | -------------------------------------------------------------------------------- /robotiq_2f_gripper_control/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | robotiq_2f_gripper_control 4 | 1.0.0 5 |

Package to control a 2-Finger Gripper from Robotiq inc.

6 | Jean-Philippe Roberge 7 | BSD 8 | http://ros.org/wiki/robotiq 9 | Nicolas Lauzier (Robotiq inc.) 10 | 11 | catkin 12 | 13 | rospy 14 | roscpp 15 | robotiq_ethercat 16 | 17 | message_generation 18 | 19 | message_runtime 20 | 21 |
22 | -------------------------------------------------------------------------------- /robotiq_2f_gripper_control/setup.py: -------------------------------------------------------------------------------- 1 | ## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD 2 | 3 | from distutils.core import setup 4 | from catkin_pkg.python_setup import generate_distutils_setup 5 | 6 | # fetch values from package.xml 7 | setup_args = generate_distutils_setup( 8 | packages=['robotiq_2f_gripper_control'], 9 | package_dir={'': 'src'}, 10 | requires=['rospy'] 11 | ) 12 | 13 | setup(**setup_args) 14 | -------------------------------------------------------------------------------- /robotiq_2f_gripper_control/src/robotiq_2f_gripper_control/__init__.py: -------------------------------------------------------------------------------- 1 | #autogenerated by ROS python message generators -------------------------------------------------------------------------------- /robotiq_2f_gripper_control/src/robotiq_2f_gripper_control/robotiq_2f_gripper_ethercat_client.cpp: -------------------------------------------------------------------------------- 1 | #include "robotiq_2f_gripper_control/robotiq_2f_gripper_ethercat_client.h" 2 | 3 | #include "robotiq_ethercat/ethercat_manager.h" 4 | 5 | // See Robotiq's documentation for the register mapping 6 | 7 | // An effort to keep the lines less than 100 char long 8 | namespace robotiq_2f_gripper_control 9 | { 10 | 11 | Robotiq2FGripperEtherCatClient::Robotiq2FGripperEtherCatClient(robotiq_ethercat::EtherCatManager& manager, 12 | int slave_no) 13 | : manager_(manager) 14 | , slave_no_(slave_no) 15 | {} 16 | 17 | /* 18 | See support.robotiq.com -> manual for the register output meanings 19 | */ 20 | void Robotiq2FGripperEtherCatClient::writeOutputs(const GripperOutput& output) 21 | { 22 | uint8_t map[6] = {0}; // array containing all 6 output registers 23 | 24 | // Pack the Action Request register byte 25 | map[0] = (output.rACT & 0x1) | ((output.rGTO << 0x3) & 0x8) | ((output.rATR << 0x4) & 0x10); 26 | // registers 1 & 2 reserved by Robotiq 27 | map[3] = output.rPR; 28 | map[4] = output.rSP; 29 | map[5] = output.rFR; 30 | 31 | for (unsigned i = 0; i < 6; ++i) 32 | { 33 | manager_.write(slave_no_, i, map[i]); 34 | } 35 | } 36 | 37 | Robotiq2FGripperEtherCatClient::GripperInput Robotiq2FGripperEtherCatClient::readInputs() const 38 | { 39 | uint8_t map[6]; 40 | 41 | for (unsigned i = 0; i < 6; ++i) 42 | { 43 | map[i] = manager_.readInput(slave_no_, i); 44 | } 45 | 46 | // Decode Input Registers 47 | GripperInput input; 48 | input.gACT = map[0] & 0x1; 49 | input.gGTO = (map[0] >> 0x3) & 0x1; 50 | input.gSTA = (map[0] >> 0x4) & 0x3; 51 | input.gOBJ = (map[0] >> 0x6) & 0x3; 52 | // map[1] is reserved by the protocol 53 | input.gFLT = map[2] & 0xF; 54 | input.gPR = map[3]; 55 | input.gPO = map[4]; 56 | input.gCU = map[5]; 57 | 58 | return input; 59 | } 60 | 61 | Robotiq2FGripperEtherCatClient::GripperOutput Robotiq2FGripperEtherCatClient::readOutputs() const 62 | { 63 | uint8_t map[6]; 64 | for (unsigned i = 0; i < 6; ++i) 65 | { 66 | map[i] = manager_.readOutput(slave_no_, i); 67 | } 68 | 69 | GripperOutput output; 70 | output.rACT = map[0] & 1; 71 | output.rGTO = (map[0] >> 0x3) & 0x1; 72 | output.rATR = (map[0] >> 0x4) & 0x1; 73 | output.rPR = map[3]; 74 | output.rSP = map[4]; 75 | output.rFR = map[5]; 76 | 77 | return output; 78 | } 79 | } // end of robotiq_2f_gripper_control namespace 80 | -------------------------------------------------------------------------------- /robotiq_2f_gripper_control/src/robotiq_2f_gripper_control/robotiq_2f_gripper_ethercat_node.cpp: -------------------------------------------------------------------------------- 1 | #include "ros/ros.h" 2 | 3 | #include 4 | #include 5 | 6 | #include "robotiq_2f_gripper_control/robotiq_2f_gripper_ethercat_client.h" 7 | #include 8 | #include "robotiq_ethercat/ethercat_manager.h" 9 | 10 | 11 | /* 12 | Note that this code currently works only to control ONE 2F gripper 13 | attached to ONE network interface. If you want to add more grippers 14 | to the same network, you'll need to edit the source file. 15 | */ 16 | 17 | // Note that you will likely need to run the following on your binary: 18 | // sudo setcap cap_net_raw+ep 19 | 20 | 21 | void changeCallback(robotiq_2f_gripper_control::Robotiq2FGripperEtherCatClient& client, 22 | const robotiq_2f_gripper_control::Robotiq2FGripperEtherCatClient::GripperOutput::ConstPtr& msg) 23 | { 24 | client.writeOutputs(*msg); 25 | } 26 | 27 | 28 | int main(int argc, char** argv) 29 | { 30 | using robotiq_ethercat::EtherCatManager; 31 | using robotiq_2f_gripper_control::Robotiq2FGripperEtherCatClient; 32 | 33 | typedef Robotiq2FGripperEtherCatClient::GripperOutput GripperOutput; 34 | typedef Robotiq2FGripperEtherCatClient::GripperInput GripperInput; 35 | 36 | ros::init(argc, argv, "robotiq_2f_gripper_node"); 37 | 38 | ros::NodeHandle nh ("~"); 39 | 40 | // Parameter names 41 | std::string ifname; 42 | int slave_no; 43 | bool activate; 44 | 45 | nh.param("ifname", ifname, "eth1"); 46 | nh.param("slave_number", slave_no, 1); 47 | nh.param("activate", activate, true); 48 | 49 | // Start ethercat manager 50 | EtherCatManager manager(ifname); 51 | // register client 52 | Robotiq2FGripperEtherCatClient client(manager, slave_no); 53 | 54 | // conditionally activate the gripper 55 | if (activate) 56 | { 57 | // Check to see if resetting is required? Or always reset? 58 | GripperOutput out; 59 | out.rACT = 0x1; 60 | client.writeOutputs(out); 61 | } 62 | 63 | // Sorry for the indentation, trying to keep it under 100 chars 64 | ros::Subscriber sub = 65 | nh.subscribe("output", 1, 66 | boost::bind(changeCallback, boost::ref(client), _1)); 67 | 68 | ros::Publisher pub = nh.advertise("input", 100); 69 | 70 | ros::Rate rate(10); // 10 Hz 71 | 72 | while (ros::ok()) 73 | { 74 | Robotiq2FGripperEtherCatClient::GripperInput input = client.readInputs(); 75 | pub.publish(input); 76 | ros::spinOnce(); 77 | rate.sleep(); 78 | } 79 | 80 | return 0; 81 | } 82 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_articulated_gazebo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(robotiq_3f_gripper_articulated_gazebo) 3 | 4 | find_package(catkin REQUIRED) 5 | 6 | catkin_package( 7 | ) 8 | 9 | install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) 10 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_articulated_gazebo/launch/robotiq_gripper_empty_world.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_articulated_gazebo/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | robotiq_3f_gripper_articulated_gazebo 4 | 1.0.0 5 | Launch files for spawning the Robotiq robotiq-3f-gripper articulated gripper 6 | 7 | Jean-Philippe Roberge 8 | Devon Ash 9 | 10 | BSD 11 | 12 | catkin 13 | 14 | gazebo_ros 15 | robotiq_3f_gripper_visualization 16 | 17 | 18 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_articulated_gazebo_plugins/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(robotiq_3f_gripper_articulated_gazebo_plugins) 3 | set(CMAKE_CXX_STANDARD 17) 4 | 5 | find_package(catkin REQUIRED COMPONENTS actionlib angles control_msgs gazebo_msgs gazebo_plugins gazebo_ros geometry_msgs image_transport message_generation robotiq_3f_gripper_articulated_msgs roscpp sensor_msgs std_msgs tf trajectory_msgs) 6 | 7 | find_package(gazebo REQUIRED) 8 | 9 | include_directories( 10 | include 11 | ${catkin_INCLUDE_DIRS} 12 | ${GAZEBO_INCLUDE_DIRS} 13 | ) 14 | 15 | #link_directories( 16 | # ${GAZEBO_LIBRARY_DIRS} 17 | #) 18 | 19 | catkin_package( 20 | CATKIN_DEPENDS control_msgs gazebo_msgs geometry_msgs robotiq_3f_gripper_articulated_msgs sensor_msgs std_msgs trajectory_msgs 21 | ) 22 | 23 | add_library(RobotiqHandPlugin src/RobotiqHandPlugin.cpp) 24 | set_target_properties(RobotiqHandPlugin PROPERTIES LINK_FLAGS "${ld_flags}") 25 | set_target_properties(RobotiqHandPlugin PROPERTIES COMPILE_FLAGS "${cxx_flags}") 26 | target_link_libraries(RobotiqHandPlugin ${catkin_LIBRARIES}) 27 | add_dependencies(RobotiqHandPlugin robotiq_3f_gripper_articulated_msgs_gencpp) 28 | 29 | install(TARGETS RobotiqHandPlugin DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}/${PROJECT_NAME}/plugins/) 30 | 31 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_articulated_gazebo_plugins/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | robotiq_3f_gripper_articulated_gazebo_plugins 4 | 1.0.0 5 | The Robotiq gripper gazebo plugins package. Mainly a port from drcsim, to allow real Robotiq gripper control and the plugin to have it work in Gazebo simulation. This package will provide the same interface to the gripper as one would have if they were interfacing with hardware. Porting code from software to reality should be seamless with this ROS interface now. 6 | 7 | Jean-Philippe Roberge 8 | Apache 2.0 9 | Devon Ash 10 | John Hsu 11 | 12 | catkin 13 | 14 | roscpp 15 | std_msgs 16 | sensor_msgs 17 | geometry_msgs 18 | trajectory_msgs 19 | control_msgs 20 | image_transport 21 | tf 22 | actionlib 23 | gazebo_plugins 24 | gazebo_ros 25 | gazebo_msgs 26 | robotiq_3f_gripper_articulated_msgs 27 | 28 | angles 29 | message_generation 30 | gazebo 31 | 32 | message_runtime 33 | 34 | 35 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_articulated_msgs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(robotiq_3f_gripper_articulated_msgs) 3 | 4 | find_package(catkin REQUIRED COMPONENTS message_generation std_msgs) 5 | 6 | add_message_files( 7 | FILES 8 | Robotiq3FGripperRobotInput.msg 9 | Robotiq3FGripperRobotOutput.msg 10 | ) 11 | 12 | generate_messages( 13 | DEPENDENCIES 14 | std_msgs 15 | ) 16 | 17 | catkin_package( 18 | CATKIN_DEPENDS message_runtime std_msgs 19 | ) 20 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_articulated_msgs/msg/Robotiq3FGripperRobotOutput.msg: -------------------------------------------------------------------------------- 1 | # rACT: Action request (activation bit). 2 | # 0x0 - Decativate gripper. 3 | # 0x1 - Activate gripper. 4 | 5 | uint8 rACT 6 | 7 | # rMOD: Changes the gripper grasping mode. 8 | # 0x0 - Basic mode. 9 | # 0x1 - Pinch mode. 10 | # 0x2 - Wide mode. 11 | # 0x3 - Scissor mode. 12 | 13 | uint8 rMOD 14 | 15 | # rGTO: "Go To" action moves the gripper fingers to the requested position. 16 | # 0x0 - Stop. 17 | # 0x1 - Go to the requested position. 18 | 19 | uint8 rGTO 20 | 21 | # rATR: Automatic release routine. 22 | # 0x0 - Stop. 23 | # 0x1 Emergency auto-release. 24 | 25 | uint8 rATR 26 | 27 | # rGLV: Glove mode 28 | # 0x0 - Glove mode off 29 | # 0x1 - Glove mode on 30 | 31 | uint8 rGLV 32 | 33 | # rICF: Individual Control of Fingers mode. Each finger receives its own command 34 | # unless the gripper is in the Scissor Grasping Mode and the Independent Control 35 | # of Scissor (rICS) is not activated. 36 | # 0x0 - Normal. 37 | # 0x1 - Enable Individual Control of Fingers A, B and C. 38 | 39 | uint8 rICF 40 | 41 | # rICS: Individual Control of Scissor. The scissor axis moves independenly from 42 | # the grasping mode. When this option is selected, the rMOD bits (grasping mode) 43 | # are ignored as the scissor axis position is defined by the rPRS. 44 | # 0x0 - Normal. 45 | # 0x1 - Enable Individual Control of Scissor. Disable Mode Selection. 46 | 47 | uint8 rICS 48 | 49 | # rPRA: Target position of the fingers (or finger A only if bit rICF is set). 50 | # 0x00 Minimum position (open). 51 | # 0xFF Maximum position (close). 52 | 53 | uint8 rPRA 54 | 55 | # rSPA: Gripper closing or opening speed (or finger A only if bit rICF is set). 56 | # Setting a speed will not initiate a motion. 57 | # 0x00 Minimum speed. 58 | # 0xFF Maximum speed. 59 | 60 | uint8 rSPA 61 | 62 | # rFRA: Final grasping force of the gripper (or finger A only if bit rICF is 63 | # set). 64 | # 0x00 Minimum force. 65 | # 0xFF Maximum force. 66 | 67 | uint8 rFRA 68 | 69 | # rPRB: Finger B target position. It is only available if bit rICF is set. 70 | # 0x00 Minimum position (open). 71 | # 0xFF Maximum position (close). 72 | 73 | uint8 rPRB 74 | 75 | # rSPB: Finger B speed. It is only available if bit rICF is set. 76 | # Setting a speed will not initiate a motion. 77 | # 0x00 Minimum speed. 78 | # 0xFF Maximum speed. 79 | 80 | uint8 rSPB 81 | 82 | # rFRB: Finger B force. It is only available if bit rICF is set. 83 | # 0x00 Minimum force. 84 | # 0xFF Maximum force. 85 | 86 | uint8 rFRB 87 | 88 | # rPRC: Finger C target position. It is only available if bit rICF is set. 89 | # 0x00 Minimum position (open). 90 | # 0xFF Maximum position (close). 91 | 92 | uint8 rPRC 93 | 94 | # rSPC: Finger C speed. It is only available if bit rICF is set. 95 | # Setting a speed will not initiate a motion. 96 | # 0x00 Minimum speed. 97 | # 0xFF Maximum speed. 98 | 99 | uint8 rSPC 100 | 101 | # rFRC: Finger C force. It is only available if bit rICF is set. 102 | # 0x00 Minimum force. 103 | # 0xFF Maximum force. 104 | 105 | uint8 rFRC 106 | 107 | # rPRS: Scissor axis target position. It is only applied if the Individual 108 | # Control of Scissor option is selected (bit rICS is set). 109 | # 0x00 Minimum position (open). 110 | # 0xFF Maximum position (close). 111 | 112 | uint8 rPRS 113 | 114 | # rSPS: Scissor axis speed. It is only applied if the Individual 115 | # Control of Scissor option is selected (bit rICS is set). 116 | # 0x00 Minimum speed. 117 | # 0xFF Maximum speed. 118 | 119 | uint8 rSPS 120 | 121 | # rFRS: Scissor axis force. It is only applied if the Individual 122 | # Control of Scissor option is selected (bit rICS is set). 123 | # 0x00 Minimum force. 124 | # 0xFF Maximum force. 125 | 126 | uint8 rFRS 127 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_articulated_msgs/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | robotiq_3f_gripper_articulated_msgs 4 | 1.0.0 5 | Messages for the robotiq_3f_gripper_articulated model. 6 | 7 | Jean-Philippe Roberge 8 | Apache 2.0 9 | Devon Ash 10 | 11 | catkin 12 | 13 | std_msgs 14 | 15 | message_generation 16 | message_runtime 17 | 18 | 19 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_control/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html 2 | cmake_minimum_required(VERSION 2.8.3) 3 | project(robotiq_3f_gripper_control) 4 | find_package(catkin REQUIRED COMPONENTS 5 | controller_manager 6 | diagnostic_updater 7 | dynamic_reconfigure 8 | hardware_interface 9 | robotiq_3f_gripper_articulated_msgs 10 | robotiq_ethercat 11 | roscpp 12 | rospy 13 | socketcan_interface 14 | std_srvs 15 | ) 16 | 17 | find_package(PkgConfig) 18 | 19 | catkin_python_setup() 20 | 21 | generate_dynamic_reconfigure_options( 22 | cfg/Robotiq3FGripper.cfg 23 | ) 24 | 25 | catkin_package( 26 | LIBRARIES ${PROJECT_NAME} 27 | CATKIN_DEPENDS 28 | controller_manager 29 | diagnostic_updater 30 | dynamic_reconfigure 31 | hardware_interface 32 | robotiq_3f_gripper_articulated_msgs 33 | robotiq_ethercat 34 | roscpp 35 | rospy 36 | socketcan_interface 37 | std_srvs 38 | ) 39 | 40 | include_directories( 41 | include 42 | ${catkin_INCLUDE_DIRS} 43 | ) 44 | 45 | add_library(${PROJECT_NAME} 46 | src/${PROJECT_NAME}/robotiq_3f_gripper_api.cpp 47 | src/${PROJECT_NAME}/robotiq_3f_gripper_diagnostics.cpp 48 | src/${PROJECT_NAME}/robotiq_3f_gripper_hw_interface.cpp 49 | src/${PROJECT_NAME}/robotiq_3f_gripper_ros.cpp 50 | ) 51 | target_link_libraries(${PROJECT_NAME} 52 | ${catkin_LIBRARIES} 53 | ) 54 | add_dependencies(${PROJECT_NAME} 55 | ${PROJECT_NAME}_gencfg 56 | ${catkin_EXPORTED_TARGETS} 57 | ) 58 | 59 | add_executable(robotiq_3f_gripper_ethercat_node 60 | src/${PROJECT_NAME}/robotiq_3f_gripper_ethercat_client.cpp 61 | src/robotiq_3f_gripper_ethercat_node.cpp 62 | ) 63 | 64 | target_link_libraries(robotiq_3f_gripper_ethercat_node 65 | ${PROJECT_NAME} 66 | ${robotiq_ethercat_LIBRARIES} 67 | ${catkin_LIBRARIES} 68 | ) 69 | 70 | add_executable(robotiq_3f_gripper_can_node 71 | src/robotiq_3f_gripper_can_node.cpp 72 | src/${PROJECT_NAME}/robotiq_3f_gripper_can_client.cpp 73 | ) 74 | 75 | target_link_libraries(robotiq_3f_gripper_can_node 76 | ${PROJECT_NAME} 77 | ${catkin_LIBRARIES} 78 | ) 79 | 80 | install(PROGRAMS nodes/Robotiq3FGripperSimpleController.py nodes/Robotiq3FGripperStatusListener.py 81 | nodes/Robotiq3FGripperTcpNode.py DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) 82 | 83 | install(TARGETS robotiq_3f_gripper_can_node ${PROJECT_NAME} robotiq_3f_gripper_ethercat_node 84 | ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 85 | LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 86 | RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 87 | ) 88 | 89 | install(DIRECTORY include/${PROJECT_NAME}/ 90 | DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} 91 | FILES_MATCHING PATTERN "*.h" 92 | PATTERN ".svn" EXCLUDE 93 | ) 94 | 95 | install(DIRECTORY launch 96 | DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 97 | ) 98 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_control/cfg/Robotiq3FGripper.cfg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) 2016, Toyota Research Institute. All rights reserved. 4 | 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are met: 7 | 8 | # 1. Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | 11 | # 2. Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | 15 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 19 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | # POSSIBILITY OF SUCH DAMAGE. 26 | 27 | 28 | PACKAGE="robotiq_3f_gripper_control" 29 | 30 | from dynamic_reconfigure.parameter_generator_catkin import * 31 | 32 | gen = ParameterGenerator() 33 | 34 | gen.add("ind_control_fingers", bool_t, 0, "Set individual control of fingers", False) 35 | gen.add("ind_control_scissor", bool_t, 0, "Set individual control of scissor", False) 36 | 37 | mode_enum = gen.enum([gen.const("Basic", int_t, 0, "Basic mode"), 38 | gen.const("Pinch", int_t, 1, "Pinch mode"), 39 | gen.const("Wide", int_t, 2, "Wide mode"), 40 | gen.const("Scissor", int_t, 3, "Scissor mode")], "An enum to set the grasp operation mode") 41 | 42 | gen.add("mode", int_t, 0, "The grasping mode", 0, edit_method = mode_enum) 43 | 44 | gen.add("velocity", double_t, 0, "Set velocity for fingers", 66, 22, 110) 45 | gen.add("force", double_t, 0, "Set force for fingers", 30, 15, 60) 46 | 47 | exit(gen.generate(PACKAGE, "robotiq_3f_gripper_control", "Robotiq3FGripper")) 48 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_control/include/robotiq_3f_gripper_control/robotiq_3f_gripper_can_client.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016, Toyota Research Institute. All rights reserved. 2 | 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are met: 5 | 6 | // 1. Redistributions of source code must retain the above copyright 7 | // notice, this list of conditions and the following disclaimer. 8 | 9 | // 2. Redistributions in binary form must reproduce the above copyright 10 | // notice, this list of conditions and the following disclaimer in the 11 | // documentation and/or other materials provided with the distribution. 12 | 13 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 17 | // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 18 | // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 19 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 20 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 21 | // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | 25 | #ifndef ROBOTIQ_3F_GRIPPER_CAN_CLIENT_H 26 | #define ROBOTIQ_3F_GRIPPER_CAN_CLIENT_H 27 | 28 | #include 29 | #include 30 | #include 31 | 32 | namespace robotiq_3f_gripper_control 33 | { 34 | 35 | /** 36 | * \brief This class provides a client for the EtherCAT manager object that 37 | * can translate robot input/output messages and translate them to 38 | * the underlying IO Map. 39 | */ 40 | 41 | class Robotiq3FGripperCanClient : public Robotiq3FGripperClientBase 42 | { 43 | public: 44 | Robotiq3FGripperCanClient(unsigned int can_id, boost::shared_ptr driver); 45 | 46 | virtual ~Robotiq3FGripperCanClient(); 47 | 48 | 49 | void init(ros::NodeHandle nh); 50 | 51 | /** 52 | * \brief Write the given set of control flags to the memory of the gripper 53 | * 54 | * @param[in] output The set of output-register values to write to the gripper 55 | */ 56 | void writeOutputs(const GripperOutput& output); 57 | 58 | /** 59 | * \brief Reads set of input-register values from the gripper. 60 | * \return The gripper input registers as read from the controller IOMap 61 | */ 62 | GripperInput readInputs() const; 63 | 64 | /** 65 | * \brief Reads set of output-register values from the gripper. 66 | * \return The gripper output registers as read from the controller IOMap 67 | */ 68 | GripperOutput readOutputs() const; 69 | 70 | private: 71 | unsigned int can_id_; 72 | boost::shared_ptr driver_; 73 | std::string can_device_; 74 | can::Frame::Header resp_header_; 75 | 76 | GripperInput input_; 77 | GripperOutput output_; 78 | 79 | can::CommInterface::FrameListenerConstSharedPtr frame_listener_; 80 | can::StateInterface::StateListenerConstSharedPtr state_listener_; 81 | 82 | void frameCallback(const can::Frame &f); 83 | void stateCallback(const can::State &s); 84 | 85 | void requestStart(); 86 | 87 | std::map prevCmd_; 88 | 89 | mutable boost::timed_mutex read_mutex; 90 | 91 | void decodeGripperStatus(const u_int8_t &f); 92 | void decodeObjectStatus(const u_int8_t &f); 93 | void decodeFaultStatus(const u_int8_t &f); 94 | void decodeFingerAPos(const u_int8_t &f); 95 | void decodeFingerBPos(const u_int8_t &f); 96 | void decodeFingerCPos(const u_int8_t &f); 97 | void decodeFingerSPos(const u_int8_t &f); 98 | void decodeFingerACurrent(const u_int8_t &f); 99 | void decodeFingerBCurrent(const u_int8_t &f); 100 | void decodeFingerCCurrent(const u_int8_t &f); 101 | void decodeFingerSCurrent(const u_int8_t &f); 102 | void decodeFingerAPosCmd(const u_int8_t &f); 103 | void decodeFingerBPosCmd(const u_int8_t &f); 104 | void decodeFingerCPosCmd(const u_int8_t &f); 105 | void decodeFingerSPosCmd(const u_int8_t &f); 106 | }; 107 | 108 | } //end namespace robotiq_3f_gripper_control 109 | 110 | #endif // ROBOTIQ_3F_GRIPPER_CAN_CLIENT_H 111 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_control/include/robotiq_3f_gripper_control/robotiq_3f_gripper_client_base.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016, Toyota Research Institute. All rights reserved. 2 | 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are met: 5 | 6 | // 1. Redistributions of source code must retain the above copyright 7 | // notice, this list of conditions and the following disclaimer. 8 | 9 | // 2. Redistributions in binary form must reproduce the above copyright 10 | // notice, this list of conditions and the following disclaimer in the 11 | // documentation and/or other materials provided with the distribution. 12 | 13 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 17 | // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 18 | // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 19 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 20 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 21 | // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | 25 | #ifndef ROBOTIQ_3F_GRIPPER_CLIENT_BASE_H 26 | #define ROBOTIQ_3F_GRIPPER_CLIENT_BASE_H 27 | 28 | #include 29 | #include 30 | #include 31 | 32 | namespace robotiq_3f_gripper_control 33 | { 34 | 35 | class Robotiq3FGripperClientBase 36 | { 37 | public: 38 | typedef robotiq_3f_gripper_articulated_msgs::Robotiq3FGripperRobotOutput GripperOutput; 39 | typedef robotiq_3f_gripper_articulated_msgs::Robotiq3FGripperRobotInput GripperInput; 40 | 41 | virtual void init(ros::NodeHandle nh) {} 42 | 43 | /** 44 | * \brief Write the given set of control flags to the memory of the gripper 45 | * 46 | * @param[in] output The set of output-register values to write to the gripper 47 | */ 48 | virtual void writeOutputs(const GripperOutput& output) = 0; 49 | 50 | /** 51 | * \brief Reads set of input-register values from the gripper. 52 | * \return The gripper input registers as read from the controller IOMap 53 | */ 54 | virtual GripperInput readInputs() const = 0; 55 | 56 | /** 57 | * \brief Reads set of output-register values from the gripper. 58 | * \return The gripper output registers as read from the controller IOMap 59 | */ 60 | virtual GripperOutput readOutputs() const = 0; 61 | 62 | virtual ~Robotiq3FGripperClientBase() {} 63 | 64 | protected: 65 | Robotiq3FGripperClientBase() {} 66 | 67 | }; 68 | 69 | } //end namespace robotiq_3f_gripper_control 70 | 71 | #endif // ROBOTIQ_3F_GRIPPER_CLIENT_BASE_H 72 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_control/include/robotiq_3f_gripper_control/robotiq_3f_gripper_diagnostics.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016, Toyota Research Institute. All rights reserved. 2 | 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are met: 5 | 6 | // 1. Redistributions of source code must retain the above copyright 7 | // notice, this list of conditions and the following disclaimer. 8 | 9 | // 2. Redistributions in binary form must reproduce the above copyright 10 | // notice, this list of conditions and the following disclaimer in the 11 | // documentation and/or other materials provided with the distribution. 12 | 13 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 17 | // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 18 | // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 19 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 20 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 21 | // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | 25 | #ifndef ROBOTIQ_3F_GRIPPER_DIAGNOSTICS_H 26 | #define ROBOTIQ_3F_GRIPPER_DIAGNOSTICS_H 27 | 28 | #include "robotiq_3f_gripper_control/robotiq_3f_gripper_api.h" 29 | #include 30 | 31 | namespace robotiq_3f_gripper_control 32 | { 33 | 34 | class Robotiq3FGripperDiagnostics 35 | { 36 | public: 37 | Robotiq3FGripperDiagnostics(boost::shared_ptr driver, std::string name); 38 | 39 | void update(); 40 | 41 | void getStatus(diagnostic_updater::DiagnosticStatusWrapper &stat); 42 | 43 | protected: 44 | boost::shared_ptr driver_; 45 | 46 | diagnostic_updater::Updater diagnostics_; 47 | 48 | std::string toString(robotiq::InitializationMode status); 49 | std::string toString(robotiq::GraspingMode status); 50 | std::string toString(robotiq::ActionMode status); 51 | std::string toString(robotiq::GripperStatus status); 52 | std::string toString(robotiq::MotionStatus status); 53 | std::string toString(robotiq::FaultStatus status); 54 | 55 | }; 56 | } //end namespace robotiq_3f_gripper_control 57 | 58 | #endif // ROBOTIQ_3F_GRIPPER_DIAGNOSTICS_H 59 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_control/include/robotiq_3f_gripper_control/robotiq_3f_gripper_ethercat_client.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016, Toyota Research Institute. All rights reserved. 2 | 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are met: 5 | 6 | // 1. Redistributions of source code must retain the above copyright 7 | // notice, this list of conditions and the following disclaimer. 8 | 9 | // 2. Redistributions in binary form must reproduce the above copyright 10 | // notice, this list of conditions and the following disclaimer in the 11 | // documentation and/or other materials provided with the distribution. 12 | 13 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 17 | // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 18 | // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 19 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 20 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 21 | // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | 25 | #ifndef ROBOTIQ_3F_GRIPPER_ETHERCAT_CLIENT_H 26 | #define ROBOTIQ_3F_GRIPPER_ETHERCAT_CLIENT_H 27 | 28 | #include 29 | 30 | // Forward declaration of EtherCatManager 31 | namespace robotiq_ethercat 32 | { 33 | class EtherCatManager; 34 | } 35 | 36 | namespace robotiq_3f_gripper_control 37 | { 38 | 39 | /** 40 | * \brief This class provides a client for the EtherCAT manager object that 41 | * can translate robot input/output messages and translate them to 42 | * the underlying IO Map. 43 | */ 44 | 45 | class Robotiq3FGripperEtherCatClient : public Robotiq3FGripperClientBase 46 | { 47 | public: 48 | /** 49 | * \brief Constructs a control interface to a 3F Robotiq gripper on 50 | * the given ethercat network and the given slave_no. 51 | * 52 | * @param[in] manager The interface to an EtherCAT network that the gripper 53 | * is connected to. 54 | * 55 | * @param[in] slave_no The slave number of the gripper on the EtherCAT network 56 | * (>= 1) 57 | */ 58 | Robotiq3FGripperEtherCatClient(robotiq_ethercat::EtherCatManager& manager, int slave_no); 59 | 60 | /** 61 | * \brief Write the given set of control flags to the memory of the gripper 62 | * 63 | * @param[in] output The set of output-register values to write to the gripper 64 | */ 65 | void writeOutputs(const GripperOutput& output); 66 | 67 | /** 68 | * \brief Reads set of input-register values from the gripper. 69 | * \return The gripper input registers as read from the controller IOMap 70 | */ 71 | GripperInput readInputs() const; 72 | 73 | /** 74 | * \brief Reads set of output-register values from the gripper. 75 | * \return The gripper output registers as read from the controller IOMap 76 | */ 77 | GripperOutput readOutputs() const; 78 | 79 | private: 80 | robotiq_ethercat::EtherCatManager& manager_; 81 | const int slave_no_; 82 | }; 83 | 84 | } 85 | 86 | #endif 87 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_control/include/robotiq_3f_gripper_control/robotiq_3f_gripper_hw_interface.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016, Toyota Research Institute. All rights reserved. 2 | 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are met: 5 | 6 | // 1. Redistributions of source code must retain the above copyright 7 | // notice, this list of conditions and the following disclaimer. 8 | 9 | // 2. Redistributions in binary form must reproduce the above copyright 10 | // notice, this list of conditions and the following disclaimer in the 11 | // documentation and/or other materials provided with the distribution. 12 | 13 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 17 | // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 18 | // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 19 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 20 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 21 | // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | 25 | #ifndef ROBOTIQ_3F_GRIPPER_HW_INTERFACE_H 26 | #define ROBOTIQ_3F_GRIPPER_HW_INTERFACE_H 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | namespace robotiq_3f_gripper_control 36 | { 37 | 38 | class Robotiq3FGripperHWInterface : public hardware_interface::RobotHW 39 | { 40 | public: 41 | Robotiq3FGripperHWInterface(ros::NodeHandle nh, boost::shared_ptr driver); 42 | 43 | void configure(hardware_interface::JointStateInterface &joint_state_interface, 44 | hardware_interface::PositionJointInterface &joint_position_interface); 45 | void read(ros::Duration d); 46 | void write(ros::Duration d); 47 | 48 | protected: 49 | std::vector joint_names_; 50 | 51 | std::vector j_curr_pos_; 52 | std::vector j_curr_vel_; 53 | std::vector j_curr_eff_; 54 | std::vector j_cmd_pos_; 55 | 56 | boost::shared_ptr hw_driver_; 57 | boost::shared_ptr hw_diagnostics_; 58 | boost::shared_ptr hw_ros_; 59 | }; 60 | } 61 | 62 | #endif //ROBOTIQ_3F_GRIPPER_HW_INTERFACE_H 63 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_control/include/robotiq_3f_gripper_control/robotiq_3f_gripper_ros.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016, Toyota Research Institute. All rights reserved. 2 | 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are met: 5 | 6 | // 1. Redistributions of source code must retain the above copyright 7 | // notice, this list of conditions and the following disclaimer. 8 | 9 | // 2. Redistributions in binary form must reproduce the above copyright 10 | // notice, this list of conditions and the following disclaimer in the 11 | // documentation and/or other materials provided with the distribution. 12 | 13 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 17 | // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 18 | // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 19 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 20 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 21 | // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | 25 | #ifndef ROBOTIQ_3F_GRIPPER_ROS_H 26 | #define ROBOTIQ_3F_GRIPPER_ROS_H 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | namespace robotiq_3f_gripper_control 37 | { 38 | class Robotiq3FGripperROS 39 | { 40 | public: 41 | Robotiq3FGripperROS(ros::NodeHandle& nh, 42 | boost::shared_ptr driver, std::vector joint_names, 43 | ros::Duration desired_update_freq); 44 | 45 | void publish(); 46 | 47 | bool handleInit(std_srvs::TriggerRequest &req, std_srvs::TriggerResponse &resp); 48 | bool handleReset(std_srvs::TriggerRequest &req, std_srvs::TriggerResponse &resp); 49 | bool handleHalt(std_srvs::TriggerRequest &req, std_srvs::TriggerResponse &resp); 50 | bool handleEmergRelease(std_srvs::TriggerRequest &req, std_srvs::TriggerResponse &resp); 51 | bool handleShutdown(std_srvs::TriggerRequest &req, std_srvs::TriggerResponse &resp); 52 | 53 | void handleReconfigure(robotiq_3f_gripper_control::Robotiq3FGripperConfig &config, uint32_t level=0); 54 | 55 | void handleRawCmd(const robotiq_3f_gripper_articulated_msgs::Robotiq3FGripperRobotOutput::ConstPtr &msg); 56 | 57 | void updateConfig(const robotiq_3f_gripper_control::Robotiq3FGripperConfig &config); 58 | void getCurrentConfig(robotiq_3f_gripper_control::Robotiq3FGripperConfig &config); 59 | 60 | private: 61 | ros::NodeHandle nh_; 62 | boost::shared_ptr driver_; 63 | 64 | //! Services 65 | ros::ServiceServer init_srv_; 66 | ros::ServiceServer reset_srv_; 67 | ros::ServiceServer halt_srv_; 68 | ros::ServiceServer emerg_release_srv_; 69 | ros::ServiceServer shutdown_srv_; 70 | 71 | //! Topics 72 | ros::Publisher input_status_pub_; 73 | ros::Subscriber output_sub_; 74 | 75 | //! Settings 76 | ros::Duration desired_update_freq_; 77 | 78 | //! Reconfigure 79 | typedef dynamic_reconfigure::Server ReconfigureServer; 80 | boost::shared_ptr reconfigure_; 81 | boost::recursive_mutex reconfigure_mutex_; 82 | robotiq_3f_gripper_control::Robotiq3FGripperConfig config_; 83 | 84 | robotiq_3f_gripper_articulated_msgs::Robotiq3FGripperRobotInput input_status_msg_; 85 | 86 | }; 87 | } //end namespace robotiq_3f_gripper_control 88 | 89 | #endif // ROBOTIQ_3F_GRIPPER_ROS_H 90 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_control/launch/robotiq_3f_gripper_can.launch: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | ## joint_state_controller 42 | $(arg prefix)joint_state_controller: 43 | type: joint_state_controller/JointStateController 44 | publish_rate: 50 45 | 46 | ## joint_group_position_controller 47 | $(arg prefix)hand_group_position_controller: 48 | type: position_controllers/JointGroupPositionController 49 | joints: 50 | - $(arg prefix)finger_1_joint_1 51 | - $(arg prefix)finger_2_joint_1 52 | - $(arg prefix)finger_middle_joint_1 53 | - $(arg prefix)palm_finger_1_joint 54 | 55 | ## single command controller 56 | $(arg prefix)hand_simple_controller: 57 | type: position_controllers/JointPositionController 58 | joint: $(arg prefix)finger_1_joint_1 59 | 60 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_control/launch/robotiq_3f_gripper_ethercat.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_control/mainpage.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \mainpage 3 | \htmlinclude manifest.html 4 | 5 | \b robotiq_3f_gripper_control 6 | 7 | 10 | 11 | --> 12 | 13 | 14 | */ 15 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_control/nodes/Robotiq3FGripperTcpNode.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Software License Agreement (BSD License) 4 | # 5 | # Copyright (c) 2012, Robotiq, Inc. 6 | # All rights reserved. 7 | # 8 | # Redistribution and use in source and binary forms, with or without 9 | # modification, are permitted provided that the following conditions 10 | # are met: 11 | # 12 | # * Redistributions of source code must retain the above copyright 13 | # notice, this list of conditions and the following disclaimer. 14 | # * Redistributions in binary form must reproduce the above 15 | # copyright notice, this list of conditions and the following 16 | # disclaimer in the documentation and/or other materials provided 17 | # with the distribution. 18 | # * Neither the name of Robotiq, Inc. nor the names of its 19 | # contributors may be used to endorse or promote products derived 20 | # from this software without specific prior written permission. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25 | # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26 | # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 27 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 28 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 32 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33 | # POSSIBILITY OF SUCH DAMAGE. 34 | # 35 | # Copyright (c) 2012, Robotiq, Inc. 36 | # Revision $Id$ 37 | 38 | """@package docstring 39 | ROS node for controling a Robotiq 3F gripper gripper using the Modbus TCP protocol. 40 | 41 | The script takes as an argument the IP address of the gripper. It initializes a baseRobotiq3FGripper object and adds a comModbusTcp client to it. It then loops forever, reading the gripper status and updating its command. The gripper status is published on the 'Robotiq3FGripperRobotInput' topic using the 'Robotiq3FGripper_robot_input' msg type. The node subscribes to the 'Robotiq3FGripperRobotOutput' topic for new commands using the 'Robotiq3FGripper_robot_output' msg type. Examples are provided to control the gripper (Robotiq3FGripperSimpleController.py) and interpreting its status (Robotiq3FGripperStatusListener.py). 42 | """ 43 | 44 | import roslib; 45 | 46 | roslib.load_manifest('robotiq_3f_gripper_control') 47 | roslib.load_manifest('robotiq_modbus_tcp') 48 | import rospy 49 | import robotiq_3f_gripper_control.baseRobotiq3FGripper 50 | import robotiq_modbus_tcp.comModbusTcp 51 | import sys 52 | from robotiq_3f_gripper_articulated_msgs.msg import Robotiq3FGripperRobotInput 53 | from robotiq_3f_gripper_articulated_msgs.msg import Robotiq3FGripperRobotOutput 54 | 55 | 56 | def mainLoop(address): 57 | # Gripper is a 3F gripper with a TCP connection 58 | gripper = robotiq_3f_gripper_control.baseRobotiq3FGripper.robotiqbaseRobotiq3FGripper() 59 | gripper.client = robotiq_modbus_tcp.comModbusTcp.communication() 60 | 61 | # We connect to the address received as an argument 62 | gripper.client.connectToDevice(address) 63 | 64 | rospy.init_node('robotiq3FGripper') 65 | 66 | # The Gripper status is published on the topic named 'Robotiq3FGripperRobotInput' 67 | pub = rospy.Publisher('Robotiq3FGripperRobotInput', Robotiq3FGripperRobotInput, queue_size=1) 68 | 69 | # The Gripper command is received from the topic named 'Robotiq3FGripperRobotOutput' 70 | rospy.Subscriber('Robotiq3FGripperRobotOutput', Robotiq3FGripperRobotOutput, gripper.refreshCommand) 71 | 72 | # We loop 73 | while not rospy.is_shutdown(): 74 | # Get and publish the Gripper status 75 | status = gripper.getStatus() 76 | pub.publish(status) 77 | 78 | # Wait a little 79 | rospy.sleep(0.05) 80 | 81 | # Send the most recent command 82 | gripper.sendCommand() 83 | 84 | # Wait a little 85 | rospy.sleep(0.05) 86 | 87 | 88 | if __name__ == '__main__': 89 | try: 90 | # TODO: Add verification that the argument is an IP address 91 | mainLoop(sys.argv[1]) 92 | except rospy.ROSInterruptException: 93 | pass 94 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_control/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | robotiq_3f_gripper_control 4 | 1.0.0 5 |

Package to control a 3F gripper Gripper from Robotiq inc.

6 | Jean-Philippe Roberge 7 | BSD 8 | http://ros.org/wiki/robotiq 9 | 10 | Nicolas Lauzier (Robotiq inc.) 11 | Allison Thackston 12 | 13 | catkin 14 | 15 | controller_manager 16 | diagnostic_updater 17 | dynamic_reconfigure 18 | hardware_interface 19 | robotiq_ethercat 20 | roscpp 21 | rospy 22 | socketcan_interface 23 | std_srvs 24 | robotiq_3f_gripper_articulated_msgs 25 | 26 |
27 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_control/setup.py: -------------------------------------------------------------------------------- 1 | ## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD 2 | 3 | from distutils.core import setup 4 | from catkin_pkg.python_setup import generate_distutils_setup 5 | 6 | # fetch values from package.xml 7 | setup_args = generate_distutils_setup( 8 | packages=['robotiq_3f_gripper_control'], 9 | package_dir={'': 'src'}, 10 | requires=['rospy'] 11 | ) 12 | 13 | setup(**setup_args) 14 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_control/src/robotiq_3f_gripper_control/__init__.py: -------------------------------------------------------------------------------- 1 | #autogenerated by ROS python message generators -------------------------------------------------------------------------------- /robotiq_3f_gripper_joint_state_publisher/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(robotiq_3f_gripper_joint_state_publisher) 3 | 4 | ## Find catkin macros and libraries 5 | find_package(catkin REQUIRED COMPONENTS 6 | message_generation 7 | robotiq_3f_gripper_control 8 | roscpp 9 | roslib 10 | sensor_msgs 11 | ) 12 | 13 | ################################### 14 | ## catkin specific configuration ## 15 | ################################### 16 | ## The catkin_package macro generates cmake config files for your package 17 | ## INCLUDE_DIRS: uncomment this if you package contains header files 18 | ## LIBRARIES: libraries you create in this project that dependent projects also need 19 | ## CATKIN_DEPENDS: catkin_packages dependent projects also need 20 | ## DEPENDS: system dependencies of this project that dependent projects also need 21 | catkin_package( 22 | CATKIN_DEPENDS message_runtime robotiq_3f_gripper_control roscpp roslib sensor_msgs 23 | ) 24 | 25 | ########### 26 | ## Build ## 27 | ########### 28 | 29 | ## Specify additional locations of header files 30 | include_directories( 31 | ${catkin_INCLUDE_DIRS} 32 | ) 33 | 34 | ## Declare a cpp executable 35 | add_executable(robotiq_3f_gripper_joint_states src/robotiq_3f_gripper_joint_states.cpp) 36 | 37 | ## Add cmake target dependencies of the executable/library 38 | add_dependencies(robotiq_3f_gripper_joint_states robotiq_3f_gripper_control_generate_messages_cpp) 39 | 40 | ## Specify libraries to link a library or executable target against 41 | target_link_libraries(robotiq_3f_gripper_joint_states 42 | ${catkin_LIBRARIES} 43 | ) 44 | 45 | install(TARGETS robotiq_3f_gripper_joint_states 46 | ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 47 | LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 48 | RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 49 | ) 50 | 51 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_joint_state_publisher/README.md: -------------------------------------------------------------------------------- 1 | # robotiq_3f_gripper_joint_state_publisher 2 | 3 | ### For Robotiq 3F gripper 4 | 5 | Subscribes to Robotiq state messages on "Robotiq3FGripperRobotInput" topic, converts the data to joint values, and publishes sensor_msgs/JointState messages on "joint_states" topic for Robotiq 3f-gripper. 6 | 7 | #### Instructions 8 | Run: 9 | 10 | `rosrun robotiq_3f_gripper_joint_state_publisher robotiq_3f_gripper_joint_states` 11 | 12 | or 13 | 14 | `rosrun robotiq_3f_gripper_joint_state_publisher robotiq_3f_gripper_joint_states _prefix:=` 15 | 16 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_joint_state_publisher/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | robotiq_3f_gripper_joint_state_publisher 4 | 1.0.0 5 | Publishes joint states of Robotiq 3F gripper 6 | Jean-Philippe Roberge 7 | 3-clause BSD 8 | Jack Thompson 9 | 10 | catkin 11 | 12 | roscpp 13 | roslib 14 | sensor_msgs 15 | robotiq_3f_gripper_control 16 | 17 | message_generation 18 | 19 | message_runtime 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html 2 | cmake_minimum_required(VERSION 3.0.2) 3 | project(robotiq_3f_gripper_visualization) 4 | find_package(catkin REQUIRED COMPONENTS urdf) 5 | catkin_package() 6 | install(DIRECTORY cfg DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) 7 | install(DIRECTORY meshes DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) 8 | install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) 9 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/cfg/robotiq-3f-gripper_articulated.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/cfg/robotiq-3f-gripper_articulated_macro.xacro: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/cfg/robotiq-3f-gripper_mesh.urdf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/cfg/robotiq-3f-gripper_mesh.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/cfg/robotiq-3f-gripper_mesh.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/cfg/robotiq-3f-gripper_mesh_macro.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/launch/robotiq_gripper_upload.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/mainpage.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \mainpage 3 | \htmlinclude manifest.html 4 | 5 | \b robotiq is ... 6 | 7 | 10 | 11 | 12 | \section codeapi Code API 13 | 14 | 24 | 25 | 26 | */ 27 | -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/collision/GRIPPER_CLOSED.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/collision/GRIPPER_CLOSED.stl -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/collision/GRIPPER_OPEN.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/collision/GRIPPER_OPEN.stl -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/collision/GRIPPER_OPEN_FINGER_1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/collision/GRIPPER_OPEN_FINGER_1.stl -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/collision/GRIPPER_OPEN_FINGER_2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/collision/GRIPPER_OPEN_FINGER_2.stl -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/collision/GRIPPER_OPEN_FINGER_3.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/collision/GRIPPER_OPEN_FINGER_3.stl -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/collision/GRIPPER_OPEN_PALM.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/collision/GRIPPER_OPEN_PALM.stl -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/visual/GRIPPER_CLOSED.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/visual/GRIPPER_CLOSED.stl -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/visual/GRIPPER_OPEN.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/visual/GRIPPER_OPEN.stl -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/visual/GRIPPER_OPEN_FINGER_1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/visual/GRIPPER_OPEN_FINGER_1.stl -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/visual/GRIPPER_OPEN_FINGER_2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/visual/GRIPPER_OPEN_FINGER_2.stl -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/visual/GRIPPER_OPEN_FINGER_3.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/visual/GRIPPER_OPEN_FINGER_3.stl -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/visual/GRIPPER_OPEN_PALM.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper/visual/GRIPPER_OPEN_PALM.stl -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper_articulated/collision/link_0.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper_articulated/collision/link_0.STL -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper_articulated/collision/link_1.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper_articulated/collision/link_1.STL -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper_articulated/collision/link_2.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper_articulated/collision/link_2.STL -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper_articulated/collision/link_3.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper_articulated/collision/link_3.STL -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper_articulated/collision/palm.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_3f_gripper_visualization/meshes/robotiq-3f-gripper_articulated/collision/palm.STL -------------------------------------------------------------------------------- /robotiq_3f_gripper_visualization/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | robotiq_3f_gripper_visualization 4 | 1.0.0 5 | robotiq 6 | Jean-Philippe Roberge 7 | BSD 8 | http://ros.org/wiki/robotiq 9 | Nicolas Lauzier (Robotiq inc.) 10 | 11 | catkin 12 | urdf 13 | 14 | 15 | -------------------------------------------------------------------------------- /robotiq_3f_rviz/icons/classes/Robotiq3FingerPanel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_3f_rviz/icons/classes/Robotiq3FingerPanel.png -------------------------------------------------------------------------------- /robotiq_3f_rviz/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | robotiq_3f_rviz 4 | 1.0.0 5 | RViz plugin for Robotiq 3-Finger Adaptive Robot Gripper 6 | 7 | 8 | 9 | 10 | Christian Rauch 11 | 12 | 13 | 14 | 15 | 16 | MIT 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | catkin 52 | 53 | qtbase5-dev 54 | 55 | libqt5-core 56 | libqt5-gui 57 | libqt5-widgets 58 | 59 | rviz 60 | robotiq_3f_gripper_control 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /robotiq_3f_rviz/plugin_description.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Simple control of Robotiq 3-Finger Adaptive Robot Gripper 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /robotiq_ethercat/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(robotiq_ethercat) 3 | 4 | find_package(catkin REQUIRED COMPONENTS 5 | roscpp 6 | soem 7 | ) 8 | 9 | catkin_package( 10 | INCLUDE_DIRS include 11 | LIBRARIES ${PROJECT_NAME} 12 | CATKIN_DEPENDS roscpp soem 13 | ) 14 | 15 | include_directories(include 16 | ${catkin_INCLUDE_DIRS} 17 | ## The following work around allows SOEM headers to include other SOEM headers. 18 | ## SOEM headers assume all headers are installed in a flat directory structure 19 | ## See https://github.com/smits/soem/issues/4 for more information. 20 | ${soem_INCLUDE_DIRS}/soem 21 | ) 22 | 23 | add_library(${PROJECT_NAME} 24 | include/${PROJECT_NAME}/ethercat_manager.h 25 | src/ethercat_manager.cpp 26 | ) 27 | 28 | install(TARGETS ${PROJECT_NAME} 29 | ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 30 | LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 31 | RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 32 | ) 33 | 34 | install(DIRECTORY include/${PROJECT_NAME}/ 35 | DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} 36 | FILES_MATCHING PATTERN "*.h" 37 | ) 38 | -------------------------------------------------------------------------------- /robotiq_ethercat/README.md: -------------------------------------------------------------------------------- 1 | ## Robotiq Ethercat 2 | This package provides an interface for interfacing with an ethercat network. With the current architecture, a single process is associated with a single network and that process must be aware of all slaves it will communicate with. 3 | 4 | ### Maintainer 5 | - Jean-Philippe Roberge (ros@robotiq.com) 6 | 7 | ## Common Issues 8 | Please note: 9 | - VMs probably won't work. 10 | - You need a dedicated ethernet card for the EtherCAT network. I haven't had luck using eth0. 11 | - If you're running Ubuntu, you'll probably need to run ```sudo setcap cap_net_raw+ep``` on the ```robotiq_2f_gripper_ethercat_node``` executable before it will work. Otherwise you'll get a "Could not initialize SOEM" error. This executable can be found under the same package name in your /devel/ directory. 12 | -------------------------------------------------------------------------------- /robotiq_ethercat/include/robotiq_ethercat/ethercat_manager.h: -------------------------------------------------------------------------------- 1 | #ifndef ETHERCAT_MANAGER_H 2 | #define ETHERCAT_MANAGER_H 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | namespace robotiq_ethercat 14 | { 15 | 16 | /** 17 | * \brief EtherCAT exception. Currently this is only thrown in the event 18 | * of a failure to construct an EtherCat manager. 19 | */ 20 | class EtherCatError : public std::runtime_error 21 | { 22 | public: 23 | explicit EtherCatError(const std::string& what) 24 | : std::runtime_error(what) 25 | {} 26 | }; 27 | 28 | /** 29 | * \brief This class provides a CPP interface to the SimpleOpenEthercatMaster library 30 | * Given the name of an ethernet device, such as "eth0", it will connect, 31 | * start a thread that cycles data around the network, and provide read/write 32 | * access to the underlying io map. 33 | * 34 | * Please note that as used in these docs, 'Input' and 'Output' are relative to 35 | * your program. So the 'Output' registers are the ones you write to, for example. 36 | */ 37 | class EtherCatManager 38 | { 39 | public: 40 | /** 41 | * \brief Constructs and initializes the ethercat slaves on a given network interface. 42 | * 43 | * @param[in] ifname the name of the network interface that the ethercat chain 44 | * is connected to (i.e. "eth0") 45 | * 46 | * Constructor can throw EtherCatError exception if SOEM could not be 47 | * initialized. 48 | */ 49 | EtherCatManager(const std::string& ifname); 50 | 51 | ~EtherCatManager(); 52 | 53 | /** 54 | * \brief writes 'value' to the 'channel-th' output-register of the given 'slave' 55 | * 56 | * @param[in] slave_no The slave number of the device to write to (>= 1) 57 | * @param[in] channel The byte offset into the output IOMap to write value to 58 | * @param[in] value The byte value to write 59 | * 60 | * This method currently makes no attempt to catch out of bounds errors. Make 61 | * sure you know your IOMap bounds. 62 | */ 63 | void write(int slave_no, uint8_t channel, uint8_t value); 64 | 65 | /** 66 | * \brief Reads the "channel-th" input-register of the given slave no 67 | * 68 | * @param[in] slave_no The slave number of the device to read from (>= 1) 69 | * @param[in] channel The byte offset into the input IOMap to read from 70 | */ 71 | uint8_t readInput(int slave_no, uint8_t channel) const; 72 | 73 | /** 74 | * \brief Reads the "channel-th" output-register of the given slave no 75 | * 76 | * @param[in] slave_no The slave number of the device to read from (>= 1) 77 | * @param[in] channel The byte offset into the output IOMap to read from 78 | */ 79 | uint8_t readOutput(int slave_no, uint8_t channel) const; 80 | 81 | private: 82 | bool initSoem(const std::string& ifname); 83 | 84 | const std::string ifname_; 85 | boost::scoped_array iomap_; 86 | boost::thread cycle_thread_; 87 | mutable boost::mutex iomap_mutex_; 88 | bool stop_flag_; 89 | }; 90 | 91 | } 92 | 93 | #endif 94 | -------------------------------------------------------------------------------- /robotiq_ethercat/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | robotiq_ethercat 4 | 1.0.0 5 | 6 |

7 | ROS-Industrial support stack for facilitating communication with EtherCAT networks. 8 |

9 |
10 | 11 | Jonathan Meyer 12 | Jean-Philippe Roberge 13 | BSD 14 | 15 | catkin 16 | soem 17 | roscpp 18 | 19 |
20 | -------------------------------------------------------------------------------- /robotiq_ft_sensor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(robotiq_ft_sensor) 3 | 4 | find_package(catkin REQUIRED COMPONENTS 5 | message_generation 6 | roscpp 7 | std_msgs 8 | ) 9 | 10 | 11 | ## Generate messages in the 'msg' folder 12 | add_message_files( 13 | DIRECTORY 14 | msg 15 | FILES 16 | ft_sensor.msg 17 | ) 18 | 19 | ## Generate services in the 'srv' folder 20 | add_service_files( 21 | DIRECTORY 22 | srv 23 | FILES 24 | sensor_accessor.srv 25 | ) 26 | 27 | ## Generate added messages and services with any dependencies listed here 28 | generate_messages( 29 | DEPENDENCIES 30 | std_msgs 31 | ) 32 | 33 | ################################### 34 | ## catkin specific configuration ## 35 | ################################### 36 | catkin_package( 37 | CATKIN_DEPENDS message_runtime std_msgs 38 | ) 39 | 40 | ########### 41 | ## Build ## 42 | ########### 43 | 44 | include_directories( 45 | include ${catkin_INCLUDE_DIRS} 46 | ) 47 | 48 | # make the executables 49 | add_executable(rq_sensor nodes/rq_sensor.cpp src/rq_sensor_com.cpp src/rq_sensor_state.cpp) 50 | add_dependencies(rq_sensor ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_gencfg ${PROJECT_NAME}_gencpp) 51 | target_link_libraries(rq_sensor ${catkin_LIBRARIES}) 52 | 53 | add_executable(rq_test_sensor nodes/rq_test_sensor.cpp) 54 | add_dependencies(rq_test_sensor ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_gencfg ${PROJECT_NAME}_gencpp) 55 | target_link_libraries(rq_test_sensor ${catkin_LIBRARIES}) 56 | 57 | install(TARGETS rq_sensor rq_test_sensor 58 | RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 59 | ) 60 | 61 | install(DIRECTORY urdf 62 | DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 63 | ) 64 | 65 | install(DIRECTORY meshes 66 | DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 67 | ) 68 | -------------------------------------------------------------------------------- /robotiq_ft_sensor/include/robotiq_ft_sensor/rq_int.h: -------------------------------------------------------------------------------- 1 | /* Software License Agreement (BSD License) 2 | * 3 | * Copyright (c) 2014, Robotiq, Inc. 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 10 | * * Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials provided 15 | * with the distribution. 16 | * * Neither the name of Robotiq, Inc. nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * 33 | * Copyright (c) 2014, Robotiq, Inc 34 | */ 35 | 36 | /* 37 | * \file rq_int.h 38 | * \date June 19, 2014 39 | * \author Jonathan Savoie 40 | * \maintainer Jean-Philippe Roberge 41 | */ 42 | 43 | #ifndef RQ_INT_H_ 44 | #define RQ_INT_H_ 45 | 46 | typedef char INT_8; 47 | typedef short INT_16; 48 | typedef int INT_32; 49 | typedef long INT_64; 50 | 51 | typedef unsigned char UINT_8; 52 | typedef unsigned short UINT_16; 53 | typedef unsigned int UINT_32; 54 | typedef unsigned long UINT_64; 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /robotiq_ft_sensor/include/robotiq_ft_sensor/rq_sensor_com.h: -------------------------------------------------------------------------------- 1 | /* Software License Agreement (BSD License) 2 | * 3 | * Copyright (c) 2014, Robotiq, Inc. 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 10 | * * Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials provided 15 | * with the distribution. 16 | * * Neither the name of Robotiq, Inc. nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * 33 | * Copyright (c) 2014, Robotiq, Inc 34 | */ 35 | 36 | /* 37 | * \file rq_sensor_com.h 38 | * \date June 19, 2014 39 | * \author Jonathan Savoie 40 | * \maintainer Jean-Philippe Roberge 41 | */ 42 | 43 | #ifndef RQ_SENSOR_COM_H 44 | #define RQ_SENSOR_COM_H 45 | 46 | #include "rq_int.h" 47 | #include 48 | #include 49 | #include 50 | 51 | #define MP_BUFF_SIZE 1024 52 | 53 | INT_8 rq_sensor_com(); 54 | INT_8 rq_sensor_com(const std::string&); 55 | void rq_sensor_com_read_info_high_lvl(void); 56 | INT_8 rq_com_start_stream(void); 57 | void rq_com_listen_stream(void); 58 | bool rq_com_get_stream_detected(void); 59 | bool rq_com_get_valid_stream(void); 60 | 61 | //Accesseur 62 | void rq_com_get_str_serial_number(INT_8 * serial_number); 63 | void rq_com_get_str_firmware_version(INT_8 * firmware_version); 64 | void rq_com_get_str_production_year(INT_8 * production_year); 65 | float rq_com_get_received_data(UINT_8 i); 66 | bool rq_com_got_new_message(void); 67 | void rq_com_do_zero_force_flag(void); 68 | void stop_connection(void); 69 | 70 | #endif //RQ_SENSOR_COM_H 71 | -------------------------------------------------------------------------------- /robotiq_ft_sensor/include/robotiq_ft_sensor/rq_sensor_state.h: -------------------------------------------------------------------------------- 1 | /* Software License Agreement (BSD License) 2 | * 3 | * Copyright (c) 2014, Robotiq, Inc. 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 10 | * * Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials provided 15 | * with the distribution. 16 | * * Neither the name of Robotiq, Inc. nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * 33 | * Copyright (c) 2014, Robotiq, Inc 34 | */ 35 | 36 | /* 37 | * \file rq_sensor_state.h 38 | * \date June 19, 2014 39 | * \author Jonathan Savoie 40 | * \maintainer Jean-Philippe Roberge 41 | */ 42 | 43 | #ifndef RQ_SENSOR_STATE_H 44 | #define RQ_SENSOR_STATE_H 45 | 46 | 47 | #include "rq_int.h" 48 | #include 49 | #include 50 | 51 | 52 | /// (Re-)Definition of ROS-Service to keep this driver ROS-free 53 | /// Update after changes to srv/sensor_accessor.srv 54 | namespace SensorAccessor 55 | { 56 | enum Command 57 | { 58 | GET_SERIAL_NUMBER = 1, 59 | GET_FIRMWARE_VERSION = 2, 60 | GET_PRODUCTION_YEAR = 4, 61 | SET_ZERO = 8 62 | }; 63 | } 64 | 65 | 66 | enum rq_sensor_state_values 67 | { 68 | RQ_STATE_INIT, ///< State that initialize the com. with the sensor 69 | RQ_STATE_READ_INFO, ///< State that reads the firmware version, 70 | ///< serial number and production year 71 | RQ_STATE_START_STREAM, ///< State that start the sensor in streaming 72 | ///< mode 73 | RQ_STATE_RUN ///< State that reads the streaming data from 74 | ///< the sensor 75 | }; 76 | 77 | INT_8 rq_sensor_state(unsigned int max_retries); 78 | INT_8 rq_sensor_state(unsigned int max_retries, const std::string& ftdi_id); 79 | void rq_state_get_command(INT_8 const * const name, INT_8 * const value); 80 | bool rq_state_get_command(INT_8 command, INT_8 * const value); 81 | 82 | void rq_state_do_zero_force_flag(void); 83 | enum rq_sensor_state_values rq_sensor_get_current_state(void); 84 | bool rq_state_got_new_message(void); 85 | float rq_state_get_received_data(UINT_8 i); 86 | 87 | #endif //RQ_SENSOR_STATE_H 88 | -------------------------------------------------------------------------------- /robotiq_ft_sensor/launch/visualize_ft300.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /robotiq_ft_sensor/meshes/collision/mountings/robotiq_ft300-G-062-COUPLING_G-50-4M6-1D6_20181119.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_ft_sensor/meshes/collision/mountings/robotiq_ft300-G-062-COUPLING_G-50-4M6-1D6_20181119.STL -------------------------------------------------------------------------------- /robotiq_ft_sensor/meshes/collision/robotiq_ft300.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_ft_sensor/meshes/collision/robotiq_ft300.STL -------------------------------------------------------------------------------- /robotiq_ft_sensor/meshes/collision/robotiq_fts150.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_ft_sensor/meshes/collision/robotiq_fts150.stl -------------------------------------------------------------------------------- /robotiq_ft_sensor/meshes/visual/mountings/robotiq_ft300-G-062-COUPLING_G-50-4M6-1D6_20181119.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_ft_sensor/meshes/visual/mountings/robotiq_ft300-G-062-COUPLING_G-50-4M6-1D6_20181119.STL -------------------------------------------------------------------------------- /robotiq_ft_sensor/meshes/visual/robotiq_ft300.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_ft_sensor/meshes/visual/robotiq_ft300.STL -------------------------------------------------------------------------------- /robotiq_ft_sensor/meshes/visual/robotiq_fts150.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jr-robotics/robotiq/3aab6947e3cc8919e206972bc4a2187630cb0fb7/robotiq_ft_sensor/meshes/visual/robotiq_fts150.stl -------------------------------------------------------------------------------- /robotiq_ft_sensor/msg/ft_sensor.msg: -------------------------------------------------------------------------------- 1 | float32 Fx 2 | float32 Fy 3 | float32 Fz 4 | float32 Mx 5 | float32 My 6 | float32 Mz 7 | -------------------------------------------------------------------------------- /robotiq_ft_sensor/nodes/rq_test_sensor.cpp: -------------------------------------------------------------------------------- 1 | /* Software License Agreement (BSD License) 2 | * 3 | * Copyright (c) 2014, Robotiq, Inc. 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 10 | * * Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials provided 15 | * with the distribution. 16 | * * Neither the name of Robotiq, Inc. nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * 33 | * Copyright (c) 2014, Robotiq, Inc 34 | */ 35 | 36 | /** 37 | * \file rq_test_sensor.cpp 38 | * \date July 14, 2014 39 | * \author Jonathan Savoie 40 | * \maintainer Jean-Philippe Roberge 41 | */ 42 | 43 | #include "ros/ros.h" 44 | #include "std_msgs/String.h" 45 | #include "robotiq_ft_sensor/ft_sensor.h" 46 | #include "robotiq_ft_sensor/sensor_accessor.h" 47 | 48 | #include 49 | 50 | /*void receiveCallback(const std_msgs::String::ConstPtr& msg) 51 | { 52 | ROS_INFO("I heard: [%s]", msg->data.c_str()); 53 | }*/ 54 | 55 | void reCallback(const robotiq_ft_sensor::ft_sensor& msg) 56 | { 57 | ROS_INFO("I heard: FX[%f] FY[%f] FZ[%f] MX[%f] MY[%f] MZ[%f]", msg.Fx,msg.Fy,msg.Fz,msg.Mx,msg.My,msg.Mz); 58 | } 59 | 60 | /** 61 | * This tutorial demonstrates simple sending of messages over the ROS system. 62 | */ 63 | int main(int argc, char **argv) 64 | { 65 | 66 | ros::init(argc, argv, "rq_test_sensor"); 67 | 68 | 69 | ros::NodeHandle n; 70 | 71 | ros::ServiceClient client = n.serviceClient("robotiq_ft_sensor_acc"); 72 | ros::Subscriber sub1 = n.subscribe("robotiq_ft_sensor",100,reCallback); 73 | 74 | robotiq_ft_sensor::sensor_accessor srv; 75 | 76 | int count = 0; 77 | while (ros::ok()) 78 | { 79 | if(count == 10000000){ 80 | 81 | /// Deprecated Interface 82 | // srv.request.command = "SET ZRO"; 83 | 84 | /// New Interface with numerical commands 85 | srv.request.command_id = srv.request.COMMAND_SET_ZERO; 86 | 87 | if(client.call(srv)){ 88 | ROS_INFO("ret: %s", srv.response.res.c_str()); 89 | } 90 | count = 0; 91 | } 92 | 93 | ros::spinOnce(); 94 | 95 | ++count; 96 | } 97 | 98 | 99 | return 0; 100 | } 101 | -------------------------------------------------------------------------------- /robotiq_ft_sensor/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | robotiq_ft_sensor 4 | 1.0.0 5 |

Package for reading data from a Robotiq Force Torque Sensor

6 | Jean-Philippe Roberge 7 | Jonathan Savoie 8 | http://ros.org/wiki/robotiq 9 | 10 | BSD 11 | 12 | catkin 13 | 14 | roscpp 15 | std_msgs 16 | 17 | message_generation 18 | 19 | message_runtime 20 | 21 |
22 | -------------------------------------------------------------------------------- /robotiq_ft_sensor/srv/sensor_accessor.srv: -------------------------------------------------------------------------------- 1 | uint8 COMMAND_GET_SERIAL_NUMBER=1 2 | uint8 COMMAND_GET_FIRMWARE_VERSION=2 3 | uint8 COMMAND_GET_PRODUCTION_YEAR=4 4 | uint8 COMMAND_SET_ZERO=8 5 | uint8 command_id 6 | string command # deprecated, please use command_id with a value of COMMAND_* 7 | --- 8 | bool success 9 | string res 10 | -------------------------------------------------------------------------------- /robotiq_ft_sensor/urdf/examples_of_macros/example_use_robotiq_ft300.xacro: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /robotiq_ft_sensor/urdf/robotiq_ft300.urdf.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /robotiq_ft_sensor/urdf/robotiq_fts150.urdf.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /robotiq_modbus_rtu/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html 2 | cmake_minimum_required(VERSION 2.8.3) 3 | project(robotiq_modbus_rtu) 4 | find_package(catkin REQUIRED COMPONENTS rospy) 5 | 6 | #set the default path for built executables to the "bin" directory 7 | #set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) 8 | #set the default path for built libraries to the "lib" directory 9 | #set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) 10 | 11 | catkin_python_setup() 12 | 13 | ################################### 14 | ## catkin specific configuration ## 15 | ################################### 16 | ## The catkin_package macro generates cmake config files for your package 17 | ## Declare things to be passed to dependent projects 18 | ## LIBRARIES: libraries you create in this project that dependent projects also need 19 | ## CATKIN_DEPENDS: catkin_packages dependent projects also need 20 | ## DEPENDS: system dependencies of this project that dependent projects also need 21 | catkin_package( 22 | CATKIN_DEPENDS rospy 23 | ) 24 | -------------------------------------------------------------------------------- /robotiq_modbus_rtu/mainpage.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \mainpage 3 | \htmlinclude manifest.html 4 | 5 | \b robotiq_comm 6 | 7 | 10 | 11 | --> 12 | 13 | 14 | */ 15 | -------------------------------------------------------------------------------- /robotiq_modbus_rtu/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | robotiq_modbus_rtu 4 | 1.0.0 5 | A stack to communicate with Robotiq grippers using the Modbus RTU protocol 6 | Jean-Philippe Roberge 7 | BSD 8 | http://wiki.ros.org/robotiq 9 | Nicolas Lauzier (Robotiq inc.) 10 | Kelsey Hawkins 11 | 12 | catkin 13 | 14 | python3-pymodbus 15 | rospy 16 | 17 | 18 | -------------------------------------------------------------------------------- /robotiq_modbus_rtu/setup.py: -------------------------------------------------------------------------------- 1 | ## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD 2 | 3 | from distutils.core import setup 4 | from catkin_pkg.python_setup import generate_distutils_setup 5 | 6 | # fetch values from package.xml 7 | setup_args = generate_distutils_setup( 8 | packages=['robotiq_modbus_rtu'], 9 | package_dir={'': 'src'}, 10 | ) 11 | 12 | setup(**setup_args) 13 | -------------------------------------------------------------------------------- /robotiq_modbus_rtu/src/robotiq_modbus_rtu/__init__.py: -------------------------------------------------------------------------------- 1 | #autogenerated by ROS python message generators -------------------------------------------------------------------------------- /robotiq_modbus_rtu/src/robotiq_modbus_rtu/comModbusRtu.py: -------------------------------------------------------------------------------- 1 | # Software License Agreement (BSD License) 2 | # 3 | # Copyright (c) 2012, Robotiq, Inc. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following 14 | # disclaimer in the documentation and/or other materials provided 15 | # with the distribution. 16 | # * Neither the name of Robotiq, Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24 | # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | # POSSIBILITY OF SUCH DAMAGE. 32 | # 33 | # Copyright (c) 2012, Robotiq, Inc. 34 | # Revision $Id$ 35 | # 36 | # Modifed from the orginal comModbusTcp by Kelsey Hawkins @ Georgia Tech 37 | 38 | 39 | 40 | """@package docstring 41 | Module comModbusRtu: defines a class which communicates with Robotiq Grippers using the Modbus RTU protocol. 42 | 43 | The module depends on pymodbus (http://code.google.com/p/pymodbus/) for the Modbus RTU client. 44 | """ 45 | 46 | from __future__ import print_function 47 | 48 | from pymodbus.client.sync import ModbusSerialClient 49 | from math import ceil 50 | 51 | class communication: 52 | 53 | def __init__(self): 54 | self.client = None 55 | 56 | def connectToDevice(self, device): 57 | """Connection to the client - the method takes the IP address (as a string, e.g. '192.168.1.11') as an argument.""" 58 | self.client = ModbusSerialClient(method='rtu',port=device,stopbits=1, bytesize=8, baudrate=115200, timeout=0.2) 59 | if not self.client.connect(): 60 | print("Unable to connect to {}".format(device)) 61 | return False 62 | return True 63 | 64 | def disconnectFromDevice(self): 65 | """Close connection""" 66 | self.client.close() 67 | 68 | def sendCommand(self, data): 69 | """Send a command to the Gripper - the method takes a list of uint8 as an argument. The meaning of each variable depends on the Gripper model (see support.robotiq.com for more details)""" 70 | #make sure data has an even number of elements 71 | if(len(data) % 2 == 1): 72 | data.append(0) 73 | 74 | #Initiate message as an empty list 75 | message = [] 76 | 77 | #Fill message by combining two bytes in one register 78 | for i in range(0, len(data)//2): 79 | message.append((data[2*i] << 8) + data[2*i+1]) 80 | 81 | #To do!: Implement try/except 82 | self.client.write_registers(0x03E8, message, unit=0x0009) 83 | 84 | def getStatus(self, numBytes): 85 | """Sends a request to read, wait for the response and returns the Gripper status. The method gets the number of bytes to read as an argument""" 86 | numRegs = int(ceil(numBytes/2.0)) 87 | 88 | #To do!: Implement try/except 89 | #Get status from the device 90 | response = self.client.read_holding_registers(0x07D0, numRegs, unit=0x0009) 91 | 92 | #Instantiate output as an empty list 93 | output = [] 94 | 95 | #Fill the output with the bytes in the appropriate order 96 | for i in range(0, numRegs): 97 | output.append((response.getRegister(i) & 0xFF00) >> 8) 98 | output.append( response.getRegister(i) & 0x00FF) 99 | 100 | #Output the result 101 | return output 102 | -------------------------------------------------------------------------------- /robotiq_modbus_tcp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html 2 | cmake_minimum_required(VERSION 2.8.3) 3 | project(robotiq_modbus_tcp) 4 | find_package(catkin REQUIRED COMPONENTS rospy) 5 | 6 | #set the default path for built executables to the "bin" directory 7 | #set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) 8 | #set the default path for built libraries to the "lib" directory 9 | #set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) 10 | 11 | catkin_python_setup() 12 | 13 | ################################### 14 | ## catkin specific configuration ## 15 | ################################### 16 | ## The catkin_package macro generates cmake config files for your package 17 | ## Declare things to be passed to dependent projects 18 | ## LIBRARIES: libraries you create in this project that dependent projects also need 19 | ## CATKIN_DEPENDS: catkin_packages dependent projects also need 20 | ## DEPENDS: system dependencies of this project that dependent projects also need 21 | catkin_package( 22 | CATKIN_DEPENDS rospy 23 | ) 24 | -------------------------------------------------------------------------------- /robotiq_modbus_tcp/mainpage.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \mainpage 3 | \htmlinclude manifest.html 4 | 5 | \b robotiq_comm 6 | 7 | 10 | 11 | --> 12 | 13 | 14 | */ 15 | -------------------------------------------------------------------------------- /robotiq_modbus_tcp/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | robotiq_modbus_tcp 4 | 1.0.0 5 | A stack to communicate with Robotiq grippers using the Modbus TCP protocol 6 | Jean-Philippe Roberge 7 | BSD 8 | http://wiki.ros.org/robotiq 9 | Nicolas Lauzier (Robotiq inc.) 10 | 11 | catkin 12 | 13 | python3-pymodbus 14 | rospy 15 | 16 | -------------------------------------------------------------------------------- /robotiq_modbus_tcp/setup.py: -------------------------------------------------------------------------------- 1 | ## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD 2 | 3 | from distutils.core import setup 4 | from catkin_pkg.python_setup import generate_distutils_setup 5 | 6 | # fetch values from package.xml 7 | setup_args = generate_distutils_setup( 8 | packages=['robotiq_modbus_tcp'], 9 | package_dir={'': 'src'}, 10 | ) 11 | 12 | setup(**setup_args) 13 | -------------------------------------------------------------------------------- /robotiq_modbus_tcp/src/robotiq_modbus_tcp/__init__.py: -------------------------------------------------------------------------------- 1 | #autogenerated by ROS python message generators -------------------------------------------------------------------------------- /robotiq_modbus_tcp/src/robotiq_modbus_tcp/comModbusTcp.py: -------------------------------------------------------------------------------- 1 | # Software License Agreement (BSD License) 2 | # 3 | # Copyright (c) 2012, Robotiq, Inc. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions 8 | # are met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following 14 | # disclaimer in the documentation and/or other materials provided 15 | # with the distribution. 16 | # * Neither the name of Robotiq, Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24 | # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | # POSSIBILITY OF SUCH DAMAGE. 32 | # 33 | # Copyright (c) 2012, Robotiq, Inc. 34 | # Revision $Id$ 35 | 36 | 37 | 38 | """@package docstring 39 | Module comModbusTcp: defines a class which communicates with Robotiq Grippers using the Modbus TCP protocol. 40 | 41 | The module depends on pymodbus (http://code.google.com/p/pymodbus/) for the Modbus TCP client. 42 | """ 43 | 44 | from pymodbus.client.sync import ModbusTcpClient 45 | from pymodbus.register_read_message import ReadInputRegistersResponse 46 | from math import ceil 47 | import time 48 | import threading 49 | 50 | class communication: 51 | 52 | def __init__(self): 53 | self.client = None 54 | self.lock = threading.Lock() 55 | 56 | def connectToDevice(self, address): 57 | """Connection to the client - the method takes the IP address (as a string, e.g. '192.168.1.11') as an argument.""" 58 | self.client = ModbusTcpClient(address) 59 | 60 | def disconnectFromDevice(self): 61 | """Close connection""" 62 | self.client.close() 63 | 64 | def sendCommand(self, data): 65 | """Send a command to the Gripper - the method takes a list of uint8 as an argument. The meaning of each variable depends on the Gripper model (see support.robotiq.com for more details)""" 66 | #make sure data has an even number of elements 67 | if(len(data) % 2 == 1): 68 | data.append(0) 69 | 70 | #Initiate message as an empty list 71 | message = [] 72 | 73 | #Fill message by combining two bytes in one register 74 | for i in range(0, len(data)//2): 75 | message.append((data[2*i] << 8) + data[2*i+1]) 76 | 77 | #To do!: Implement try/except 78 | with self.lock: 79 | self.client.write_registers(0, message) 80 | 81 | def getStatus(self, numBytes): 82 | """Sends a request to read, wait for the response and returns the Gripper status. The method gets the number of bytes to read as an argument""" 83 | numRegs = int(ceil(numBytes/2.0)) 84 | 85 | #To do!: Implement try/except 86 | #Get status from the device 87 | with self.lock: 88 | response = self.client.read_input_registers(0, numRegs) 89 | 90 | #Instantiate output as an empty list 91 | output = [] 92 | 93 | #Fill the output with the bytes in the appropriate order 94 | for i in range(0, numRegs): 95 | output.append((response.getRegister(i) & 0xFF00) >> 8) 96 | output.append( response.getRegister(i) & 0x00FF) 97 | 98 | #Output the result 99 | return output 100 | --------------------------------------------------------------------------------