From 3acacbbee3acdd0df4c45b08c5b5ce754fc3ccf1 Mon Sep 17 00:00:00 2001 From: Nuwan Jaliyagoda Date: Fri, 28 Jul 2023 23:31:45 +0530 Subject: [PATCH] Virtual Robot Doc updates --- _includes/alert.html | 2 +- docs/robots/virtual/v1/firmware/0_intro.md | 3 ++ .../virtual/v1/firmware/1_setup-guide.md | 39 +++++++++++++++++-- docs/robots/virtual/v1/index.md | 3 +- 4 files changed, 41 insertions(+), 6 deletions(-) diff --git a/_includes/alert.html b/_includes/alert.html index f74b5ed..ae9f153 100644 --- a/_includes/alert.html +++ b/_includes/alert.html @@ -1,5 +1,5 @@ \ No newline at end of file diff --git a/docs/robots/virtual/v1/firmware/0_intro.md b/docs/robots/virtual/v1/firmware/0_intro.md index b04f6a6..a21e9fc 100644 --- a/docs/robots/virtual/v1/firmware/0_intro.md +++ b/docs/robots/virtual/v1/firmware/0_intro.md @@ -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/) diff --git a/docs/robots/virtual/v1/firmware/1_setup-guide.md b/docs/robots/virtual/v1/firmware/1_setup-guide.md index 391685c..7cf69fc 100644 --- a/docs/robots/virtual/v1/firmware/1_setup-guide.md +++ b/docs/robots/virtual/v1/firmware/1_setup-guide.md @@ -29,14 +29,33 @@ 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. - +- 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 @@ -44,8 +63,20 @@ If you are interested in only the robot functionalities, not the core functional 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 + + pera.swarm + java-robot + {{ VERSION }} + +``` + ## Additional Readings - [Maven - Environment Setup](https://www.tutorialspoint.com/maven/maven_environment_setup.htm){:target="_blank"} diff --git a/docs/robots/virtual/v1/index.md b/docs/robots/virtual/v1/index.md index 8385e02..62517c1 100644 --- a/docs/robots/virtual/v1/index.md +++ b/docs/robots/virtual/v1/index.md @@ -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 } \ No newline at end of file