Skip to content

smartrobotsdesignlab/tmej_smd_hebi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HEBI Motor Virtual Spring-Mass-Damper Demo

This repository contains code and exercises for the hands-on session with HEBI motors.
You will implement and test a virtual spring–mass–damper (SMD) system on a real motor.


🚀 Requirements

  • Python 3.9+
  • HEBI Python API (hebi-py)
  • matplotlib (for plotting)
  • scipy (for simulations)
  • numpy (pinned to 1.26.0 for compatibility)

🔧 Installation

  1. Clone this repository and move into the folder:

    git clone https://github.com/smartrobotsdesignlab/tmej_smd_hebi.git
    cd tmej_smd_hebi
  2. Create a virtual environment (recommended):

python3 -m venv venv
source venv/bin/activate   # (Linux/Mac)
venv\Scripts\activate      # (Windows)
  1. Install dependencies:
pip install -r requirements.txt

This will ensure numpy==1.26.0 is used.

  1. ⚠️ NumPy Compatibility Note If you see an error like:
A module that was compiled using NumPy 1.x cannot be run in NumPy 2.x

It means your environment upgraded to NumPy 2.x. Fix it by forcing NumPy 1.26.0:

pip install numpy==1.26.0

▶️ Usage

  • Open one of the example scripts (e.g. SMDStepSim.py).
  • Adjust parameters (k, c, m)
  • Run the script and observe behaviour:
python SMDStepSim.py

✅ Notes

  • The motor initializes with its current position as the zero reference.
  • Safety limits (max torque, max displacement) are included to protect hardware.
  • 🎉 Have fun experimenting with the virtual spring–mass–damper system and comparing theory vs. practice!

About

Repo for TMEJ Hands-on training on Spring Mass Damper Systems

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages