Skip to content

Commit c939dbc

Browse files
committed
First workspace draft
1 parent e3ba5fd commit c939dbc

File tree

6 files changed

+6544
-2
lines changed

6 files changed

+6544
-2
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# GitHub syntax highlighting
2+
pixi.lock linguist-language=YAML linguist-generated=true

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# pixi environments
2+
.pixi
3+
*.egg-info
4+
cmake
5+
eigenpy
6+
hpp-fcl
7+
coal
8+
pinocchio
9+
pycppad
10+
example-robot-data
11+
proxsuite
12+
proxsuite-nlp
13+
aligator
14+
LoIK

CMakeLists.txt

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
cmake_minimum_required(VERSION 3.12)
2+
project(root)
3+
include(CTest)
4+
5+
set(PROJECT_WORKSPACE ON)
6+
set(PROJECT_PACKAGES_IN_WORKSPACE)
7+
set(PROJECT_PYTHON_PACKAGES_IN_WORKSPACE)
8+
9+
macro(add_eigenpy)
10+
list(APPEND PROJECT_PACKAGES_IN_WORKSPACE eigenpy)
11+
list(APPEND PROJECT_PYTHON_PACKAGES_IN_WORKSPACE
12+
${PROJECT_BINARY_DIR}/eigenpy/python)
13+
add_subdirectory(eigenpy)
14+
endmacro()
15+
macro(add_hpp_fcl)
16+
list(APPEND PROJECT_PACKAGES_IN_WORKSPACE hpp-fcl)
17+
list(APPEND PROJECT_PYTHON_PACKAGES_IN_WORKSPACE
18+
${PROJECT_BINARY_DIR}/hpp-fcl/python)
19+
add_subdirectory(hpp-fcl)
20+
endmacro()
21+
macro(add_pinocchio)
22+
list(APPEND PROJECT_PACKAGES_IN_WORKSPACE pinocchio)
23+
list(APPEND PROJECT_PYTHON_PACKAGES_IN_WORKSPACE
24+
${PROJECT_BINARY_DIR}/pinocchio/bindings/python)
25+
add_subdirectory(pinocchio)
26+
endmacro()
27+
macro(add_pycppad)
28+
list(APPEND PROJECT_PACKAGES_IN_WORKSPACE pycppad)
29+
list(APPEND PROJECT_PYTHON_PACKAGES_IN_WORKSPACE
30+
${PROJECT_BINARY_DIR}/pycppad/python)
31+
add_subdirectory(pycppad)
32+
endmacro()
33+
macro(add_example_robot_data)
34+
list(APPEND PROJECT_PACKAGES_IN_WORKSPACE example-robot-data)
35+
list(APPEND PROJECT_PYTHON_PACKAGES_IN_WORKSPACE
36+
${PROJECT_BINARY_DIR}/example-robot-data/python)
37+
add_subdirectory(example-robot-data)
38+
endmacro()
39+
macro(add_proxsuite)
40+
list(APPEND PROJECT_PACKAGES_IN_WORKSPACE proxsuite)
41+
list(APPEND PROJECT_PYTHON_PACKAGES_IN_WORKSPACE
42+
${PROJECT_BINARY_DIR}/proxsuite/bindings/python)
43+
add_subdirectory(proxsuite)
44+
endmacro()
45+
macro(add_proxsuite_nlp)
46+
list(APPEND PROJECT_PACKAGES_IN_WORKSPACE proxsuite-nlp)
47+
list(APPEND PROJECT_PYTHON_PACKAGES_IN_WORKSPACE
48+
${PROJECT_BINARY_DIR}/proxsuite-nlp/bindings/python)
49+
add_subdirectory(proxsuite-nlp)
50+
endmacro()
51+
macro(add_aligator)
52+
list(APPEND PROJECT_PACKAGES_IN_WORKSPACE aligator)
53+
list(APPEND PROJECT_PYTHON_PACKAGES_IN_WORKSPACE
54+
${PROJECT_BINARY_DIR}/aligator/bindings/python)
55+
add_subdirectory(aligator)
56+
endmacro()
57+
macro(add_loik)
58+
list(APPEND PROJECT_PACKAGES_IN_WORKSPACE loik)
59+
add_subdirectory(LoIK)
60+
endmacro()
61+
62+
# add_eigenpy()
63+
64+
# add_hpp_fcl()
65+
66+
# add_pinocchio()
67+
68+
# add_pycppad()
69+
70+
# add_example_robot_data()
71+
72+
# add_proxsuite()
73+
74+
# add_proxsuite_nlp()
75+
76+
# add_aligator()
77+
78+
# add_loik()

README.md

Lines changed: 138 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,138 @@
1-
# workspace
2-
This project aggregate scripts and files to work on multiple Simple-Robotics project at once
1+
# Simple-Robotics Workspace
2+
3+
This project aggregate scripts and files to work on multiple Simple-Robotics project at once.
4+
5+
## How to use it
6+
7+
To setup a workspace you must do the following steps:
8+
9+
1. Populate the workspace
10+
2. Configure CMakeLists.txt
11+
3. Configure pixi.toml
12+
4. Build the workspace
13+
14+
Project inside a workspace are called **edited projects**.
15+
16+
### Populate the workspace
17+
18+
Use the following commands to clone projects you want to **edit**.
19+
20+
- eigenpy: `git clone https://github.com/stack-of-tasks/eigenpy.git --recursive -b topic/workspace`
21+
- hpp-fcl: `git clone [email protected]:humanoid-path-planner/hpp-fcl.git --recursive -b topic/workspace`
22+
- pinocchio: `git clone [email protected]:stack-of-tasks/pinocchio.git --recursive -b topic/workspace`
23+
- pycppad: `git clone [email protected]:Simple-Robotics/pycppad.git --recursive -b topic/workspace`
24+
- example-robot-data: `git clone [email protected]:Gepetto/example-robot-data.git --recursive -b topic/workspace`
25+
- proxsuite: `git clone https://github.com/Simple-Robotics/proxsuite.git --recursive -b topic/workspace`
26+
- proxsuite-nlp: `git clone https://github.com/Simple-Robotics/proxsuite-nlp.git --recursive -b topic/workspace`
27+
- aligator: `git clone https://github.com/Simple-Robotics/aligator --recursive --recursive -b topic/workspace`
28+
29+
### Configure CMakeLists.txt
30+
31+
Uncomment the following lines corresponding to all **edited projects** in the [CMakeLists.txt](./CMakeLists.txt) file:
32+
33+
- eigenpy: `add_eigenpy()`
34+
- hpp-fcl: `add_hpp_fcl()`
35+
- pinocchio: `add_pinocchio()`
36+
- pycppad: `add_pycppad()`
37+
- example-robot-data: `add_example_robot_data()`
38+
- proxsuite: `add_proxsuite()`
39+
- proxsuite-nlp: `add_proxsuite_nlp()`
40+
- aligator: `add_aligator()`
41+
42+
### Configure pixi.toml
43+
44+
This is the trickiest part.
45+
46+
The [pixi.toml](./pixi.toml) file contains the following environments:
47+
48+
- all: Allow to work on all projects at the same time
49+
- eigenpy-standalone: Allow to work only on eigenpy
50+
- hpp-fcl-standalone: Allow to work only on hpp-fcl
51+
- pinocchio-standalone: Allow to work only on pinocchio
52+
- pycppad-standalone: Allow to work only on pycppad
53+
- proxsuite-standalone: Allow to work only on proxsuite
54+
- proxsuite-nlp-standalone: Allow to work only on proxsuite-nlp
55+
- aligator-standalone: Allow to work only on aligator
56+
- loik-standalone: Allow to work only on loik
57+
58+
It also contains the following features:
59+
60+
- base: Dependencies used in a lot of projects
61+
- eigenpy: eigenpy dependencies
62+
- hpp-fcl: hpp-fcl dependencies without **editable projects**
63+
- hpp-fcl-standalone: hpp-fcl **editable projects** dependencies
64+
- pinocchio: pinocchio dependencies without **editable projects**
65+
- pinocchio-standalone: pinocchio **editable projects** dependencies
66+
- pycppad: pycppad dependencies without **editable projects**
67+
- pycppad-standalone: pycppad **editable projects** dependencies
68+
- proxsuite: proxsuite dependencies without **editable projects**
69+
- proxsuite-nlp: proxsuite-nlp dependencies without **editable projects**
70+
- proxsuite-nlp-standalone: proxsuite-nlp **editable projects** dependencies
71+
- aligator: aligator dependencies without **editable projects**
72+
- aligator-standalone: aligator **editable projects** dependencies
73+
- loik: loik dependencies without **editable projects**
74+
- loik-standalone: loik **editable projects** dependencies
75+
76+
You have to create an environment with all **edited projects** dependencies but without **edited projects** inside.
77+
To achieve this, you can compose an environment with all defined features.
78+
79+
As an example, if you want to work on hpp-fcl and pinocchio you will need:
80+
81+
- All hpp-fcl dependencies: You can use the hpp-fcl and hpp-fcl-standalone feature
82+
- pinocchio dependencies without hpp-fcl: You can use the pinocchio feature
83+
84+
You will have to add the following line in the [pixi.toml](./pixi.toml) environments section:
85+
86+
```yaml
87+
my-env = { features = ["base", "hpp-fcl", "hpp-fcl-standalone", "pinocchio"] }
88+
```
89+
90+
To help you build the right environment, here the **editable project** dependency graph:
91+
92+
- eigenpy: nothing
93+
- hpp-fcl:
94+
- eigenpy
95+
- pinocchio:
96+
- eigenpy
97+
- hpp-fcl
98+
- pycppad:
99+
- eigenpy
100+
- proxsuite: nothing
101+
- proxsuite-nlp:
102+
- eigenpy
103+
- pinocchio
104+
- example-robot-data
105+
- proxsuite
106+
- aligator:
107+
- eigenpy
108+
- pinocchio
109+
- example-robot-data
110+
- proxsuite-nlp
111+
- loik:
112+
- pinocchio
113+
- example-robot-data
114+
115+
### Build the workspace
116+
117+
To build the workspace, open a pixi shell, then run CMake and make as usual:
118+
119+
```bash
120+
pixi shell -e my-env
121+
mkdir build
122+
cd build
123+
cmake ..
124+
make
125+
```
126+
127+
You can run all tests at once by running:
128+
129+
```bash
130+
ctest
131+
```
132+
133+
Or you can only select tests from a specific project:
134+
135+
```bash
136+
ctest -R "pinocchio-.*"
137+
```
138+
>>>>>>> 38e9093 (First workspace draft)

0 commit comments

Comments
 (0)