Skip to content

ggldnl/Hexapod-Simulation

Repository files navigation

Hexapod Simulation

This repository includes the code to simulate the Hexapod. It includes code to visualize and interact with the robot in Viser and code to simulate it in a PyBullet environment.

Tripod gait Wave gait
Looking around Ripple gait

For a complete overview of the project, refer to the main Hexapod repository.

🛠️ Setup

Before you start, ensure mamba is properly installed on the machine you are using for the simulation.

  1. Clone the repository:

     git clone --recursive https://github.com/ggldnl/Hexapod-Simulation.git

    The Hexapod-Controller and Hexapod-Hardware repositories are configured as submodules and are automatically downloaded. If for some reason you need to update the submodules in the future:

    # Update the submodules if something changes in the future
    git submodule update --recursive --remote
  2. Create a mamba environment:

    cd Hexapod-Simulation
    mamba env create -f environment.yml
    mamba activate hexapod-sim

    The Hexapod-Controller code will be automatically installed as a package. After this, from within the hexapod-sim mamba environment, you will be able to do something like this:

    from controller import HexapodController

🚀 Delpoy

  • viser/main.py will open a Viser-based Hexapod demo, showing the Hexapod moving forward and performing some adjustments along the way (body height, yaw, speed, ...).

    python simulation/viser/main.py
  • bullet/main.py will open a PyBullet Hexapod simulation, showing how the robot behaves when physics is involved. I used the actual stall torque the servos are rated for to simulate the motors.

    python simulation/bullet/main.py

🤝 Contribution

Feel free to contribute by opening issues or submitting pull requests. For further information, check out the main Hexapod repository. Give a ⭐️ to this project if you liked the content.

About

Simulation environments for my hexapod robot

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages