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

Integration of VisualCircuit and VC+ #222

Merged
merged 4 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
51 changes: 47 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ Visual Circuit is an **open source** tool to develop robotic applications. It ai
For more information visit our site [VisualCircuit](https://jderobot.github.io/VisualCircuit/)


## Setup
## Prerequisite

### Front-end
For more specific instructions check the frontend [readme](./frontend/README.md)
1. Clone the repository https://github.com/JdeRobot/VisualCircuit.git
3. Change directory to `frontend`
4. Run `npm install`
5. Run `npm start`
6. Open http://localhost:3000/ in browser.


### Back-end
For more specific instructions check the backend [readme](./backend/README.md)
Expand All @@ -41,7 +40,51 @@ For eg. `python -m venv .venv`
`pip install -r requirements.txt`
5. Add `.env` file to the `backend` folder. And add the variables as defined in [.env.template](./.env.template)
6. Create the static files to serve during execution by `python manage.py collectstatic`
7. Start the server by running `python manage.py runserver 8000`


### How to setup the VC+

1) Navigate to VC+:```cd VC+```
2) Activate the environment:```source env/bin/activate```
3) Install required packages
```
pip install django
pip install djangorestframework
pip install django-webpack-loader
```

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

## Start Application

#### Step 1: Start Frontend
1. Navigate to the frontend directory:```cd frontend```
2. Start the frontend server:```npm start```


#### Step 2: Start Backend
1. Navigate to the backend directory:```cd backend```
2. Start the backend server:```python3 manage.py runserver 8080```


#### Step 4: Start VC+ Frontend
1. Navigate to VC+:```cd VC+```
2. Navigate to the react_frontend directory:```cd react_frontend```
3. Run the development server:```yarn run dev```


#### Step 5: Start Another Backend Instance
1. Open another terminal.
2. Navigate to VC+:```cd VC+```
3. Activate the environment:```source env/bin/activate```
4. Start another instance of the backend server:```python3 manage.py runserver```

#### Step 6: Run Docker image RADI
``sudo docker run --rm -it --name radi -p 2303:2303 -p 1905:1905 -p 8765:8765 -p 6080:6080 -p 1108:1108 -p 7163:7163 jderobot/robotics-academy:3.4.5 --no-server``


<!-- CONTRIBUTING -->
## Contributing
Expand Down
117 changes: 117 additions & 0 deletions VC+/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# IPython Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# dotenv
.env

# virtualenv
.venv/
venv/
ENV/

# Spyder project settings
.spyderproject

# Rope project settings
.ropeproject

.idea/

docs/.jekyll-cache/

.jekyll-cache
_site

# IDEs
.vscode

# jetbrains files
.idea/

# react stuff
node_modules/

lerna-debug.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
/.changelog
.npm/
webpack-stats.json
*.DS_Store
react_frontend/static
developer_scripts
132 changes: 132 additions & 0 deletions VC+/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<a href="https://mmg-ai.com/en/"><img src="https://jderobot.github.io/assets/images/logo.png" width="100 " align="right" /></a>

# Code of Conduct

<img src="./img/codeofconduct.gif" width="575" height="300" />

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders.

All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
30 changes: 30 additions & 0 deletions VC+/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<a href="https://mmg-ai.com/en/"><img src="https://jderobot.github.io/assets/images/logo.png" width="100 " align="right" /></a>

# Contributing to RoboticsAcademy

First off, thanks for your interest in contributing to RoboticsAcademy! All contributors are welcome, from commenting issues to reviewing or sending Pull Requests.

## How to contribute?

If you are new to GitHub, visit the [first-contributions instructions](https://github.com/firstcontributions/first-contributions/blob/master/README.md) to learn how to contribute on GitHub.

To find issues you can help with, go though the list of [good first issues](https://github.com/JdeRobot/RoboticsAcademy/issues?q=is%3Aissue+is%3Aopen+label%3Agood-first-issue) or issues labeled with [help wanted](https://github.com/JdeRobot/RoboticsAcademy/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22).

Once found or created an issue, let us know that you want to work on it by commenting in the issue.

## Questions, suggestions or new ideas

Please don't open an issue to ask a question or suggestion. Use the [GitHub Discussions](https://github.com/JdeRobot/RoboticsAcademy/discussions) which are meant to it. New ideas and enhacements are also welcome as discussion posts.

## Issue reporting

Feel free to [create a new issue](https://github.com/sayanarijit/xplr/issues/new) if you have some issue to report. But first, make sure that the issue has not been reported yet.

Be sure to explain in details the context and the outcome that you are lookign for. If reporting bugs, provide basic information like you OS version, RADI version and the exercise launched.

## How to contribute in exercises documentation?

Take a look at our [documentation guide lines](https://jderobot.github.io/RoboticsAcademy/contribute/) to contribute in github pages related issues.

Thanks! :heart: :heart:
RoboticsAcademy Team
11 changes: 11 additions & 0 deletions VC+/FileSystem/User1/ProjectA/application/code.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from funtion import count

if __name__ == '__main__':

print("Ejecutandose")

contador = 0

while True:

contador = count(contador)
10 changes: 10 additions & 0 deletions VC+/FileSystem/User1/ProjectA/application/funtion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import time

def count(contador):
print(contador)

time.sleep(1)

contador += 5

return contador
1 change: 1 addition & 0 deletions VC+/FileSystem/User1/ProjectA/metadata/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"last_world": "<?xml version=\"1.0\" ?>\n<sdf version=\"1.5\">\n <world name=\"default\">\n <gui fullscreen=1></gui>\n <scene>\n <grid>false</grid>\n <sky>\n <clouds>\n <speed>12</speed>\n </clouds>\n </sky>\n </scene>\n <!-- A global light source -->\n <include>\n <uri>model://sun</uri>\n <name>sun_1</name>\n <pose>0 0 1 0 0 0</pose>\n </include>\n <include>\n <uri>model://simple_circuit</uri>\n <pose>0 0 0 0 0 0</pose>\n </include>\n <include>\n <uri>model://f1</uri>\n <pose>53.462 -10.734 0.004 0 0 -1.57</pose>\n </include>\n </world>\n</sdf>", "last_world_name": "Follow_Line_Default.world"}
Loading