Skip to content

Commit

Permalink
Virtual Robot Doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
NuwanJ-RhinoPartners committed Jul 28, 2023
1 parent 7985845 commit 3acacbb
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 6 deletions.
2 changes: 1 addition & 1 deletion _includes/alert.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="alert {{ include.type}} d-flex align-items-center" role="alert">
<div>
{{ include.message }}
{{ include.message | markdownify }}
</div>
</div>
3 changes: 3 additions & 0 deletions docs/robots/virtual/v1/firmware/0_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ permalink: robots/virtual/v1/firmware/
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)

---


Autogenerated Documentation can be found on [https://pera-swarm.ce.pdn.ac.lk/robot-library-java/](https://pera-swarm.ce.pdn.ac.lk/robot-library-java/)
39 changes: 35 additions & 4 deletions docs/robots/virtual/v1/firmware/1_setup-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,54 @@ Apache Maven is a software project management and comprehension tool. Based on t
Since this repository is based on OOP concepts and have a few dependencies on ready made libraries, it was required to have a proper project management and dependency management tool. It will help to build the project easily.


## Getting started with entire build environment
## Getting started with Java Library

If you need to update the core functionalities, while the robot implementations, you need to fork and clone the repository, [github.com/Pera-Swarm/java-swarm-node](https://github.com/Pera-Swarm/java-swarm-node){:target="_blank"} first. Then you need to install the dependencies and compile the project with your changes.
If you need to update the core functionalities, while the robot implementations, you need to fork and clone the repository, [github.com/Pera-Swarm/robot-library-java](https://github.com/Pera-Swarm/robot-library-java){:target="_blank"} first. Then you need to install the dependencies and compile the project with your changes.

It is recommended to use a IDE like **IntelliJ IDEA**, since it will help you to install dependencies easily.
It is recommended to use a IDE like **Visual Studio Code** / **IntelliJ IDEA**, since it will help you to install dependencies easily.

<!-- TODO: @Dilshani, can you write the rest with instructions? -->
- Download the repository from [github.com/Pera-Swarm/robot-library-java](https://github.com/Pera-Swarm/robot-library-java){:target="_blank"}
- Once you download the repository, you need to copy the 'src/resources/config/sample_mqtt.properties' file and create 'src/resources/config/sample_mqtt.properties'.

- You need to update the following values with the values of the **MQTT Broker** you are using.

```bash
server=127.0.0.1
port=1883
username=user
password=pass
channel=v1
```

- Install Packages and Dependencies using **mvn install** command
- Compile using **mvn compile** command
- You can open the 'src/main/java/swarm/Swarm.java' file and run it using the **Run** or **Debug** option in the IDE to initiate the running of the implementation.


Auto-generated full documentation can be found in [http://pera-swarm.ce.pdn.ac.lk/robot-library-java/](http://pera-swarm.ce.pdn.ac.lk/robot-library-java/).

{% include alert.html message="It is assumed that you already installed *Java JRE* and *Maven Build Tool*." type="alert-primary" type="alert-warning" %}

## Getting started with pre-build environment

If you are interested in only the robot functionalities, not the core functionalities, you can start with the *pre-build / pre-compiled* JAR file.

You need to fork and clone the repository, [github.com/Pera-Swarm/java-robot](https://github.com/Pera-Swarm/java-robot){:target="_blank"} and implement the *Robot Class* as provided examples.


{% include alert.html message="Remaining Under Construction" type="alert-primary" %}


Additionally, you can import the latest version of the Java Library from Maven Package Regisotry, by adding the below XML code into your pom.xml. Replace the text, **VERSION** with the latest release can be found in [here](https://github.com/Pera-Swarm/robot-library-java/packages/)

```xml
<dependency>
<groupId>pera.swarm</groupId>
<artifactId>java-robot</artifactId>
<version>{{ VERSION }}</version>
</dependency>
```

## Additional Readings

- [Maven - Environment Setup](https://www.tutorialspoint.com/maven/maven_environment_setup.htm){:target="_blank"}
3 changes: 2 additions & 1 deletion docs/robots/virtual/v1/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ gh_link: docs/robots/virtual/v1/index.md

The virtual robot instances were implemented using Java, in a Maven Build Environment.

The implementation can be found in the GitHub repository, [github.com/Pera-Swarm/java-swarm-node](https://github.com/Pera-Swarm/java-swarm-node).
The implementation can be found in the GitHub repository, [github.com/Pera-Swarm/robot-library-java](https://github.com/Pera-Swarm/robot-library-java).


{: .no_toc }

0 comments on commit 3acacbb

Please sign in to comment.