playground:playground
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
playground:playground [2022/10/24 10:35] – christiandc | playground:playground [2022/10/24 11:05] (current) – christiandc | ||
---|---|---|---|
Line 100: | Line 100: | ||
## Create your airlock scenario | ## Create your airlock scenario | ||
- | We have now to create the scenario read by minus on the airlock. Create a .sh file and a .txt file. | + | We have now to create the scenario read by minus on the airlock. Create a .sh file and a .yaml file. |
- | The .sh file wille execute the commands submitting | + | The .sh file wille execute the commands submitting |
+ | The file tree should look like that: | ||
< | < | ||
+ | ... | ||
+ | ├── cortexbot | ||
+ | │ ├── generate.sh | ||
+ | │ ├── my_task | ||
+ | ├──scenario.yaml | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | Concerning the bash file : | ||
+ | |||
+ | < | ||
+ | |||
+ | #!/bin/bash | ||
+ | |||
+ | # Creating the task | ||
+ | |||
+ | echo "Tasks creation and submission" | ||
+ | |||
+ | echo " | ||
+ | echo " | ||
+ | |||
+ | minus task create my_task | ||
+ | |||
+ | echo " | ||
+ | |||
+ | minus task submit my_task.task | ||
+ | |||
+ | # Delete node folders and tasks | ||
+ | |||
+ | rm -rf my_task.task | ||
+ | |||
+ | echo "Wait for tasks to finish" | ||
+ | |||
+ | loop=True | ||
+ | value=$(minus testbed status | grep " | ||
+ | while [ $loop = ' | ||
+ | do | ||
+ | if [ $value = ' | ||
+ | then loop=False | ||
+ | else sleep 10 && echo " | ||
+ | fi | ||
+ | value=$(minus testbed status | grep " | ||
+ | done | ||
+ | |||
+ | echo "Tasks finished" | ||
+ | |||
+ | </ | ||
+ | |||
+ | And the scenario file : | ||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | # Example scenario description file | ||
+ | # | ||
+ | # All lines starting with "#" | ||
+ | |||
+ | |||
+ | # Scenario textual description | ||
+ | # | ||
+ | description: | ||
+ | |||
+ | # Experiment maximum duration | ||
+ | # Time after which the experiment is forced to stop | ||
+ | # | ||
+ | |||
+ | duration: 3600 | ||
+ | |||
+ | # Node list | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # entry (entry point script relative to the task root) | ||
+ | # exit (exit point script relative to the task root. Use " | ||
+ | |||
+ | |||
+ | #list of scheduler nodes= = [3, 4, 6, 7, 8, 9, 13, 14, 16, 17, 18, 23, 24, 25, 27, 28, 32, 33, 34, 35, 37] | ||
+ | |||
+ | |||
+ | nodes: | ||
+ | |||
+ | #scheduler node | ||
+ | |||
+ | node5: | ||
+ | container: | ||
+ | - image: <[DOCKER USERNAME]/ | ||
+ | command: bash -lc " | ||
+ | |||
+ | |||
+ | #emitter nodes corresponding to the scheduler list | ||
+ | |||
+ | node3: | ||
+ | container: | ||
+ | - image: thomasbeligne/ | ||
+ | command: bash -lc "/ | ||
+ | |||
+ | node4: | ||
+ | container: | ||
+ | - image: thomasbeligne/ | ||
+ | command: bash -lc "/ | ||
+ | |||
+ | node6: | ||
+ | container: | ||
+ | - image: thomasbeligne/ | ||
+ | command: bash -lc "/ | ||
+ | |||
+ | node7: | ||
+ | container: | ||
+ | - image: thomasbeligne/ | ||
+ | command: bash -lc "/ | ||
+ | |||
+ | |||
+ | node8: | ||
+ | container: | ||
+ | - image: thomasbeligne/ | ||
+ | command: bash -lc "/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | You can add as many nodes as you want, but be sure they are in the scheduler list on your docker file. In your scenario yu have to check the transmitter identifiacation -T < | ||
+ | |||
+ | Once you have created this folder, send it to airlock and connect to airlock using ssh : : | ||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | you@yourpc: | ||
+ | |||
+ | you@yourpc: | ||
+ | |||
+ | </ | ||
+ | |||
+ | Once your connected, give the rights to the bash file and book the testbed : | ||
+ | |||
+ | < | ||
+ | |||
+ | you@srvairlock: | ||
+ | you@srvairlock: | ||
+ | |||
+ | </ | ||
+ | |||
+ | The airlock config is now done. Let's now prepare the Turtlebot | ||
+ | |||
+ | ## Config the Turtlebot | ||
+ | |||
+ | |||
+ | ## Launch the experiment | ||
+ | |||
+ | The robot is moving in the Cortexlab and ready to recieve the Data. Go now on your airlock servor and launch the bash file : | ||
+ | |||
+ | < | ||
+ | |||
+ | thomas@srvairlock: | ||
+ | |||
+ | </ | ||
+ | |||
+ | All the radios present in the scenario are succesivly sending packets to the robot. You can check thath everything is fine by doing : | ||
+ | |||
+ | < | ||
+ | username@srvairlock: | ||
+ | </ | ||
+ | |||
+ | and abort the task | ||
+ | |||
+ | < | ||
+ | username@srvairlock: | ||
+ | </ | ||
+ | |||
+ | ## Gathering the results |
playground/playground.1666600504.txt.gz · Last modified: 2022/10/24 10:35 by christiandc