- CMake >= 3.20
- gcc/g++ >= 10
- SuiteSparse = 7.3.1
- xrandr
- xinerama
- xcursor
- xi
- OpenGL
- zlib
# install with apt
sudo apt install libsuitesparse-dev
sudo apt install libxrandr-dev
sudo apt install libxinerama-dev
sudo apt install libxcursor-dev
sudo apt install libxi-dev
sudo apt install libgl1-mesa-dev
sudo apt install zlib1g-devBuild the project, and the executable will be generated in the build directory.
cmake -Bbuild build # configure
cmake --build build --parallel [N_threads] # build-
Run the experiment
- Run experiment script
python scripts/run_experiments.py
- Check out the experiment result directory
output/experiments/[timestamp], and the log files inoutput/logs/[expName].log.output/experiments/[timestamp]/config.jsoncontains the experiment configuration.output/experiments/[timestamp]/objs/contains- the deformed object meshes (
[objName]_[frameId].obj) - the object state files (
[objName]_[frameId].json)
- the deformed object meshes (
- Run experiment script
-
Postprocess and obtain marker displacements
- Create
output/experiments_markersdirectory if not exists. - Move/Copy the result directories into
output/experiments_markers. - Run the postprocess script
python process/gen_marker_disp.py
- Check out the marker displacement files in
output/experiments_markers/[expName]/markers/.
- Create
-
(optional) Visualize the marker displacements
- Run the visualization script
python process/vis_marker_disp.py
- Check out the visualization in
output/experiments_markers/[expName]/marker.mp4.
- Run the visualization script
- Run the experiment
stdbuf -o0 ./build/main \ press_example \ true \ true \ 1e-20 \ 10 \ true \ resources/gel/gelslim-gel-l_0.1/gelslim-gel-l_0.1.msh \ resources/press_obj/Wave_8134.obj \ resources/gel/gelslim-gel-l_0.1/isBC_gelslim-gel-l_0.1.json \ 0 \ press \ 6 \ 1 \ 25 \ 0 \ 25 \ 0.01 \ > output/logs/press_example.log - Postprocess and obtain marker displacements (same as above)
-
Run experiment with custom configurations
Modify
scripts/config.pyandrun_experiments.py, or just run command followingstdbuf -o0 ./build/main \ [expName] \ [enableGui] \ [enableCGSolver] \ [cgRel] \ [PNCap] \ [enableInversionPrevention] \ [gelPth] \ [objPth] \ [isBCPth] \ [fricMu] \ [moveType] \ [pressSteps] \ [pressDepth] \ [pressVel] \ [taskSteps] \ [moveVel] \ [dt] \ > [logPth] -
Postprocess custom tactile sensor gel
- Prepare your tactile sensor gel mesh and boundary condition file.
- The gel mesh should be tetrahedral and in
.mshformat. The length should be in milimeters. - The boundary condition file should be in
.jsonformat. It is a list of binary numbers, where1indicates the corresponding node is fixed, and0indicates the node is free to move.
- The gel mesh should be tetrahedral and in
- Take
gel_0.objafter experiment as surface mesh(recommended), or extract it mannually. - Generate the triangular barycentric weights on the surface mesh for markers, and save as
marker_bc_ws.pklin the same directory as your.mshgel mesh. You may refer toprocess/gen_markers.py. - Postprocess as usual.
- Prepare your tactile sensor gel mesh and boundary condition file.
-
Custom tasks
Refer to
main.cuto implement your own tasks.- Program entrance
- Modify arguments in
main()
- Modify arguments in
- Task implementation (in
prepare())- Modify configuration to be dumped in
config - Modify solver settings
- Modify
movelambda to implement your own task (usually changing the target state a bit each step)
- Modify configuration to be dumped in
- Program entrance
If you use TacIPC in your work, please cite us.
@article{tacipc2024,
title={TacIPC: Intersection-and Inversion-free FEM-based Elastomer Simulation For Optical Tactile Sensors},
author={Du, Wenxin and Xu, Wenqiang and Ren, Jieji and Yu, Zhenjun and Lu, Cewu},
journal={IEEE Robotics and Automation Letters},
year={2024},
publisher={IEEE}
}