You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Be sure to explain in details the context and the outcome that you are lookign f
24
24
25
25
## How to contribute in exercises documentation?
26
26
27
-
Take a look at our [documentation guide lines](https://jderobot.github.io/RoboticsAcademy/contribute/) to contribute in github pages related issues.
27
+
Take a look at our [documentation guide lines](https://jderobot.github.io/RoboticsAcademy/developer_guide) to contribute in github pages related issues.
To include a new exercise, add the folder with the exercise contents in exercises/static/exercises following the file name conventions. Then, create the entry in db.sqlite3. A simple way to do this is by using the Django admin page:
55
+
To include a new exercise, add the folder with the exercise contents in exercises/static/exercises following the file name conventions:
56
+
-```entry_point/ros_version```: used for the entrypoint of an exercise run by the RAM
57
+
-```launch/ros_version```: used for world launch files (.launch)
58
+
-```python_template/ros_version```: used for the python templates needed to compose the user code
59
+
-```react-components```: exercise specific react components
60
+
61
+
Then, create the entry in db.sqlite3. A simple way to do this is by using the Django admin page:
56
62
1) Run ```python3.8 manage.py runserver```.
57
63
2) Access http://127.0.0.1:8000/admin/ on a browser and log in with "user" and "pass".
58
-
3) Click on "add exercise" and fill the fields: exercise id (folder name), name (name to display), state, language and description (description to display). Save and exit.
64
+
3) Click on "add exercise" and fill the required fields specified below. Save and exit.
59
65
4) Commit db.sqlite3 changes.
60
66
67
+
An exercise entry in the database must include the following data:
68
+
-```exercise id```: unique exercise identifier, must match the folder name
69
+
-```name```: name to display on the exercise list
70
+
-```description```: description to display on the exercise list
71
+
-```tags```: an exercise must include at least one ROS tag ("ROS1" or "ROS2"). The exercise will only be shown on the exercise list when the RADI ROS version installed is listed in the tags. Tags are also used by the search bar.
72
+
-```state```: changes the state indicator (active = green; prototype = yellow; inactive = red)
73
+
-```language```: programming language used
74
+
-```configuration```: available launch options to run the exercise written in JSON. If the generic react components are used, the exercise frontend will automatically request to launch the exercise using the first configuration that matches the key ROSX (X = ROS version detected by django). If the generic circuit selector react component is used, it will automatically display all the launch options items of the array that matches the key ROSX (X = ROS version detected by django), displaying the name stored under the key "name". Sample configuration JSON including 2 launch options for ROS1 and 1 launch option for ROS2:
A fast way of development and testing can be achieved using volume binding. This allows you to run a RADI including changes from your local file system without building the image. This method is only suitable when the changes are made on the repositories RoboticsAcademy or RoboticsApplicationManager. When modifying the dependencies on RoboticsInfrastructure, a new image should be built.
3
+
4
+
## Prerequisites
5
+
- Developer environment installed. Follow the instructions on [How to set up the developer environment section.][]
6
+
7
+
## Instructions
8
+
This method consists in replicating the folder /RoboticsAcademy that exists inside the RADI on your local drive. Then, a docker run option is used to replace the RADI folder with your local folder. By doing so, all the changes made on your local files are included in the container. Note that this is a shared volume, so all changes made to your shared volume even from inside the container are persistent.
9
+
1. Replicate the folder RADI:/RoboticsAcademy inside your local file system. This can be achieved by cloning the repository [RoboticsAcademy][https://github.com/JdeRobot/RoboticsAcademy] and the repository [RoboticsApplicationManager][https://github.com/JdeRobot/RoboticsApplicationManager] inside the folder RoboticsAcademy/src (include the contents directly, not into a subfolder src/RoboticsApplicationManager).
10
+
2. Run ``` yarn run dev ``` if there were any front-end changes
11
+
3. Run the docker image mounting the volume with the instruction ``` docker run --rm -it --name radi -p 8000:8000 -p 2303:2303 -p 1905:1905 -p 8765:8765 -p 6080:6080 -p 1108:1108 -p 7163:7163 --mount type=bind,source="$(pwd)"/RoboticsAcademy,target=/RoboticsAcademy jderobot/robotics-academy ``` replacing the mount source path to your RoboticsAcademy path.
12
+
13
+
14
+
[How to set up the developer environment section.]: /docs/InstructionsForDevelopers.md
# Creating a mini RADI (Robotics Application Docker Image)
2
+
3
+
The build.sh script is designed to build a Docker mini RADI image, from specific branches. It is customizable, allowing the user to choose the version of ROS (Robot Operating System) used, the branches of different repositories, and the tag of the Docker image. Below is a step-by-step guide on how to use the script.
4
+
5
+
## Prerequisites
6
+
- Docker installed on your machine. You can download Docker from [here](https://www.docker.com/products/docker-desktop).
7
+
- Git installed on your machine. You can download Git from [here](https://git-scm.com/downloads).
`ROBOTICS_ACADEMY`: This is the branch name of the Robotics Academy repository to use. Default value is master.
29
+
30
+
`ROBOTICS_INFRASTRUCTURE`: This is the branch name of the Robotics Infrastructure repository to use. Default value is noetic-devel.
31
+
32
+
`RAM`: This is the branch name of the RoboticsApplicationManager repository to use. Default value is main.
33
+
34
+
`ROS_DISTRO`: This is the ROS distribution to use. The script currently supports `noetic` and `humble`. Default value is noetic.
35
+
36
+
`IMAGE_TAG`: This is the tag of the Docker image that will be created. Default value is `test`.
37
+
## Example
38
+
39
+
For instance, to build a Docker image using the master branch of the Robotics Academy repository, the noetic-devel branch of the Robotics Infrastructure repository, the main branch of the RAM repository, the noetic ROS distribution, and tag the image as my_image, you would run:
40
+
41
+
```bash
42
+
./build.sh -f -a master -i noetic-devel -m main -r noetic -t my_image
43
+
```
44
+
Use '-f' to force build the base image. If omitted, the base image is created only if it doesn't exist.
45
+
## Troubleshooting
46
+
47
+
If an error occurs while running the script, ensure that:
48
+
49
+
- All the specified branches exist in their respective repositories.
50
+
- The specified ROS distribution is either noetic or humble.
51
+
- You have the necessary permissions to build Docker images on your machine. If not you can run:
# Building the RADI Pre-base and Base Docker Images
2
+
3
+
This guide will walk you through the process of building two Docker images, RADI pre-base and RADI base, which are essential building blocks for creating the mini RADI. This steps are not necesary if you just made changes in the RoboticsAcademy repository.
4
+
5
+
## 1. RADI Pre-base Image
6
+
The RADI pre-base Docker image includes all the necessary robotic dependencies for running robotic simulations, as well as the robot models within the CustomRobots directory. If you make any changes in the dependecies or the robot models (RoboticsInfrastructure repository), you will need to build the RADI pre-base image.
7
+
8
+
### Building the RADI Pre-base Image
9
+
The Dockerfile required to build the RADI pre-base image is hosted on the RoboticsInfrastructure GitHub repository. Here are the steps to build the image:
This step is critical as it dictates the generation of the pre-base Docker image that's compatible with either ROS1 or ROS2. This is contingent upon whether changes have been integrated into the main branches of the different versions.
24
+
25
+
If you're working from the main branches of ROS1 (`noteic-devel`) or ROS2 (`humble-devel`), simply run the Dockerfile from the corresponding branch. This will automatically generate the appropriate prebase image.
However, if you're working from an auxiliary branch, such as an issue branch, you'll need to substitute the $ROS_DISTRO-devel in the git clone command with the name of your current branch.
Please note that the Docker image tag (jderobot/robotics-applications:name-of-your-branch) should reflect your branch name. This ensures that your Docker image is properly associated with your branch, and prevents any mix-up with Docker images from other branches.
44
+
45
+
Remember, this step is crucial for ensuring the successful generation of a Docker pre-base image compatible with the correct version of ROS. Be sure to double-check your branch name before running the Dockerfile.
46
+
47
+
## 2. RADI base Image
48
+
49
+
To generate the base Docker image, you simply need to execute the base Dockerfile. This process is generally straightforward and does not require many adjustments. However, there are some situations in which you will need to make modifications.
50
+
51
+
## Modifying the Robotics Application Manager (RAM)
52
+
53
+
If you have made changes to the Robotics Application Manager (RAM), which is quite uncommon, you will need to insert the name of your branch in the command that clones the RAM inside the Docker container. You can do this by adding your branch name when running the git clone commandin the dockerfile.
54
+
55
+
```dockerfile
56
+
RUN git clone https://github.com/JdeRobot/RoboticsApplicationManager.git -b your-branch-name /RoboticsApplicationManager
57
+
```
58
+
59
+
## Building from a Custom Prebase Image
60
+
61
+
If you want to generate the base image from a prebase image that you created, you will need to modify the tag inside the Dockerfile so that it builds from the appropriate pre-base. The FROM command at the beginning of your Dockerfile should refer to your custom pre-base Docker image.
62
+
63
+
```dockerfile
64
+
FROM jderobot/robotics-applications:<tag>
65
+
```
66
+
Remember to replace the tag with the tag of your custom pre-base Docker image. This ensures that your Docker base image builds from the correct pre-base image.
67
+
68
+
After making these modifications, you can proceed with building your base Docker image:
0 commit comments