Skip to content

Commit cbfc407

Browse files
Entry two added
1 parent 32d5c2e commit cbfc407

File tree

2 files changed

+68
-1
lines changed

2 files changed

+68
-1
lines changed

docs/_posts/2024-10-15-Week1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ From there, you can add more content to your website. You can also use custom de
2626

2727
## Robotics Academy for users
2828

29-
I installed the user version of Robotics Academy first, following these [instructions](https://jderobot.github.io/RoboticsAcademy/user_guide/). I installed it on two different PCs, one with Windows and the other with Linux (Ubuntu). I didn't encounter any problems in the installation of this versión.
29+
I installed the user version of Robotics Academy first, following these [instructions](https://jderobot.github.io/RoboticsAcademy/user_guide/). I installed it on two different PCs, one with Windows and the other with Linux (Ubuntu). I didn't encounter any problems in the installation of this version.
3030

3131
## Robotics Academy for developers
3232

docs/_posts/2024-10-20-Week2.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
title: Testing Other Branches
3+
date: 2024-10-20 20:30:00 +0100
4+
tags: [weekly progress]
5+
author: juan
6+
img_path: /assets/img/
7+
toc: true
8+
comments: true
9+
---
10+
11+
## Testing other branches
12+
13+
This week I learned how to execute Robotics Academy for developers in a specific git branch. I needed to do this to test some changes in those branches.
14+
However, you can't just switch to another branch and run the develop_academy.sh script, you need to generate a RADI for this branch.
15+
16+
## Generating a RADI
17+
18+
To generate a new RADI, we need to go to the RADI directory:
19+
20+
```bash
21+
cd <dir>/RoboticsAcademy/scripts/RADI
22+
```
23+
24+
Here we will find a script named `build.sh`, we need to execute this script. Here are the arguments the script can take:
25+
26+
```bash
27+
./build.sh -a [ROBOTICS_ACADEMY] -i [ROBOTICS_INFRASTRUCTURE] -m [RAM] -r [ROS_DISTRO] -t [IMAGE_TAG]
28+
```
29+
30+
`ROBOTICS_ACADEMY`: This is the branch name of the Robotics Academy repository to use. Default value is humble-devel.
31+
`ROBOTICS_INFRASTRUCTURE`: This is the branch name of the Robotics Infrastructure repository to use. Default value is humble-devel.
32+
`RAM`: This is the branch name of the RoboticsApplicationManager repository to use. Default value is main.
33+
`ROS_DISTRO`: This is the ROS distribution to use. The script currently supports `noetic` and `humble`. Default value is humble.
34+
`IMAGE_TAG`: This is the tag of the Docker image that will be created. Default value is `test`.
35+
36+
You can check the other repositories' branches to see if they have any with the same name as the branch you want to use from the Robotics Academy repository. You will most likely need those, if there isn't any, the default options should suffice (we can omit those arguments then).
37+
The tag is used by the scripts to know which RADI should it use, so I recommend adding the tag argument.
38+
39+
[Here](https://github.com/JdeRobot/RoboticsAcademy/blob/humble-devel/docs/generate_a_radi.md) is more information about generating RADIs.
40+
41+
It might take a while to generate the RADI, specially if it has to generate the base image first, you can see all the RADI you have available with:
42+
43+
```bash
44+
docker images
45+
```
46+
47+
## Using the new RADI
48+
49+
Now that we generated the required RADI, we need to make the script use it. For that, we need to edit the compose_file the develop_academy.sh script is using. This file might change, depending if you are using GPU acceleration or not, or if you are using NVIDIA support. The default option is no acceleration, using the `dev_humble_cpu` compose file, so we are changing that one.
50+
51+
```bash
52+
cd <dir>/RoboticsAcademy/compose_cfg
53+
```
54+
55+
Here we will find the `dev_humble_cpu.yaml` file. To use our RADI, replace the name in the `image` section to the one we are using, and comment everything in the `volumes` section (from volumes to tty, this last one not included).
56+
57+
After all that, we can now execute the `develop_academy.sh` script and check the Robotics Academy branch.
58+
59+
## Other problems
60+
61+
Sometimes the `build.sh` script can give you an error when trying to generate the image if the branch has new dependencies. This is because it's trying to build the RADI with an old base image, since the script uses an already generated one to save time. To solve this, use the `-f` argument on the script, which will force it to generate a new base image.
62+
63+
These images take a lot of space. If you aren't gonna use one anymore, you can delete it with:
64+
65+
```bash
66+
docker rmi [image_id]
67+
```

0 commit comments

Comments
 (0)