Category: Mechanical design

  • A Solid Snake

    Let’s talk about a project I have been working on from a long time, and my first publicized Python package: pylinkage. It is a light-weight, quick code writing linkage designer and simulator, which was quite successful.

    Animation of a four-bar linkage

    Introduction

    Pylinkage dates back to 2018, when I started working on a project on leg mechanisms. At the time there was no simple solution to generate mechanical linkages in Python, which is why I decided to create my own open-source package. The idea is to simplify the process of creating and manipulating mechanical linkages from linkage definition to mathematical optimization.

    I worked on the package for two years to tune it to my specific needs. After my final examination, I revamped it completely, split it in two packages (pylinkage and leggedsnake) and published it in 2021.

    Not much happened until 2023, when I had some time to work on it again. I made it more standard and fixed several issues.

    For those not familiar with mechanical engineering, a linkage is a mechanism consisting of interconnected bodies called links joined together by joints or connections. This linkages transform motion between inputs and outputs links based on the linkage’s configuration.

    Features

    Pylinkage has revolutionized the conception of mechanic edges in Python. To understand the significance of pylinkage we have to look at the array of features it provides :

    • An easy linkage creation: it simplifies the process of building mechanical linkages by providing a straightforward API for generating and manipulating linkage in just a few seconds
    • Several joint configurations: the package provides support for multiple joint types which allows to create wide range of suitable for the specific needs.
    • Intuitive visualization: pylinkage provides powerful graphical visualization capabilities, allowing users to effortlessly demonstrate their linkage designs. This visualization aids in comprehending and fine-tuning the linkage simulations.
    • Linkage analysis: it is possible to analyze linkage characteristics, such as input-output relationships, link lengths, and motion trajectories, enabling users to optimize their designs effectively.

    Getting Started

    To start exploring pylinkage, beginners can refer to the comprehensive documentation, which provides step-by-step guidance on installation, basic usage, and advanced examples. The documentation includes code snippets, visualizations, and explanations, ensuring an immersive learning experience.

    pylinkage documentation screenshot

    Showcasing pylinkage’s Potential

    To illustrate pylinkage’s capabilities, we present a real-life examples of linkages design for a simple reciprocating engine mechanism. Leveraging the power of pylinkage, the user can define the linkage’s characteristics, simulate the motion, and analyze the resulting movement profiles, all within a Python environment.

    Kinematic view of TrotBot.

    Contributing to pylinkage’s Development

    Pylinkage is an open-source project that thrives on community contributions. Users are encouraged to actively participate in its development, sharing their ideas, reporting issues, and submitting pull requests. Collaboration strengthens the package’s potential and ensures its continual improvement and advancement.

    Conclusion

    With pylinkage, the world of mechanical linkage design becomes more accessible, dynamic, and enjoyable. By enabling users to construct and manipulate linkages in pure Python, pylinkage empowers engineers, designers, and hobbyists to unleash their creativity and explore the realm of mechanical motion transformations. Embark on your journey with pylinkage today and revolutionize your approach to mechanical linkage design.

  • leggedsnake: Retro-ingeneering Evolution

    leggedsnake: Retro-ingeneering Evolution

    leggedsnake is a cool projects I developed in Python. It purpose is to improve the design of linkages, specifically leg mechanisms. The idea is to create a linkage using pylinkage, and then using a dynamic simulation (with gravity and forces) to select a better linkage based on a genetic algorithm.

    A walking linakge
    Demo video of leggedsnake

    Inspirations/Other cool projects

    This project was strongly influenced by Theo Jansen’s stranbeesten. At some point, it became more important when I felt that the already existing leg mechanism optimizers such as the one from Amanda Ghassaei (and please visit here impressive website!) could get improved. I also got some inspiration from

    I also like to think how evolutionary path in the project led to solutions radically different from Evolution by Keiwan.