Skip to content

Commit

Permalink
Merge pull request #1 from Gepetto/update
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
nim65s authored Jan 8, 2025
2 parents 0488fe4 + ac1a47c commit cd2b27a
Show file tree
Hide file tree
Showing 48 changed files with 3,931 additions and 4,255 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/gepetuto_test.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
name: check with gepetuto

on: [push, pull_request]
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- run: pip install .
- run: gepetuto -vvca all
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11
FROM python:3.12

RUN useradd -m user
USER user
Expand Down
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,32 @@ pip install .

After that, you can start the server with `jupyter notebook`

### uv

Instead of using pip and venv, you can use this project directly with [uv](https://docs.astral.sh/uv/), which will
setup everything for you, and you'll only need one command:

```bash
uv run jupyter lab
```

### Docker

If the default setup is not working for you, as a backup solution, a Docker image is provided, and can be started with:

```bash
docker run --rm -p 7000:7000 -p 7001:7001 -p 7002:7002 -p 7003:7003 -p 7004:7004 -p 8888:8888 -v data:/home/user/tp -it gepetto/supaero2024
docker run --rm -p 7000:7000 -p 7001:7001 -p 7002:7002 -p 7003:7003 -p 7004:7004 -p 8888:8888 -v data:/home/user/tp -it gepetto/supaero2025
```

On Linux host systems, you may simply start the Docker with:

```bash
docker run --rm --net host -v data:/home/user/tp -it gepetto/supaero
docker run --rm --net host -v data:/home/user/tp -it gepetto/supaero2025
```

In case of big update, you must update the docker:
```bash
docker pull gepetto/supaero2024
docker pull gepetto/supaero2025
```

## Use
Expand All @@ -61,7 +70,7 @@ On a native installation, just go in the folder containing the tutorials and exe

With a docker, execute the following:
```bash
docker run --rm -v data:/home/user/tp -it gepetto/supaero git pull --rebase origin main
docker run --rm -v data:/home/user/tp -it gepetto/supaero2025 git pull --rebase origin main
```

To avoid conflict when pulling a new version, you should better do your modifications in copy of the original files,
Expand All @@ -87,7 +96,7 @@ newgrp docker

[\[Matrix\]](https://matrix.org/) is a distributed chat system that will be used during the class. Consider [creating
an account](https://app.element.io/#/register) and join [the classroom
channel](https://matrix.to/#/#supaero-robotics-2024:laas.fr).
channel](https://matrix.to/#/#supaero-robotics-2025:laas.fr).

## Set up of the system ... for admin only

Expand All @@ -104,7 +113,7 @@ export DOCKER_BUILDKIT=1
```
Then build:
```bash
docker build -t gepetto/supaero2024 .
docker build -t gepetto/supaero2025 .
```
Log to Docker-hub using your credentials.
```bash
Expand All @@ -113,5 +122,5 @@ docker login
Use the login corresponding to +https://hub.docker.com/+.
And push it to the Gepetto repository of Docker-hub.
```bash
docker push gepetto/supaero2024
docker push gepetto/supaero2025
```
1 change: 0 additions & 1 deletion examples/display_robot.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import example_robot_data as robex

from supaero2024.meshcat_viewer_wrapper import MeshcatVisualizer

ROBOT_NAME = "solo12"
Expand Down
1 change: 0 additions & 1 deletion next/appendix/solution_slerp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import numpy as np
from numpy.linalg import norm
from pinocchio import SE3, AngleAxis, Quaternion

from supaero2024.meshcat_viewer_wrapper import MeshcatVisualizer

viz = MeshcatVisualizer()
Expand Down
1 change: 0 additions & 1 deletion next/tp1/configuration_extended.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import numpy as np
from numpy.linalg import norm
from scipy.optimize import fmin_bfgs, fmin_slsqp

from supaero2024.meshcat_viewer_wrapper import MeshcatVisualizer
from supaero2024.meshcat_viewer_wrapper.transformations import planar, translation2d

Expand Down
1 change: 0 additions & 1 deletion next/tp1/configuration_reduced.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import numpy as np
from scipy.optimize import fmin_bfgs

from supaero2024.meshcat_viewer_wrapper import MeshcatVisualizer
from supaero2024.meshcat_viewer_wrapper.transformations import planar, translation2d

Expand Down
3 changes: 1 addition & 2 deletions next/tp2/floating.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@

import example_robot_data as robex
import numpy as np
import pinocchio as pin
from numpy.linalg import norm
from scipy.optimize import fmin_bfgs

from supaero2024.meshcat_viewer_wrapper import MeshcatVisualizer

# --- Load robot model
Expand Down Expand Up @@ -88,6 +86,7 @@ def callback(q):
viz.display(q)
time.sleep(1e-2)


qopt = fmin_bfgs(cost, robot.q0, callback=callback)
# %end_jupyter_snippet

Expand Down
1 change: 0 additions & 1 deletion next/tp2/invgeom3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import numpy as np
from numpy.linalg import norm
from scipy.optimize import fmin_bfgs

from supaero2024.meshcat_viewer_wrapper import MeshcatVisualizer

# --- Load robot model
Expand Down
3 changes: 1 addition & 2 deletions next/tp2/invgeom6d.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Stand-alone inverse geom in 6D (controlling the placement, ie translation and
Stand-alone inverse geom in 6D (controlling the placement, ie translation and
orientation of the end effector). Given a reference placement <Mtarget> ,
it computes the configuration of the UR5 so that the end-effector placement (6D)
matches the target. This is done using BFGS solver. While iterating to compute
Expand All @@ -16,7 +16,6 @@
import pinocchio as pin
from numpy.linalg import norm
from scipy.optimize import fmin_bfgs

from supaero2024.meshcat_viewer_wrapper import MeshcatVisualizer

# --- Load robot model
Expand Down
1 change: 0 additions & 1 deletion next/tp2/simple_pick_and_place.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import example_robot_data as robex
import numpy as np
import pinocchio as pin

from supaero2024.meshcat_viewer_wrapper import MeshcatVisualizer, colors

# %jupyter_snippet 1
Expand Down
3 changes: 1 addition & 2 deletions next/tp3/control_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
import numpy as np
import pinocchio as pin
from numpy.linalg import norm, pinv
from tp3.tiago_loader import loadTiago

from supaero2024.meshcat_viewer_wrapper import MeshcatVisualizer
from tp3.tiago_loader import loadTiago

plt.ion()

Expand Down
3 changes: 1 addition & 2 deletions next/tp3/inverse_kinematics.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
# %jupyter_snippet import
import pinocchio as pin
from numpy.linalg import norm, pinv
from tp3.tiago_loader import loadTiago

from supaero2024.meshcat_viewer_wrapper import MeshcatVisualizer
from tp3.tiago_loader import loadTiago

# %end_jupyter_snippet

Expand Down
2 changes: 1 addition & 1 deletion next/tp4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ These classes are not available in 2x and are reimplemented in Python following
*getConstraintsJacobian* are reimplemented.

### Z axis
pin.ZAxis is not available in 2x and is reimplemented in Python.
pin.ZAxis is not available in 2x and is reimplemented in Python.
Loading

0 comments on commit cd2b27a

Please sign in to comment.