Package org.robwork.sdurw_graspplanning
Class GraspTable
- java.lang.Object
-
- org.robwork.sdurw_graspplanning.GraspTable
-
public class GraspTable extends java.lang.ObjectA table of grasp configurations that has been generated using a robot hand,
a number of preshapes, and some grasp policy.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGraspTable.GraspDatadata for describing a single grasp
-
Field Summary
Fields Modifier and Type Field Description static longGTABLE_VERSIONthis version increase each time the file format is changed
-
Constructor Summary
Constructors Constructor Description GraspTable(long cPtr, boolean cMemoryOwn)GraspTable(java.lang.String handName, java.lang.String objectId)constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGrasp(GraspTable.GraspData data)add a grasp to this GraspTablevoiddelete()intgetCalibForceIndex()gets the index of the calibration force if its used.static longgetCPtr(GraspTable obj)SWIGTYPE_p_std__vectorT_rw__graspplanning__GraspTable__GraspData_tgetData()get all grasp datajava.lang.StringgetHandName()get name of handjava.lang.StringgetObjectName()get name of objectPair_i_igetTactileArrayDim(int i)get the dimensions of the i'th tactile arraybooleanhasCalibForce()check if this table has calib force datastatic SWIGTYPE_p_rw__core__PtrT_rw__graspplanning__GraspTable_tload(java.lang.String filename)load a grasp table from fileintnrTactileArrayGrasp()get the number of tactile arrays on this handvoidsave(java.lang.String filename)save this grasp table to file filenamevoidsetCalibForceIndex(int idx)set the index of the calibration forcelongsize()get the nr of grasps in this GraspTable
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(GraspTable obj)
-
delete
public void delete()
-
getCalibForceIndex
public int getCalibForceIndex()
gets the index of the calibration force if its used. The calibration force is
stored in the 'quality' list in the GraspData objects.- Returns:
- index of calibration force if used, -1 otherwise
-
setCalibForceIndex
public void setCalibForceIndex(int idx)
set the index of the calibration force- Parameters:
idx- [in] calibration force index
-
addGrasp
public void addGrasp(GraspTable.GraspData data)
add a grasp to this GraspTable- Parameters:
data- [in] Grasp data
-
size
public long size()
get the nr of grasps in this GraspTable- Returns:
- nr of grasps in this GraspTable
-
getData
public SWIGTYPE_p_std__vectorT_rw__graspplanning__GraspTable__GraspData_t getData()
get all grasp data- Returns:
- vector of grasps
-
getHandName
public java.lang.String getHandName()
get name of hand- Returns:
- name of hand
-
getObjectName
public java.lang.String getObjectName()
get name of object- Returns:
- name of object
-
nrTactileArrayGrasp
public int nrTactileArrayGrasp()
get the number of tactile arrays on this hand- Returns:
-
getTactileArrayDim
public Pair_i_i getTactileArrayDim(int i)
get the dimensions of the i'th tactile array- Parameters:
i- [in] the tactile array id- Returns:
-
hasCalibForce
public boolean hasCalibForce()
check if this table has calib force data- Returns:
- true if this table has calib force data (equal to getCalibForceIndex()>=0), false
otherwise
-
load
public static SWIGTYPE_p_rw__core__PtrT_rw__graspplanning__GraspTable_t load(java.lang.String filename)
load a grasp table from file- Parameters:
filename- [in] name of file- Returns:
- GraspTable
-
save
public void save(java.lang.String filename)
save this grasp table to file filename- Parameters:
filename- [in] name of file
-
-