Variable Stiffness Control and Rubbing¶
The variable stiffness module provides three services. The following is written for
r1_gripper, and is similar for
- Calibration: Initially, the variable stiffness motors must be moved to the zero position. This is done by a call to the
- Setting the stiffness: The
r1_gripper/SetRubbingStiffnessservice takes the stiffness parameter between 0 (minimum) and 15 (maximum) and instructs the variable stiffness motors to the correct position.
- Rubbing motion: The variable stiffness motors can be used to create a rubbing motion by the gripper through a call to the
r1_gripper/Rubservice. This service takes the number of times the gripper should perform the rubbing as parameter.
Arduino preparation (optional) in case of uploading Arduino code again. The installation of Arduino IDE for Ubuntu can be done following the instruction from http://blog.markloiseau.com/2012/05/install-arduino-ubuntu
Checking the USB port's number of the Variable Stiffness module of the Clopema gripper
The USBport is shown as ttyUSB0 for ARDUINO NANO
... [24412.986199] usb 7-1: Product: ARDUINO NANO [24412.986203] usb 7-1: Manufacturer: Gravitech [24412.986208] usb 7-1: SerialNumber: 13JP0077 [24412.992240] ftdi_sio 7-1:1.0: FTDI USB Serial Device converter detected [24412.992302] usb 7-1: Detected FT232RL [24412.992307] usb 7-1: Number of endpoints 2 [24412.992312] usb 7-1: Endpoint 1 MaxPacketSize 64 [24412.992317] usb 7-1: Endpoint 2 MaxPacketSize 64 [24412.992321] usb 7-1: Setting MaxPacketSize 64 [24412.994262] usb 7-1: FTDI USB Serial Device converter now attached to ttyUSB0
Execute the rubbing node¶
Run the rubbing node with the correct usb port
$ catkin_make # if rubbing.cpp is modified $ . devel/setup.bash # source the setting file $ rosrun rubbing rubbing_node /dev/<ttyUSBport> # connect to USB port of the variable stiffness module
Call services of the rubbing node¶
Run different services of the node
- Calibration service
This service sets the zero position of the variable stiffness module. The stiffness is set to zero (the most compliant stage of the gripper). This service has to be called before any other service.
$ rosservice call /r1_gripper/CalibrateRubbing # call calibrate service
- Stiffness control service
The stiff level of the gripper varies from 0 to 15. The higher level of stiffness the more stiff the gripper is.
$ rosservice call /r1_gripper/SetRubbingStiffness "stiffness: 10" # set the stiffness level to 10
- Rubbing movement control service
Before calling rubbing service, the stiffness should be set at 15. This service performs the rubbing motion between the two fingers. The required parameter is the number of rubbing movement.
$ rosservice call /r1_gripper/Rub "times: 3" # rub the two fingers 3 times