Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation and pictures. #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
# sunrise
[![License](https://img.shields.io/github/license/18tbr/sunrise)](https://github.com/18tbr/sunrise/blob/master/LICENSE)
![Windows Support](https://img.shields.io/badge/Windows-Support-brightgreen.svg)
![Linux Support](https://img.shields.io/badge/Linux-Support-brightgreen.svg)
![Mines de Paris](https://img.shields.io/badge/Organisme-Mines%20de%20Paris-blue)

# Mines de Paris - SunRise

<p align="center">
<a href="https://sites.google.com/view/2019-2020-gr12/home" target="_blank">
<img src="https://github.com/18tbr/sunrise/blob/master/assets/logoProjet2020.png?raw=true" height="250px">
</a>
</p>

The official repos for the Sunrise project. It was created by fusing several older repos together.
In order to contribute to this repos, please fork and create a pull request, this way I will review your code before merging it.
Also, please put the separate parts of the code in different folder (i.e. the python code in a python folder, the arduino code in an arduino folder etc ...).
In order to contribute to this repos, please fork and create a pull request, this way we will review your code before merging it.
Also, please put the separate parts of the code in different folders (i.e. the python code in a `python` folder, the arduino code in an `arduino` folder, etc...).

<p align="center">
<a href="http://www.mines-paristech.fr/" target="_blank">
<img src="https://github.com/18tbr/sunrise/blob/master/assets/logoMinesParisTech.png?raw=true" height="100px">
</a>
</p>

<p align="center">
<a href="http://www.ces.mines-paristech.fr/Accueil/" target="_blank">
<img src="https://github.com/18tbr/sunrise/blob/master/assets/logoCES.png?raw=true" height="75px">
</a>
</p>
Binary file added assets/logoCES.png
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 assets/logoMinesParisTech.png
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 assets/logoProjet2020.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 2 additions & 29 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ Math group repository.
1.3. [ Push the codes ](#13-push-the-codes)
2. [ Structure ](#2-structure)
3. [ Coding conventions ](#3-coding-conventions)
3.1. [ Documenting and commenting ](#31-documenting-and-commenting)
4. [ Tests ](#4-tests)
5. [ Pics ](#5-pics)
4. [ Pics ](#5-pics)

## 1. How to

Expand Down Expand Up @@ -59,30 +57,12 @@ Don't forget to `git pull` each time you want to work on the codes!
- `cable_robot.py`: test script so that the cli.py does not raise an error.
- `command.py`: discretization and motors rotation computation, main script, called by `cli.py`;
- `modules`:
- `decorators.py`: decorators for a cleaner code, it is ok if you don't look at it;
- `objects.py`: classes needed for the `command.py` script;
- `utils.py`: tools and mathematical functions used by `command.py`.
- `mathPartie1`: deprecated, was a previous version of `command.py`;
- `groupeMathSquelette`: deprecated, was a previous version of `command.py`;


### 2.1. `cli.py`
To do
### 2.2. `command.py`
To do
### 2.3. `objects.py`
To do
### 2.4. `utils.py`

We want to compute the number of steps in which we are going to divide each interval of the trajectory.
For each interval, this number is
`max(ceil(L_i/dx_i)_i)`
where `i` in `[|1,6|]` is the dimension, `L_i` is the distance we want to do in the interval and `dx_i` is the maximum step authorized.

## 3. Coding conventions

### 3.1. Documenting and commenting

When a function is defined, we document it as follows:
```py
def fun(arg):
Expand All @@ -99,15 +79,8 @@ def fun(arg):
pass
```

## 4. Tests

For now, no unittest has been implemented and the `.py` files in the `test/` folder are empty.
To run the tests, type in a terminal:
```bash
python -m unittest
```

## 5. Pics
## 4. Pics

- motor numbering:

Expand Down
3 changes: 2 additions & 1 deletion python/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
[0, 10, 10, 0, 0, 0],
[10, 10, 10, 0, 0, 0],
[10, 10, 0, 0, 0, 0],
[10, 0, 20, 0, 0, 0],
],
dtype=float,
)
Expand All @@ -27,4 +28,4 @@
# mobile.position = emplacement
# print(mobile)

traj.animate(save=False)
traj.animate(save=True)