python scripts to control the hiro/nxo/hrp5p
The following libraries are used
- Panda3D
- Networkx
- Numpy, Scipy
- MySQLdb
The following executable programs are used:
- MySQL set (including server, bench, dump, etc.)
- Import 20170113freegrip.sql as into the DBMS system first.
The program follows these common sense:
- A 3d point or nd vector is represented using one row of np.array list
- A n-by-3 matrix is represented by n rows of np.array list
##Executing the program for Fixture Regrasp
- fixture
- prepare object,fixture stl model.(mentionthat the fixture model contains its postion,the object model is near (0,0,0))
- Compute the grasps using freegrip_air.py (under manipulation/regrasp_onworkcell/grip)
- Compute the drop stable pose by dropworkcell.py(under manipulation/regrasp_onworkcell/dropsimulation)
- Compute the ik-feasible grasps all over a workcell using dropworkcellgrip.py (under manipulation/regrasp_onworkcell/grip)
- Plot and compute motion Sequence by nxtglplot(under manipulation/regrasp_onworkcell/examples), build the regrasp graph is in regriptpp.py (under manipulation/regrasp_onworkcell)
- table
- Compute the grasps using freegrip_air.py (under manipulation/regrasp_onworkcell/grip)(if it has been compute in fixture program,there is no need to compute again)
- Compute the stable placements using freetabletopplacement.py (under manipulation/regrasp_onworkcell/grip)
- Compute the stable placements and ik-feasible grasps all over a table surface using tableplacements.py (under manipulation/regrasp)
- Build the regrasp graph using regriptpp.py (under manipulation/regrasp) Step 4 is integrated in regrasp/examples/nxtsglplot.py, see the final results by executing this file.
- experiments: compute mant task
- generate startgoal first using startgoalgenerate,
- then prepare task ik first using taskik.py
- then build regrasp map using regriptpp_quick.py,so the build regrasp will be very fast about 0.02s each task.(regripp.py version time is 1.6s)
- in examples.the nxtglplot_experiment_quick will use regripp_quick.nxtglplotreal is for real robot,pathplot is for plot regrasp length and task sucess rate.(tbc:fixture table basket camera)
- real robot: Nextage
- table regrasp:nxtsglplotreal(regrasp/examples)
- fixture regrasp:nxtsglplotreal(regrasp_onworkcell/examples)
##database
- pay attention to the database(right and clean)
Delete the grasp data (in MySQL workbench):
SET FOREIGN_KEY_CHECKS=0;
truncate table freegrip.tabletopplacements;
truncate table freegrip.tabletopgrips;
truncate table freegrip.ik;
truncate table freegrip.freeairgrip;
truncate table freegrip.freetabletopplacement;
truncate table freegrip.freetabletopgrip;
SET FOREIGN_KEY_CHECKS=1;
Delete the tabletop regrasp data (in MySQL workbench):
SET FOREIGN_KEY_CHECKS=0;
truncate table tabletopplacements;
truncate table tabletopgrips;
truncate table ik;
SET FOREIGN_KEY_CHECKS=1;
Delete the fixture regrasp data (in MySQL workbench):
SET FOREIGN_KEY_CHECKS=0;
truncate table freegrip.freeairgrip;
truncate table freegrip.ik_drop;
truncate table freegrip.dropfreegrip;
truncate table freegrip.dropstablepos;
truncate table freegrip.dropworkcellgrip;
SET FOREIGN_KEY_CHECKS=1;
- pay attention to objpath,workcellpath, the stl model(check size and position in blender)
###in dropsimulation: dropworcell.py
- experiment time: parameter ntimes,def updateODE limittime,
- setup drop pos:def addobj setpos,height,
- setup check stable:def checkrange minxminy,checkdiff,check repeat) ###in example:
nxtsglplot.py,nxtsglplotreal.py
- determine which path to show : id
regriptpp_quick.py
- loadgripstobuildgraph, there is choice to control the num of droptablepos to show the time effect results)
startgoalgenerate.py
- tasks position range: grids-x,y
- tasks angle range: discretesize in def savetoDB ###in grip: freegrip_air.py
- reduceradius-lower more airgrips,
- torqueresist-lower less grip
freetableplacement.py
- dhover-0.15,0.12 higher less placement