## For instruction on writing tutorials ## http://www.ros.org/wiki/WritingTutorials #################################### ##FILL ME IN #################################### ## for a custom note with links: ## for the canned note of "This tutorial assumes that you have completed the previous tutorials:" just add the links ## note.0= ## descriptive title for the tutorial ## title = Control of an RG2 / RG6 Gripper using the Modbus / TCP protocol (ROS Noetic) ## multi-line description to be displayed in search ## description = This tutorial explains how to use the "onrobot_rg_control" and "onrobot_rg_modbus_tcp" packages to control an RG2 / RG6 Gripper configured with the Modbus / TCP protocol. ## the next tutorial description (optional) ## next = ## links to next tutorial (optional) ## next.0.link= ## next.1.link= ## what level user is this tutorial for ## level= BeginnerCategory ## keywords = #################################### <> <> == Prerequisites == This tutorial assumes that you have an RG2 / RG6 Gripper configured with the Modbus / TCP protocol. The Gripper should be connected to a network, which has been properly configured. Finally, make sure that the external dependency for the package "onrobot_rg_modbus_tcp" has been installed. The dependency is the python package pymodbus. {{{ $ rosdep install onrobot_rg_modbus_tcp }}} === Network configuration === Make sure that the ethernet card in your PC to which your gripper is connected has the following static IP network configuration: {{attachment:onrobot_network_setup.jpg}} The static IP address of the PC (192.168.1.10) can be any IP address different from the hand's IP address (whose default is 192.168.1.1). == ROS Nodes to Control the RG Gripper == === Run the RG Gripper Driver Node === The Gripper is driven by the node "OnRobotRGTcpNode.py" contained in the package "onrobot_rg_control". The IP address of the Gripper has to be provided as an argument. For example, the driver for controlling an RG2 /RG6 Gripper with the IP address 192.168.1.1 is launched using the following command: {{{ $ roslaunch onrobot_rg_control bringup.launch ip:=192.168.1.1 }}} === Run the RG Gripper Status Listener Node === In the package "onrobot_rg_control", there is also a node for listening to and interpreting the status of the Gripper. The driver publishes the status of the Gripper on "OnRobotRGInput". The status listener node can be run together with the driver node using the following same command: {{{ $ roslaunch onrobot_rg_control bringup.launch ip:=192.168.1.1 }}} {{attachment:status_listener.jpg}} === Run the RG Gripper Simple Controller Node === The driver listens for messages on "OnRobotRGOutput". The messages are interpreted and commands are sent to the gripper accordingly. A simple controller node is provided which can be run (at another terminal) using: {{{ $ rosrun onrobot_rg_control OnRobotRGSimpleController.py }}} {{attachment:simple_controller.jpg}} The simple controller node can therefore be modified to send custom commands to the Gripper. ## AUTOGENERATED DO NOT DELETE ## TutorialCategory ## FILL IN THE STACK TUTORIAL CATEGORY HERE