Skip to content

Commit

Permalink
Merge pull request #57 from alberto-abarzua/chore/rename_managepy
Browse files Browse the repository at this point in the history
chore: renamte manage.py to ribot.py
  • Loading branch information
alberto-abarzua authored Dec 8, 2023
2 parents 8a6dde7 + 4858ff6 commit f842020
Show file tree
Hide file tree
Showing 18 changed files with 793 additions and 759 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/backend-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
run: pip install toml

- name: Build backend container
run: ./manage.py build --container backend --no-editable
run: ./ribot.py build --container backend --no-editable

- name: Lint Backend
run: ./manage.py lint --container backend
run: ./ribot.py lint --container backend

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -43,10 +43,10 @@ jobs:

- name: Push Backend Container
if: github.ref == 'refs/heads/main'
run: ./manage.py docker-compose --container backend --op push
run: ./ribot.py docker-compose --container backend --op push

- name: Stop and remove containers
if: always()
run: ./manage.py down --container backend
run: ./ribot.py down --container backend


16 changes: 8 additions & 8 deletions .github/workflows/controller-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ jobs:
run: pip install toml
- name: Build Controller Container
run: |
./manage.py build --container controller
./ribot.py build --container controller
- name: Build Firmware Container
run: |
./manage.py build --container firmware
./ribot.py build --container firmware
- name: Lint Controller
run: ./manage.py lint --container controller
run: ./ribot.py lint --container controller

- name: Run Firmware and Controller Tests
run: ./manage.py test
run: ./ribot.py test

- name: Publish Controller Package
if: github.ref == 'refs/heads/main'
run: ./manage.py publish-controller
run: ./ribot.py publish-controller

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -56,13 +56,13 @@ jobs:

- name: Push Controller Container
if: github.ref == 'refs/heads/main'
run: ./manage.py docker-compose --container controller --op push
run: ./ribot.py docker-compose --container controller --op push

- name: Stop and remove containers
if: always()
run: |
./manage.py down --container controller
./manage.py down --container firmware
./ribot.py down --container controller
./ribot.py down --container firmware


Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/firmware-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
- name: Install toml
run: pip install toml
- name: Build Firmware Container for Linux
run: ./manage.py build --container firmware
run: ./ribot.py build --container firmware

- name: Build Firmware for Linux
run: ./manage.py buildf
run: ./ribot.py buildf

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -39,11 +39,11 @@ jobs:

- name: Push Firmware-linux Container
if: github.ref == 'refs/heads/main'
run: ./manage.py docker-compose --container firmware --op push
run: ./ribot.py docker-compose --container firmware --op push

- name: Stop and remove containers
if: always()
run: ./manage.py down --container firmware
run: ./ribot.py down --container firmware

esp-idf-build:
runs-on: ubuntu-latest
Expand All @@ -64,10 +64,10 @@ jobs:
run: printenv | grep -v "^\(PWD\|SHLVL\|HOME\)" > .env

- name: Build ESP-IDF Container
run: ./manage.py build --container esp_idf
run: ./ribot.py build --container esp_idf

- name: Build firmware for ESP32 using ESP-IDF
run: ./manage.py build-esp
run: ./ribot.py build-esp

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -77,10 +77,10 @@ jobs:

- name: Push esp-idf Container
if: github.ref == 'refs/heads/main'
run: ./manage.py docker-compose --container esp_idf --op push
run: ./ribot.py docker-compose --container esp_idf --op push
- name: Stop and remove containers
if: always()
run: ./manage.py down --container esp_idf
run: ./ribot.py down --container esp_idf



Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/frontend-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ jobs:
- name: Install toml
run: pip install toml
- name: Build frontend container
run: ./manage.py build --container frontend
run: ./ribot.py build --container frontend

- name: Build Unity Webgl
run: ./manage.py build --container unity_webgl_server
run: ./ribot.py build --container unity_webgl_server

- name: Lint Frontend
run: ./manage.py lint --container frontend
run: ./ribot.py lint --container frontend

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -45,13 +45,13 @@ jobs:

- name: Push Frontend Container
if: github.ref == 'refs/heads/main'
run: ./manage.py docker-compose --container frontend --op push
run: ./ribot.py docker-compose --container frontend --op push

- name: Push Unity Webgl Container
if: github.ref == 'refs/heads/main'
run: ./manage.py docker-compose --container unity_webgl_server --op push
run: ./ribot.py docker-compose --container unity_webgl_server --op push

- name: Stop and remove containers
if: always()
run: ./manage.py down --container frontend
run: ./ribot.py down --container frontend

34 changes: 24 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Welcome to the Ribot project, your comprehensive solution for controlling roboti

![Ribot](./arm_docs/static/img/general_page.gif)

## Demo Video

[![Demo on Robot Arm](https://img.youtube.com/vi/HM4zTVW9VRM/0.jpg)](https://www.youtube.com/watch?v=HM4zTVW9VRM)

[Click this or the image!](https://youtu.be/HM4zTVW9VRM)

## Getting Started

### Prerequisites
Expand All @@ -22,31 +28,31 @@ Welcome to the Ribot project, your comprehensive solution for controlling roboti
git clone https://github.com/alberto-abarzua/ribot.git
```

2. **Manage.py Script**
2. **ribot.py Script**
This utility script facilitates building, running, and managing the project.
- Usage:
```bash
python manage.py --help
python ribot.py --help
```

3. **Building the Firmware for ESP32**
```bash
python manage.py build-esp
python ribot.py build-esp
```

4. **Flashing the Firmware**
```bash
python manage.py build-esp --flash
python ribot.py build-esp --flash
```

5. **Running Backend and Frontend Services**
For real ESP32:
```bash
python manage.py runserver --esp
python ribot.py runserver --esp
```
For a dummy firmware version (Docker):
```bash
python manage.py runserver
python ribot.py runserver
```

## Project Components
Expand Down Expand Up @@ -132,13 +138,21 @@ if __name__ == "__main__":
This example demonstrates initializing the controller, setting up the arm parameters, and executing various movements including positioning, angling, and tool manipulation.
### Documentation
For more detailed information and additional functionalities of the `ribot-controller` library.
For detailed documentation, please visit our [Docs](https://ribot.dev).
Integrate `ribot-controller` into your project to experience the power and simplicity of controlling robotic arms with Python.
### Contributing
### Documentation
For detailed documentation, please visit our [Docs](https://ribot.dev).
Please feel free to contribute to this project! We welcome any and all contributions to help improve the Ribot project. We don't have any specific guidelines for contributing, but please follow the general guidelines below:
**Issues**: If you find any bugs or have any feature requests, please create an issue on GitHub.
**Pull Requests**: If you have any changes you'd like to make, please create a pull request on GitHub. We'll review it and merge it if it looks good!
**Code Style**: Follow the existing code style (formatting and linting). For python code, we use black, isort, mypy, and flake8. For C++ code, we use clang-format and clang-tidy. For JavaScript code, we use prettier and eslint.
- You can check if you are following the code style by running `python ribot.py lint` in the root directory of the project. This will run all the linters and formatters on the codebase.
- To format the code, run `python ribot.py format` in the root directory of the project. This will run all the formatters on the codebase.
**Testing**: We have unit tests for the Python codebase. You can run them by running `python ribot.py test` in the root directory of the project.
### License
This project is licensed under the [MIT License](#).
Expand Down
6 changes: 5 additions & 1 deletion arm_docs/docs/implementation/hardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ The ESP32 is the preferred microcontroller for several reasons:

### Wiring Diagram

(Insert a wiring diagram here showing how to connect the ESP32 to the motors.)
![Wiring Diagram](/img/wiring/wiring_esp.png)
Wiring Diagram for the ESP32 and Stepper Motors

![Wiring Diagram](/img/wiring/tb660.jpg)
Example using TB6600 Stepper Motor Driver

The wiring diagram is just an example; you can connect the motors in any way you wish, as long as you use the correct type of pins. Make sure to refer to the [ESP32 Pinout Reference](https://randomnerdtutorials.com/esp32-pinout-reference-gpios/) to understand which pins are suitable for output (for motors) and input (for sensors).

Expand Down
6 changes: 6 additions & 0 deletions arm_docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ const config = {
theme: {
customCss: './src/css/custom.css',
},
sitemap: {
changefreq: 'weekly',
priority: 0.5,
ignorePatterns: ['/tags/**'],
filename: 'sitemap.xml',
},
}),
],
],
Expand Down
1 change: 1 addition & 0 deletions arm_docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions arm_docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
},
"dependencies": {
"@docusaurus/core": "3.0.1",
"@docusaurus/plugin-sitemap": "^3.0.1",
"@docusaurus/preset-classic": "3.0.1",
"@mdx-js/react": "^3.0.0",
"autoprefixer": "^10.4.16",
Expand Down
Binary file added arm_docs/static/img/wiring/tb660.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added arm_docs/static/img/wiring/wiring_esp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion backend/pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion controller/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# Ribot Python Control Library


TODO: Write a project description

This is the controller library for the RiBot software project.

This project focuess on creating a easy to use experience to manipulate and control robot arms


This library is used by the RiBot backend to control the robot arm.

More info on the RiBot project can be found [here](https://ribot.dev).

2 changes: 1 addition & 1 deletion firmware/components/utils/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ void task_end() {}

void run_delay(uint32_t delay_ms) {
std::this_thread::sleep_for(
std::chrono::milliseconds(static_cast<long long>((delay_ms ))));
std::chrono::milliseconds(static_cast<int64_t>((delay_ms))));
}

void run_delay_microseconds(uint32_t delay_us) {
Expand Down
6 changes: 3 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@types/node": "^20.10.3",
"@types/node": "^20.10.4",
"@vitejs/plugin-react": "^4.2.1",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.29.0",
"prettier-plugin-tailwindcss": "^0.5.8",
"vite": "^5.0.5"
"prettier-plugin-tailwindcss": "^0.5.9",
"vite": "^5.0.7"
}
}
Loading

0 comments on commit f842020

Please sign in to comment.