Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/creating_new_RAM_launcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

This guide outlines the steps involved in creating a new RAM launcher.

For the `launch_world` transition, which transitions the application from the connected state to the world_ready state, the file executed is `launcher_world.py`, and for the `prepare_visualization` transition, the file executed is `launcher_visualization.py`.
For the `launch_world` transition, which transitions the application from the connected state to the world_ready state, the file executed is `launcher_world.py`, and for the `prepare_tools` transition, the file executed is `launcher_tools.py`.

To create a new RAM launcher for the `prepare_visualization` transition, follow these steps:
To create a new RAM launcher for the `prepare_tools` transition, follow these steps:

1. Define the New Visualization Configuration

First, add a new entry to the `visualization` dictionary in `launcher_visualization.py`. Let's call this new entry `custom_visualization` and assume it uses two modules: `abc_module` and `xyz_module`.
First, add a new entry to the `visualization` dictionary in `launcher_tools.py`. Let's call this new entry `custom_visualization` and assume it uses two modules: `abc_module` and `xyz_module`.

```python
visualization = {
Expand Down
4 changes: 2 additions & 2 deletions docs/dummy_RAM_client_guide.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Dummy RAM Client Guide

The dummy client can be used for developing and debugging new RAM launchers. It executes the transitions `connect`, `launch_world`, and `prepare_visualization`.
The dummy client can be used for developing and debugging new RAM launchers. It executes the transitions `connect`, `launch_world`, and `prepare_tools`.

Contributors can test their new launchers by replacing the code in the files executed during these transitions with their own code. This allows for testing to ensure everything functions correctly before creating new launchers.

During the `launch_world` step of the dummy client, the file executed is `simple_circuit_followingcam.launch.py`, and during the `prepare_visualization` transition, it is `launcher_gazebo_view.py`. The exercise simulation can be viewed via a VNC display at [http://127.0.0.1:6080/vnc.html](http://127.0.0.1:6080/vnc.html).
During the `launch_world` step of the dummy client, the file executed is `simple_circuit_followingcam.launch.py`, and during the `prepare_tools` transition, it is `launcher_gazebo_view.py`. The exercise simulation can be viewed via a VNC display at [http://127.0.0.1:6080/vnc.html](http://127.0.0.1:6080/vnc.html).

## Using the Dummy Client

Expand Down
31 changes: 19 additions & 12 deletions test/dummyclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import os

sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from manager.comms.consumer_message import ManagerConsumerMessage
from manager.libs.launch_world_model import ConfigurationModel
from robotics_application_manager.comms.consumer_message import ManagerConsumerMessage


class ConnectCmd(ManagerConsumerMessage):
Expand All @@ -15,24 +14,32 @@ class ConnectCmd(ManagerConsumerMessage):
class LaunchWorldCmd(ManagerConsumerMessage):
id: str = "2"
command: str = "launch_world"
data: ConfigurationModel = ConfigurationModel(
world="gazebo",
launch_file_path="/opt/jderobot/Launchers/simple_circuit_followingcam.launch.py",
)


class LaunchPrepareViz(ManagerConsumerMessage):
data: dict = {
"world": {
"type": "gazebo",
"launch_file_path": "/opt/jderobot/Launchers/simple_circuit_followingcam.launch.py",
},
"robot": {
"type": None,
},
}


class LaunchPrepareTools(ManagerConsumerMessage):
id: str = "3"
command: str = "prepare_visualization"
data: str = "gazebo_rae"
command: str = "prepare_tools"
data: dict = {
"tools": ["console", "simulator"],
"config": {},
}


websocket.enableTrace(True)
ws = websocket.create_connection("ws://localhost:7163")

ws.send(ConnectCmd().json())
ws.send(LaunchWorldCmd().json())
ws.send(LaunchPrepareViz().json())
ws.send(LaunchPrepareTools().json())


while True:
Expand Down
Loading