Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
70a2157
Initial plan
Copilot Feb 25, 2026
470ca7d
Restructure modules into self-contained directories with config, docs…
Copilot Feb 25, 2026
98ececa
Add enabled.yml, infer module paths, integrate DiscordBot from develop
Copilot Feb 26, 2026
8240a7e
Add per-device environment configs, update module_loader and autolaun…
Copilot Feb 28, 2026
1d73d5c
Add config-driven dependency injection to ModuleLoader
Copilot Feb 28, 2026
f831079
resolve merge conflicts
danic85 Mar 1, 2026
e63a395
Migrate docs+tests to modules; create src/; move environments/ to roo…
Copilot Mar 1, 2026
7e57d26
Change default environment
danic85 Mar 1, 2026
5c37dac
Restructure and readme
danic85 Mar 1, 2026
416de74
Rename
danic85 Mar 1, 2026
4de4ff2
Update buddy.yml and cody.yml based on branch analysis
Copilot Mar 1, 2026
1c6d6aa
Configuration and test fixes
danic85 Mar 1, 2026
a66a2cb
Merge branch 'copilot/refactor-module-structure' of https://github.co…
danic85 Mar 1, 2026
0b17aa8
fix
danic85 Mar 1, 2026
fc29a04
Test
danic85 Mar 1, 2026
2a5db2f
Refactor MessagingService for pubsub/mqtt/both, add publish_mqtt to B…
Copilot Mar 1, 2026
8af1205
Fix publish() to route to primary backend only, not all backends when…
Copilot Mar 1, 2026
02fe117
Replace system/loop pubsub with direct loop() method calls on all mod…
Copilot Mar 1, 2026
56e18c1
Correcct config for buddy and cody
danic85 Mar 22, 2026
998ee00
Merge branch 'copilot/refactor-module-structure' of https://github.co…
danic85 Mar 22, 2026
2ec7d21
Tested Cody
danic85 Mar 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ jobs:

- name: Run unittests
run: |
python -m unittest discover -s tests -p 'test_*.py'
PYTHONPATH=src python -m unittest discover -s src/tests -p 'test_*.py' -t src
PYTHONPATH=src python -m unittest discover -s src/modules -p 'test_*.py' -t src

permissions:
pull-requests: write
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
71 changes: 65 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Open Source, 3D Printable, Modular Bipedal Robot Project
# Open Source, 3D Printable, Modular Robot Project

The **Modular Bipedal Robot** project aims to educate and inspire individuals interested in robotics and electronics. This open-source initiative focuses on creating a fully autonomous companion robot with a variety of advanced features.
The **Modular Robot** project aims to educate and inspire individuals interested in robotics and electronics. This open-source initiative focuses on creating a fully autonomous companion robot with a variety of advanced features.

## Key Features

- **Bipedal Design**: The robot includes articulated legs for bipedal movement.
- **Control Systems**: Utilizes Arduino and Raspberry Pi, managed through custom PCBs.
- **Modular Body**: Configurable body components allow for easy customization and adaptability.
- **Software Modules**:
Expand All @@ -30,23 +29,23 @@ The **Modular Bipedal Robot** project aims to educate and inspire individuals in

## Project Background

The Modular Biped Robot Project is designed to provide a flexible and modular framework for robotics development using Python and C++ on the Raspberry Pi and Arduino platforms. It aims to enable developers, robotics enthusiasts, and curious individuals to experiment, create, and customize their own biped robots. With a range of features and functionalities and the option to add your own easily, the Modular Biped Robot Project offers an exciting opportunity to explore the world of robotics.
The Modular Robot Project is designed to provide a flexible and modular framework for robotics development using Python and C++ on the Raspberry Pi and Arduino platforms. It aims to enable developers, robotics enthusiasts, and curious individuals to experiment, create, and customize their own robots. With a range of features and functionalities and the option to add your own easily, the Modular Robot Project offers an exciting opportunity to explore the world of robotics.

## Modularity

The open source framework is designed for flexibility, allowing users to easily add or remove components to suit their specific needs. Comprehensive [guides](https://github.com/makerforgetech/modular-biped/wiki/Software#creating-a-module) are provided for integrating new modules seamlessly.

## Resources

- **Documentation**: For detailed information, visit the project’s GitHub wiki: [Modular Biped Documentation](https://github.com/makerforgetech/modular-biped/wiki)
- **Documentation**: For detailed information, visit the project’s GitHub wiki: [Modular Robot Documentation](https://github.com/makerforgetech/modular-biped/wiki)
- **Code**: Check out the modular open source software on [GitHub](https://github.com/makerforgetech/modular-biped)
- **YouTube Playlist**: Explore the development process through our build videos: [Watch on YouTube](https://www.youtube.com/watch?v=2DVJ5xxAuWY&list=PL_ua9QbuRTv6Kh8hiEXXVqywS8pklZraT)
- **Community**: Have a question or want to show off your build? Join the communities on [GitHub](https://bit.ly/maker-forge-community) and [Discord](https://bit.ly/makerforge-community)!


## A Note On Branches

The `main` branch is the latest stable release of the Modular Biped Robot project. This is compatible with the 'buddy' release, the latest supported release.
The `main` branch is the latest stable release of the Modular Robot project. This is compatible with the 'buddy' release, the latest supported release.

The `develop` branch is the development branch and may contain experimental features and changes that are not yet stable. Please use the `main` branch for the most stable experience. This will eventually become the next release, 'cody'. To facilitate testing modules are disabled by default in the `develop` branch. Enable each as needed in the config yaml files to test.

Expand Down Expand Up @@ -151,4 +150,64 @@ INFO: 01/30/2025 12:05:27 PM [Personality.random_neopixel_status:117] [Personali
INFO: 01/30/2025 12:05:27 PM [PiTemperature.monitor:30] Temperature: 42.2Β°C
INFO: 01/30/2025 12:05:28 PM [PiTemperature.monitor:30] Temperature: 42.2Β°C
INFO: 01/30/2025 12:05:28 PM [Main] Loop ended
```

# Getting Started

1. Clone the repository and navigate to the project directory.
2. Review the environment configuration files in the `environments` folder and create your own if needed.
3. Run install.sh <environment> to set up the necessary dependencies and configurations for your chosen environment.
4. Add any environment variables required to /home/$USER/.myenv (this file is sourced on startup to set environment variables for the session).
5. Test by running startup.sh to start the robot. You should see logs in the CLI and app.log file indicating that the robot is running.
6. Ctrl+C to stop the robot.
7. To enable autolaunch on boot, run `./installers/autolaunch.sh enable <environment>` (defaults to laptop if no environment specified). To disable autolaunch, run `./installers/autolaunch.sh disable`.

# Adding New Modules
To add a new module, create a new directory in the `src/modules` directory with the name of your module.

Inside this directory, create a Python file with the same name as the directory. This file should contain a class that extends the BaseModule class.

Implement the necessary methods and functionality for your module.

- `__init__(self, config, messaging_service)`: Initialize your module and set up any necessary variables or connections. The `config` parameter contains the configuration for your module from the YAML
- `setup_messaging(self)`: Set up any necessary subscriptions to topics using the `subscribe` method from the BaseModule class. You can subscribe to other topics or system/loop/<interval> for timed loops. See the wiki for more details on the messaging service and available topics.
- `loop(self)`: Implement the looping functionality of your module in this method. This method will be called repeatedly in the main loop of the robot.
- `__exit__(self)`: Clean up any resources or connections when the module is stopped.

Create a configuration YAML file for your module in the new module's directory called `config.yml`. This file should include the class name of your module and any dependencies it requires, as well as any non-environment specific configuration.


```yaml
bno055:
class: BNO055
config:
some_config: <this will be passed to the module's init method via kwargs>
dependencies:
python:
- adafruit-circuitpython-bno055
- adafruit-blinka
```

Finally, add your module to the configuration YAML file for your environment to enable it.

You may wish to include environment specific configuration in the environment YAML file, which will be passed to the module's init method via kwargs.

```yaml
bus_servo:
enabled: true
config:
poses:
- legs_forward: {leg_r_tilt: 2806, leg_r_hip: 1989, leg_r_knee: 1349, leg_r_ankle: 2754, neck_pan: 1698, neck_tilt: 118, leg_l_tilt: 1619, leg_l_hip: 1028, leg_l_knee: 2634, leg_l_ankle: 1567}
instances:
- name: leg_r_tilt
model: ST3215
id: 1
range: [2511, 3944]
range_degrees: 125.9
start: 2810
- name: leg_r_hip
model: ST3215
id: 3
range: [0, 2063]
range_degrees: 181.3
```
7 changes: 0 additions & 7 deletions arduino_sketch/.vscode/arduino.json

This file was deleted.

Loading
Loading