Robotics Application Manager
Project description
Robotics Application Manager (RAM) Documentation
Table of Contents
Project Overview
The Robotics Application Manager (RAM) is an advanced manager for executing robotic applications. It operates as a state machine, managing the lifecycle of robotic applications from initialization to termination and uses the following ports to communicate:
- 7063: Connexion with other applications (Robotics Academy, BT Studio, Unibotics)
- 6080-6090: Tools VNC
Main Class: Manager
Purpose and Functionality
The Manager class is the core of RAM, orchestrating operations and managing transitions between various application states.
States and Transitions
- States:
idle: The initial state, waiting for a connection.connected: Connected and ready to initiate processes.world_ready: The world environment is set up and ready.tools_ready: Tools are prepared and ready.application_running: A robotic application is actively running.paused: The application is paused.
- Transitions:
connect: Moves fromidletoconnected.launch_world: Initiates the world setup fromconnected.prepare_tools: Prepares the tools inworld_ready.run_application: Starts the application intools_readyorpaused.pause: Pauses the running application.resume: Resumes a paused application.terminate: Stops the application and goes back totools_ready.stop: Completely stops the application.disconnect: Disconnects from the current session and returns toidle.
- Stateless Transitions:
gui: Redirects content to the gui webserver.style_check: Triggers on_style_check.code_analysis: Triggers on_code_analysis.code_format: Triggers on_code_format.code_autocomplete: Triggers on_code_autocomplete.
Key Methods
on_connect(self, event): Manages the transition to the 'connected' state.on_launch_world(self, event): Prepares and launches the robotic world.on_prepare_tools(self, event): Sets up tools.on_run_application(self, event): Executes the robotic application.on_pause(self, msg): Pauses the running application.on_resume(self, msg): Resumes the paused application.on_terminate(self, event): Terminates the running application.on_disconnect(self, event): Handles disconnection and cleanup.on_style_check(self, event): Check the style of the user code.on_code_analysis(self, event): Analyzes the style and format of the user code using pylint.on_code_format(self, event): Formats the user code using black.on_code_autocomplete(self, event): Searches for all available code completions using Jedi.- Exception Handling: Details how specific errors are managed in each method.
Interactions with Other Components
Interaction Between Manager and ManagerConsumer
- Message Queue Integration:
ManagerConsumerputs received messages intomanager_queueforManagerto process. - State Updates and Commands:
Managersends state updates or commands to the client throughManagerConsumer. - Client Connection Handling:
Managerrelies onManagerConsumerfor client connection and disconnection handling. - Error Handling:
ManagerConsumercommunicates exceptions back to the client andManager. - Lifecycle Management:
Managercontrols the start and stop of theManagerConsumerWebSocket server.
Interaction Between Manager and LauncherWorld
- World Initialization and Launching:
ManagerinitializesLauncherWorldwith specific configurations, such as world type (e.g.,gazebo,drones) and the launch file path. - Dynamic Module Management:
LauncherWorlddynamically launches modules based on the world configuration and ROS version, as dictated byManager. - State Management and Transition: The state of
Manageris updated in response to the actions performed byLauncherWorld. For example, once the world is ready,Managermay transition to theworld_readystate. - Termination and Cleanup:
Managercan instructLauncherWorldto terminate the world environment through itsterminatemethod.LauncherWorldensures a clean and orderly shutdown of all modules and resources involved in the world setup. - Error Handling and Logging:
Managerhandles exceptions and errors that may arise during the world setup or termination processes, ensuring robust operation.
Interaction Between Manager and LauncherTools
- Visualization Setup:
ManagerinitializesLauncherToolswith a specific tools configuration, which can include tools likeconsole,simulator,web_gui, etc. - Module Launching for Tools:
LauncherToolsdynamically launches tools modules based on the configuration provided byManager. - State Management and Synchronization: Upon successful setup of the tools,
Managercan update its state (e.g., totools_ready) to reflect the readiness of the tools. - Termination of Tools:
Managercan instructLauncherToolsto terminate the current tools setup using itsterminatemethod. - Error Handling and Logging:
Manageris equipped to manage exceptions and errors that might occur during the setup or termination of the tools.
Interaction Between Manager and application_process
- Application Execution:
Managerinitiates theapplication_processwhen transitioning to theapplication_runningstate. - Application Configuration and Launching: Before launching the
application_process,Managerconfigures the necessary parameters. - Process Management:
Managermonitors and controls theapplication_process. - Error Handling and Logging:
Manageris responsible for handling any errors or exceptions that occur during the execution of theapplication_process. - State Synchronization: The state of the
application_processis closely synchronized with the state machine inManager.
Interaction Between Manager and Server (Specific to RoboticsAcademy Applications) (Now inside tool web_gui)
- Dedicated WebSocket Server for GUI Updates:
Serveris used exclusively for RoboticsAcademy applications that require real-time interaction with a web-based GUI. - Client Communication for GUI Module: For RoboticsAcademy applications with a GUI module,
Serverhandles incoming and outgoing messages. - Real-time Interaction and Feedback:
Serverallows for real-time feedback and interaction within the browser-based GUI. - Conditional Operation Based on Application Type:
Managerinitializes and controlsServerbased on the specific needs of the RoboticsAcademy application being executed. - Error Handling and Logging:
Managerensures robust error handling forServer.
Usage Example
-
Connecting to RAM:
- Initially, the RAM is in the
idlestate. - A client (e.g., a user interface or another system) connects to RAM, triggering the
connecttransition and moving RAM to theconnectedstate.
- Initially, the RAM is in the
-
Launching the World:
- Once connected, the client can request RAM to launch a robotic world by sending a
launch_worldcommand. - RAM transitions to the
world_readystate after successfully setting up the world environment.
- Once connected, the client can request RAM to launch a robotic world by sending a
-
Setting Up Tools:
- After the world is ready, the client requests RAM to prepare the tools with a
prepare_toolscommand. - RAM transitions to the
tools_readystate, indicating that the tools are set up and ready.
- After the world is ready, the client requests RAM to prepare the tools with a
-
Running an Application:
- The client then requests RAM to run a specific robotic application, moving RAM into the
application_runningstate. - The application executes, and RAM handles its process management, including monitoring and error handling.
- The client then requests RAM to run a specific robotic application, moving RAM into the
-
Pausing and Resuming Application:
- The client can send
pauseandresumecommands to RAM to control the application's execution. - RAM transitions to the
pausedstate when paused and returns toapplication_runningupon resumption.
- The client can send
-
Stopping the Application:
- Finally, the client can send a
stopcommand to halt the application. - RAM stops the application and transitions back to the
tools_readystate, ready for new commands.
- Finally, the client can send a
-
Disconnecting:
- Once all tasks are completed, the client can disconnect from RAM, which then returns to the
idlestate, ready for a new session.
- Once all tasks are completed, the client can disconnect from RAM, which then returns to the
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file robotics_application_manager-5.6.9.tar.gz.
File metadata
- Download URL: robotics_application_manager-5.6.9.tar.gz
- Upload date:
- Size: 56.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8dcecd7c98cb89208be49d5551b9ef301aab04958f2596cb17a4c8ac86f9b5d
|
|
| MD5 |
e2710b464a57bf77ada951198a297d52
|
|
| BLAKE2b-256 |
7967a5fb6e3d9cecb0436c54435c1dc0ae133ebe61b055a3161463b44d516e11
|
Provenance
The following attestation bundles were made for robotics_application_manager-5.6.9.tar.gz:
Publisher:
python-publish.yml on JdeRobot/RoboticsApplicationManager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
robotics_application_manager-5.6.9.tar.gz -
Subject digest:
d8dcecd7c98cb89208be49d5551b9ef301aab04958f2596cb17a4c8ac86f9b5d - Sigstore transparency entry: 1206344113
- Sigstore integration time:
-
Permalink:
JdeRobot/RoboticsApplicationManager@95c9925d5b6e00cadde5e11c3789003eea0ba72c -
Branch / Tag:
refs/heads/humble-devel - Owner: https://github.com/JdeRobot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@95c9925d5b6e00cadde5e11c3789003eea0ba72c -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file robotics_application_manager-5.6.9-py3-none-any.whl.
File metadata
- Download URL: robotics_application_manager-5.6.9-py3-none-any.whl
- Upload date:
- Size: 66.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf870140687c8e9f1c47a6fc56348241daf8b051f0cb32061b8556a24b90d085
|
|
| MD5 |
62a08429023fa9d1518ba412e7a74da6
|
|
| BLAKE2b-256 |
c0940180bd39cd98b2a76f34f1cef91562e0eff3d578ac02dae1412acc813184
|
Provenance
The following attestation bundles were made for robotics_application_manager-5.6.9-py3-none-any.whl:
Publisher:
python-publish.yml on JdeRobot/RoboticsApplicationManager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
robotics_application_manager-5.6.9-py3-none-any.whl -
Subject digest:
cf870140687c8e9f1c47a6fc56348241daf8b051f0cb32061b8556a24b90d085 - Sigstore transparency entry: 1206344143
- Sigstore integration time:
-
Permalink:
JdeRobot/RoboticsApplicationManager@95c9925d5b6e00cadde5e11c3789003eea0ba72c -
Branch / Tag:
refs/heads/humble-devel - Owner: https://github.com/JdeRobot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@95c9925d5b6e00cadde5e11c3789003eea0ba72c -
Trigger Event:
workflow_dispatch
-
Statement type: