| ![]() |
2.8 Grippergripper_set_positiongripper_enable_position, gripper_enable_resistivity, gripper_disable_position, gripper_disable_resistivity gripper_get_position, gripper_get_resistivity gripper_set_positionNAMEgripper_set_position -- open or close the gripperSYNOPSIS#include <device/gripper.h>void gripper_set_position (DeviceTag gripper, gfloat position); DESCRIPTIONThe gripper_set_position function allows the user to close or open the gripper depending on the specified position value which represents the aperture of the gripper device, expressed in meters. Hence a value of 0 will close the gripper and a value of 0.04 will open the gripper 4 cm wide. gripper_enable_positionNAMEgripper_enable_position, gripper_enable_resistivity, gripper_disable_position, gripper_disable_resistivity -- enable or disable the position and resistivity sensors on a gripperSYNOPSIS#include <device/gripper.h>void gripper_enable_position (DeviceTag gripper, guint16 ms); void gripper_enable_resistivity (DeviceTag gripper, guint16 ms); void gripper_disable_position (DeviceTag gripper); void gripper_disable_resistivity (DeviceTag gripper); DESCRIPTIONThese functions enable each ms milliseconds or disable the gripper position and resistivity measurement. gripper_get_positionNAMEgripper_get_position, gripper_get_resistivity -- return the position and resistivity values measured on the gripperSYNOPSIS#include <device/gripper.h>gfloat gripper_get_position (DeviceTag gripper); gfloat gripper_get_resistivity (DeviceTag gripper); DESCRIPTIONThe gripper_get_position function returns the position measurement performed on the speficied gripper device. The position is expressed in meters and corresponds to the aperture of the gripper as with the gripper_set_position function. However, it returns the current position of the gripper and not the target position specified with gripper_set_position (which may be the same value when the target position is reached). This function may be useful to measure the size of a gripped object. The gripper_get_resistivity function returns the resistivity measurement performed on the specified gripper device. This value is expressed in ohm. In this first version, we assume that any object has a resistivity of one ohm. It will return Inf when no object is gripped and 1.0 when an object is gripped. ![]() ![]() ![]() ^ page top ^ |
E-mail to webmaster | Last updated: | Copyright © 2002 Cyberbotics Ltd. |