{"id":35093856,"url":"https://github.com/mhered/tactile_sensor","last_synced_at":"2026-03-16T08:31:57.836Z","repository":{"id":303260111,"uuid":"1014821899","full_name":"mhered/tactile_sensor","owner":"mhered","description":"Adding tactile sensors to my robots","archived":false,"fork":false,"pushed_at":"2025-07-06T16:14:37.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-06T17:30:39.216Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mhered.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-06T13:38:22.000Z","updated_at":"2025-07-06T16:14:41.000Z","dependencies_parsed_at":"2025-07-06T17:32:01.722Z","dependency_job_id":"8ccd34f7-f660-4de1-bc04-42637907ee6e","html_url":"https://github.com/mhered/tactile_sensor","commit_stats":null,"previous_names":["mhered/tactile_sensor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mhered/tactile_sensor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhered%2Ftactile_sensor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhered%2Ftactile_sensor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhered%2Ftactile_sensor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhered%2Ftactile_sensor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhered","download_url":"https://codeload.github.com/mhered/tactile_sensor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhered%2Ftactile_sensor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28080200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-27T02:00:05.897Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-27T15:03:24.788Z","updated_at":"2025-12-27T15:04:47.769Z","avatar_url":"https://github.com/mhered.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# README.md\n\nAdding tactile sensors to my robots\n\nPlanning to use eFlesh: [Website: e-flesh.com](https://e-flesh.com/) | [Github repo](https://github.com/notvenky/eFlesh)\n\nWhich in turn seems inspired by [Reskin](https://reskin.dev/)\n\nI am planning to instrument the [PincOpen gripper](https://pollen-robotics.github.io/PincOpen/) and install it on the [SO100ARM robotic arm](https://github.com/TheRobotStudio/SO-ARM100).\n\nMy intention is to open source the result. There is a very active growing community around the [lerobot project](https://github.com/huggingface/lerobot) sharing AI robotics training data. Today training is mainly using video, but making a low-cost tactile sensor available would allow using also touch inputs, which would open up many great possibilities\n\n## BOM\n\n* 3D Printing Filament 1.75mm TPU 95A (Flexible, Transparent Blue color) from [Amazon](https://www.amazon.es/dp/B07WGK7J48): 12.13€\n\n* A pack of 220 ZENYKX 3x1mm N52 magnets from [Amazon](https://www.amazon.es/dp/B0DDH9M2YY): 8.99€ \u003e may be too small\n\n* A pack of 120 Wzone 5x2mm magnets from [Amazon](https://www.amazon.es/dp/B0CPT2S1XR): 9.99€  \u003e not clear these are N52\n\n* A pack of 50 Aprilheld 5x2mm N52 magnets from [Amazon](https://www.amazon.es/dp/B0D3YQ5KH3): 16.99€ \u003e using these\n\n* A Reskin sensor (60$ including shipping / tax) but Gerbers and BOM are available to send the PCBA for manufacturing, see: https://github.com/raunaqbhirangi/reskin_sensor/tree/main/circuits\n\n* a QT Py\n\n* a Qwiic/STEMMA cable\n\n* a USB-C to USB-A cable\n\n\n\n## 3D printing\n\nFilament specs \u0026 manufacturer print settings:\n\n* Filament diameter: 1.75 mm\n\n* Dimensional accuracy: +/- 0.05 mm\n\n* Extruder temperature: 190°C - 220°C\n\n* Bed temperature: 40°C - 60°C\n\n* Print speed: 10 - 30 mm/s\n\n## Installation on Ubuntu 24.04 + Conda\n\n### 1. Clone the repository with submodules\n\n```bash\ngit clone --recurse-submodules https://github.com/notvenky/eFlesh.git\ncd eFlesh\n```\n\n**Note:**\n I had no Github SSH keys set up in my machine, so I got the following error:\n\n```\ngit@github.com: Permission denied (publickey)\nfatal: Could not read from remote repository.\n```\n\nFixed this setting up SSH keys in my machine iaw [GitHub’s official guide](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent). After we can delete and clone again or just resume with:\n\n```bash\ngit submodule update --init --recursive\n```\n\n### 2. Create and activate the Conda environment\n\n```bash\nconda env create -f env.yml\nconda activate eflesh\n```\n\n### 3. Install Boost 1.83 and oneTBB using Conda\n\n```bash\nconda install -c conda-forge boost=1.83 tbb gmp mpfr notebook\n```\n\n### 4. Set up persistent environment variables\n\nCreate an activation hook:\n\n```bash\nmkdir -p $CONDA_PREFIX/etc/conda/activate.d\nnano $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh\n```\n\nPaste the following:\n\n```bash\nexport BOOST_ROOT=$CONDA_PREFIX\nexport TBB_ROOT=$CONDA_PREFIX\n```\n\nSave and exit the editor, then reload the environment:\n\n```bash\nconda deactivate \u0026\u0026 conda activate eflesh\n```\n\n### 5. Patch the Build System\n\nTo prevent CMake from building its own (broken) version of Intel TBB, the following two changes must be made.\n\n#### 5.1. Modify `microstructure/microstructure_inflators/cmake/MicroDependencies.cmake`\n\nComment out both blocks that begin with:\n\n```cmake\nif(NOT TARGET TBB::tbb)\n```\n\nThis disables the download and build of the `3rdparty/tbb` code. After commenting out both blocks, CMake will fall back to system- or Conda-provided TBB.\n\n#### 5.2. Modify `microstructure/microstructure_inflators/CMakeLists.txt`\n\nAfter the line:\n\n```cmake\ninclude(MicroDependencies)\n```\n\nadd the following:\n\n```cmake\n# Manually define TBB::tbb if not found (e.g., when using Conda)\nif(NOT TARGET TBB::tbb)\n    find_library(TBB_LIB tbb HINTS \"${TBB_ROOT}/lib\")\n    if(TBB_LIB)\n        add_library(TBB::tbb UNKNOWN IMPORTED)\n        set_target_properties(TBB::tbb PROPERTIES\n            IMPORTED_LOCATION \"${TBB_LIB}\"\n            INTERFACE_INCLUDE_DIRECTORIES \"${TBB_ROOT}/include\"\n        )\n    else()\n        message(FATAL_ERROR \"TBB::tbb not found, and could not locate libtbb.so\")\n    endif()\nendif()\n```\n\nThis manually defines the missing `TBB::tbb` target expected by the build.\n\n------\n\n### 6. Build the C++ Tools\n\n```bash\ncd microstructure/microstructure_inflators\nmkdir build \u0026\u0026 cd build\n\ncmake .. \\\n  -DCMAKE_BUILD_TYPE=Release \\\n  -DBOOST_ROOT=$CONDA_PREFIX \\\n  -DTBB_ROOT=$CONDA_PREFIX \\\n  -DGMP_INCLUDE_DIR=$CONDA_PREFIX/include \\\n  -DGMP_LIBRARIES=$CONDA_PREFIX/lib/libgmp.so \\\n  -DMPFR_INCLUDE_DIR=$CONDA_PREFIX/include \\\n  -DMPFR_LIBRARIES=$CONDA_PREFIX/lib/libmpfr.so \\\n  -DMICRO_BUILD_BINARIES=ON\n\nmake -j2 stitch_cells_cli\nmake -j2 cut_cells_cli\nmake -j2 stack_cells\n```\n\nNote I added paths to GMP and MPFR missing dependencies. note also -DMICRO_BUILD_BINARIES=ON otherwise it wont build the binaries\n\nAlso I used a more conservative option for compiling to avoid freezing my system\n\nThis will build the tools:\n\n- `stitch_cells_cli`\n- `cut_cells_cli`\n- `stack_cells`\n\nThese binaries should appear in the `build/` directory.\n\n### 7. Test the build\n\n```bash\n./isosurface_inflator/stitch_cells_cli --help\nstitch_cells_cli\nUsage: ./build/isosurface_inflator/stitch_cells_cli [OPTIONS] patch\n\nPositionals:\n  patch TEXT REQUIRED         Patch description (json file).\n\nOptions:\n  -h,--help                   Print this help message and exit\n  -p,--patch TEXT REQUIRED    Patch description (json file).\n  --gridSize FLOAT REQUIRED   Grid size.\n  --surface TEXT              Object surface.\n  -o,--output TEXT            Output triangle mesh.\n  -r,--resolution INT         Density field resolution.\n  --final_adaptivity FLOAT    adaptivity of final mesh.\n\n```\n\n## Usage\n\nActivate conda environment, from the project root launch:\n\n```bash\n$ cd ~/eFlesh\n$ conda activate eflesh\n(eflesh)$ jupiter notebook\n```\n\nInstall missing dependencies`igl` ,`meshio`, `pandas`needed to execute `cut-cell.ipynb`:\n\n```bash\n(eflesh)$ conda install -c conda-forge igl meshio pandas\n```\n\nOpen the `regular.ipynb` or `cut-cell.ipynb` notebooks to start exploring the functionality.\n\nUpdate ocurrences of  `path/to` by `/home/mhered/eFlesh/microstructure` in files:\n\n* `/home/mhered/eFlesh/microstructure/microstructure_inflators/regular.ipynb`\n\n* `/home/mhered/eFlesh/microstructure/microstructure_inflators/cut-cell.ipynb`\n\nEdit parameters, finally got this 40x40x30mm cube (`40x40x30_0.01_8.obj_False.obj`):\n\n![](./assets/40x40x30.gif)s\n\nAnd R20x30mm cylinder:\n\n![](./assets/R20x30.gif)\n\n## Printing TPU\n\nI am printing on an Ender 3 Max. Apparently the Bowden tube is a liability. ChatGPT generated a config file for Prusa Slicer (can't get CURA to work)\n\nFile \u003e Import \u003e Import Config\n\n[Config_TPU_Ender3_Max_v1.ini](./3D_printer_configs/Config_TPU_Ender3_Max_v1.ini) - created by ChatGPT\n\n[Config_TPU_Ender3_Max_v2.ini](./3D_printer_configs/Config_TPU_Ender3_Max_v3.ini)- advice from repo added (with errors fixed by me)\n\n[Config_TPU_Ender3_Max_v3.ini](./3D_printer_configs/Config_TPU_Ender3_Max_v3.ini) - advice from repo added and errors fixed by ChatGPT\n\n![](./assets/3D_print_TPU.gif)\n\n![](./assets/3D_print_TPU_2.gif)\n\nNot sure this is the way this is supposed to be... Instead, I hacked together a quick prototype by gluing two pieces of sponge from a dish scrubber to hold the magnets in place.\n\n## Install the QT Py firmware to get the sensor to start streaming data\n\n1) Set up the QT Py board using the Arduino IDE (refer to this tutorial https://learn.adafruit.com/adafruit-qt-py/arduino-ide-setup):\n   1) Install Arduino IDE: [download the AppImage](https://www.arduino.cc/en/software/), then (I use [AppimageLauncher](https://github.com/TheAssassin/AppImageLauncher)) copy to `~/Applications/` folder, make it executable (`$ chmod +x \u003cfilename\u003e`) and run it.\n   2) In **Preferences** \u003e **Settings** \u003e **Additional Boards Manager URLs** paste the link: https://adafruit.github.io/arduino-board-index/package_adafruit_index.json to add support for Adafruit boards (including the QT Py)\n   3) In **Tools** \u003e **Board** \u003e **Boards Manager...** install the latest versions of **Arduino SAMD Boards** and **Adafruit SAMD Boards** packages. Close and reopen Arduino IDE for changes to take effect.\n   4) In **Tools** \u003e **Board**  select **Adafruit QT Py M0 (SMAD21)**\n   5) Plug the QT Py board USB to the laptop, wait for it to be recognized and connect to it in **Tools** \u003e **Port** (will show as **/dev/ttyACM1 (Adafruit QT Py M0 (SMAD21))** ) \n   6) May want to follow [this tutorial](https://learn.adafruit.com/adafruit-qt-py/neopixel-blink) to upload the blinking \"Hello world\" (actually requires installing the Neopixel library)\n\n2) Manually install [this library for the MLX90393 magnetometer](https://github.com/tesshellebrekers/arduino-MLX90393) (refer to [this tutorial](https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use/how-to-install-a-library)). Note there are other MLX90303 libraries that can be installed with the **Library Manager**, but I have not checked if they are compatible with the reskin python scripts\n\n   1. Clone the library repo inside the `libraries`folder (the exact path can be consulted in **Preferences** \u003e **Settings** \u003e **Sketchbook location** ):\n\n   ```\n   $ cd \u003cpath_to_sketchbook\u003e/libraries\n   $ git clone https://github.com/tesshellebrekers/arduino-MLX90393.git\n   ```\n\n   2. It's successful when `arduino-MLX90393` shows in **File** \u003e **Examples** (Note the tutorial claims you need to rename to replace `-`by `_` then close and reopen the IDE, but this seems unnecessary).\n   3. Note: I fixed a couple of error messages (a mismatch of parameters in a function call and a couple of typecastings) to compile the `MLX90393_Debug_Helper.ino` firmware, but could not get it to work. \n\n3. Manually upload the sensor firmware to the QT Py. \n\n   1. Copy the two folders `5X_burst_stream` and `5X_binary_burst_stream` from https://github.com/raunaqbhirangi/reskin_sensor/tree/main/arduino into the Sketchbook location. \n\n   2. May want to upload `5X_burst_stream.ino` which sends a stream of plain text data for a quick check using the **Serial Monitor** and **Serial Plotter**: even with the kitchen sponge... it works!\n\n      ![](./assets/proto_1.gif)\n\n   3. Must upload instead`5X_binary_burst_stream.ino`, which streams binary data, in order to execute the python test scripts from https://github.com/raunaqbhirangi/reskin_sensor/tree/main/tests, e.g. \n\n```\n$ python3 sensor_proc_test.py -p /dev/ttyACM1\nInitializing sensor...\nInitialization successful\nStarted streaming\nTime elapsed: 2.0012900829315186, Number of datapoints: 746\nColumns:  T0, \tBx0, \tBy0, \tBz0, \tT1, \tBx1, \tBy1, \tBz1, \tT2, \tBx2, \tBy2, \tBz2, \tT3, \tBx3, \tBy3, \tBz3, \tT4, \tBx4, \tBy4, Bz4\nSample 1: ['30.46', '-35.40', '43.95', '-82.76', '28.50', '60.00', '-138.75', '-107.45', '29.31', '-221.10', '-103.35', '-119.31', '28.65', '128.70', '-28.95', '-102.12', '29.93', '-13.65', '-10.20', '-74.78']\nSample 2: ['30.58', '-31.05', '42.90', '-85.67', '28.58', '62.70', '-139.95', '-108.42', '29.31', '-233.40', '-111.45', '-118.82', '28.65', '130.80', '-41.25', '-103.58', '29.87', '-15.60', '-7.50', '-77.92']\nSample 3: ['30.20', '-38.25', '40.20', '-90.02', '28.67', '55.80', '-138.75', '-103.33', '29.51', '-225.15', '-114.75', '-114.47', '28.65', '130.95', '-34.95', '-96.32', '29.62', '-10.05', '-7.20', '-74.78']\nSample 4: ['30.22', '-35.70', '43.20', '-83.25', '28.52', '57.45', '-138.90', '-106.96', '29.25', '-227.25', '-107.10', '-112.29', '28.38', '133.95', '-43.35', '-99.46', '29.76', '-10.05', '-7.35', '-74.78']\nSample 5: ['30.42', '-33.60', '43.50', '-98.74', '28.61', '53.70', '-146.40', '-108.66', '29.42', '-220.95', '-114.15', '-118.10', '28.56', '123.30', '-32.10', '-101.40', '29.76', '-14.10', '-4.50', '-83.97']\n```\n\n4. Same for the visualizer scripts, e.g.\n\n```\n$ python3 viz_eflesh.py -p /dev/ttyACM1\n/home/mhered/miniconda3/envs/eflesh/lib/python3.10/site-packages/pygame/pkgdata.py:25: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools\u003c81.\n  from pkg_resources import resource_stream, resource_exists\nInitializing sensor...\nInitialization successful\nStarted streaming\n```\n\n![](./assets/visualizer.gif)\n\nSome fine tuning necessary...","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhered%2Ftactile_sensor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhered%2Ftactile_sensor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhered%2Ftactile_sensor/lists"}