This documentation provides an overview of a project that combines Java and Python code for a simulation and an OPC UA server. The project includes code files that control the behavior of a simulated vehicle and manage OPC UA data.
The project is organized into three main components:
-
Python Script for Simulated Vehicle Control
- File: Part of robot as a behaviour .
- Description: This Python script simulates the movement of a vehicle within a virtual environment. It updates the vehicle's position, sets destinations, and provides methods to control the vehicle's behavior.
-
Java OPC UA Server Component
- Files:
CustomNamespace.java
CoordinateMapper.java
MazeSolver.java
- Description: This Java component creates an OPC UA server with a custom namespace. It registers variables related to destination points and vehicle positions. It also includes logic for coordinating movements within a maze-like environment and communicates via OPC UA.
- Files:
-
Additional Resources
- Description: Other resources like configuration files or dependencies required for the project to run effectively.
To successfully run this project, follow these additional setup steps:
To enable communication between Visual Components and the OPC UA server, use the Connectivity Plugin provided by Visual Components. Ensure that you have configured the plugin to establish a connection to the OPC UA server created in the Java component.
To install the Java dependencies required for the Java OPC UA server component, use Maven. Navigate to the Java project directory in your terminal and run the following command:
mvn install
This command will resolve and install the necessary Java dependencies specified in the project's pom.xml
file.
During the development of this project, several issues and challenges were identified:
-
Performance on Slow Computers: The project may experience occasional routing inaccuracies when running on slower computer processors. Consider optimizing the algorithm or utilizing more efficient hardware.
-
Infinite Loops and Obstacles: The project may encounter scenarios involving infinite loops and obstacles in the Q-table. Implement additional logic or strategies to handle these situations gracefully.
-
Data Type Conversions: The project currently relies on manual string parsing for data type conversions. Consider implementing more robust and automated data type conversion methods to enhance reliability.
-
Visual Components Program Responsiveness: The Visual Components program may become unresponsive at times, impacting development speed. Ensure that your system meets the recommended hardware and software requirements for Visual Components.
-
Program Crashes During Saving: There have been instances where the Visual Components program crashes during project saving, resulting in the loss of work. Frequent backups and version control are advisable to mitigate this risk.
-
Algorithm Refactoring: Consider refactoring or rewriting the algorithm developed in C for creating the Q-table. Modern frameworks or reinforcement learning libraries may provide more efficient and maintainable solutions.
Please keep these issues in mind while developing and using this project, and consider addressing them as part of ongoing development and improvement efforts.
This project represents an integration of Python and Java components to simulate vehicle control within a virtual environment and manage data using OPC UA. While it provides a foundation for these functionalities, it's important to continuously monitor and improve the project to address known issues and challenges.
By following the integration steps outlined in this documentation and keeping the identified issues in mind, you can effectively use this project as a starting point for further development and customization. Consider exploring modern frameworks and approaches to enhance the project's performance and reliability.
Short-term activities:
- Transforming the C code (MARL) to Jave 2.1 Data Type Conversions
- Use existing Java APIs for MARL
- Automatically generating the multi-robot environment in VC (using the input matrix)
- Adding uncertainty: human interaction or wear-and-tear scenario
Long-term activities:
- Use other AI APIs such as ML, GA, and so on to compare the results with MARL
- Unknown/undefined but static environment (obstacles, charging stations, loading/unloading stations)
- Dynamic environment (obstacles, charging stations, loading/unloading stations)
- Learning the collaboration between agents (using transfer learning)