|
| 1 | +<h1>wsg50-ros-pkg</h1> |
| 2 | + |
| 3 | +<p>Forked from: <a href="https://code.google.com/p/wsg50-ros-pkg">https://code.google.com/p/wsg50-ros-pkg</a></p> |
| 4 | + |
| 5 | +<p>See also Wiki: <a href="https://code.google.com/p/wsg50-ros-pkg/wiki/wsg_50">https://code.google.com/p/wsg50-ros-pkg/wiki/wsg_50</a></p> |
| 6 | + |
| 7 | +<h2>Node wsg_50_tcp</h2> |
| 8 | + |
| 9 | +<h3>Parameters</h3> |
| 10 | + |
| 11 | +<ul> |
| 12 | +<li><em>ip</em>: IP address of gripper</li> |
| 13 | +<li><em>port</em>: Port of gripper</li> |
| 14 | +<li><em>local_port</em>: Local port for UDP</li> |
| 15 | +<li><em>protocol</em>: udp or tcp (default)</li> |
| 16 | +<li><em>com_mode</em>: polling (default), script or auto_update. See communication modes below.</li> |
| 17 | +<li><em>rate</em>: Polling rate in Hz.</li> |
| 18 | +<li><em>grasping_force</em>: Set grasping force limit on startup</li> |
| 19 | +</ul> |
| 20 | + |
| 21 | +<h3>Services</h3> |
| 22 | + |
| 23 | +<p>See <a href="https://code.google.com/p/wsg50-ros-pkg/wiki/wsg_50">https://code.google.com/p/wsg50-ros-pkg/wiki/wsg_50</a>. Services currently block the reception of state updates.</p> |
| 24 | + |
| 25 | +<h3>Topics</h3> |
| 26 | + |
| 27 | +<ul> |
| 28 | +<li><em>~/goal_position [IN, wsg_50_common/Cmd], Modes: script, auto_update:</em> Position goal; send target position in mm and speed</li> |
| 29 | +<li><em>~/goal_speed [IN, std_msgs/Float32], Modes: script:</em> Velocity goal (in mm/s); positive values open the gripper</li> |
| 30 | +<li><em>~/moving [OUT, std_msgs/Bool], Modes: script, auto_update:</em> Signals a change in the motion state for position control. Can be used to wait for the end of a gripper movement. Signaling does not work correctly get for velocity control, since the gripper state register does not directly provide this information.</li> |
| 31 | +<li><em>~/state [OUT, std_msgs/State]:</em> State information (opening width, speed, forces). Note: Not all fields are available with all communication modes.</li> |
| 32 | +<li><em>/joint_states [OUT]:</em> Standard joint state message</li> |
| 33 | +</ul> |
| 34 | + |
| 35 | +<h3>Communication modes (closed-loop control)</h3> |
| 36 | + |
| 37 | +<p>Select by <em>com_mode</em> parameters.</p> |
| 38 | + |
| 39 | +<ul> |
| 40 | +<li><p><strong>Polling</strong><br /> |
| 41 | +Gripper state is polled regularly using built-in commands. Services (e.g. move) block the polling as long as the gripper moves; the topic interface is not available. Up to 15 Hz could be reached with the WSG-50 hardware revision 2.</p></li> |
| 42 | +<li><p><strong>Script</strong><br /> |
| 43 | +Allows for closed-loop control with a custom script (see below) that supports up to 2 FMF finger. Gripper state is read synchronously with the specified rate. Up to 30 Hz could be reached with the WSG-50 hardware revision 2. The gripper can be controlled asynchronously by sending position or velocity goals to the topics shown below. Commands will be sent with the next read command in the timer callback timer_cb().<br /> |
| 44 | +The services can still be used - yet, they are blocking the gripper communication. There are no state updates while the gripper is moved by a service. </p></li> |
| 45 | +<li><p><strong>Auto_update</strong><br> |
| 46 | +Requests periodic updates of the gripper state (position, speed, force; less than with the script). Up to 140 Hz could be reached with the WSG-50 hardware revision 2. All responses of the gripper must be received by a reading thread which also publishes the ROS messages. Therefore, the commands in functions.cpp cannot be used. Position targets are sent asynchronously to the gripper using the built-in commands. As with the script option, there is a noticeable delay until the movement starts.<br /> |
| 47 | +The services are disabled.</p></li> |
| 48 | +</ul> |
| 49 | + |
| 50 | +<h4>Gripper script</h4> |
| 51 | + |
| 52 | +<p>The script <em>cmd_measure.lua</em> must be running on the gripper for closed-loop control mode. It allows for non-blocking position and velocity control and responds with the current position, speed, motor force and up to to two FMF finger forces. The custom commands 0xB0 (read only), 0xB1 (read, goal position and speed), 0xB2 (read, goal speed) are used. Tested with firmware version 2.6.4. There have been minor API changes compared to 1.x.</p> |
0 commit comments