|
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