Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added nodeenv to developers docs #2280

Open
wants to merge 2 commits into
base: old_manager
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 27 additions & 13 deletions docs/InstructionsForDevelopers.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,51 @@ To get started with developing exercise in Robotics Academy, a developers needs
prerequisite - Python

1) First create a virtual env
```
virtualenv env
```bash
virtualenv env_name
```
Virtual environment with name "env" is created
Virtual environment with name "env_name" is created

2) Activate the environment
```bash
source env_name/bin/activate
```
source env/bin/activate
```
3) Install required packages

3) Confirm that the env is successfully selected
```bash
which python3
```

4) Install required packages
```bash
pip install django
pip install djangorestframework
pip install django-webpack-loader
pip install django-cors-headers
pip install pylint
pip install pylint==2.* # afaik not working for v3.*, tested on 2.17.4
```

4) Install dependencies for REACT (with Yarn or npm, required Node.JS >= 14.16)
5) Install node in venv
```bash
pip install nodeenv
nodeenv -p
npm install -g npm # check installation
npm -v
```

6) Install dependencies for REACT (with Yarn or npm, required Node.JS >= 14.16)
```bash
cd react_frontend/ && yarn install && yarn run dev
```

5) Now at the root of the project we are ready to launch the Django webserver
```
7) Now at the root of the project we are ready to launch the Django webserver
```bash
python3 manage.py runserver
```
The webserver is not connected with the RADI.

6) To connect the webserver with RADI, Run:
```
8) To connect the webserver with RADI, Run:
```bash
docker run --rm -it -p 2303:2303 -p 1905:1905 -p 8765:8765 -p 6080:6080 -p 1108:1108 -p 7163:7163 jderobot/robotics-academy --no-server
```

Expand All @@ -74,7 +88,7 @@ An exercise entry in the database must include the following data:
- ```state```: changes the state indicator (active = green; prototype = yellow; inactive = red)
- ```language```: programming language used
- ```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:
```
```json
{"ROS1":[
{
"application": {
Expand Down