Skip to content

Commit

Permalink
Integration of VisualCircuit and VC+ (#222)
Browse files Browse the repository at this point in the history
* integration of visualcircuit and VC+

* solved the Backend issue

* Update App.tsx to change title of iframe

* Readme Changes for VC+

---------

Co-authored-by: siddhesh <siddhesh@pop-os.localdomain>
Co-authored-by: Toshan Luktuke <31101072+toshan-luktuke@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 31, 2023
1 parent 5e81d56 commit 3ab6cd7
Show file tree
Hide file tree
Showing 2,278 changed files with 763,077 additions and 12,807 deletions.
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

0 comments on commit 3ab6cd7

Please sign in to comment.