Understanding RAM Repository
Understanding RAM Repository
This week I had to take a look into the Robotics Application Manager repository for the first time, since some of the problems from the branch I’ve been working last week had some problems that we thought were here. In the end, the problema was elsewhere but this helped me to understand how everything Works a bit more.
What’s RAM
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.
RAM’s architecture
Everything is run by a Manager class that changes the current state, found in manager/manager/manager.py
. There are six states:
1
2
3
4
5
6
- idle: The initial state when it's first created.
- connected: Succesfully connected to the server.
- world_ready: When selecting an exercise in Robotics Academy, it starts with launching the world for the simulation
- visualization_ready: Visualization tolos like the gazebo GUI and the terminal are ready
- application_running: A robotic application is actively running.
- paused: The application is paused.
The first two happen when you start Robotics Academy, the next 2 when clicking on an exercise, setting up the exercise, and the last 2 are dependant on the user, either by starting and running the simulation or pausing it.
Each state does something different, the ones I looked that were relevant to my work were world_ready and visualization_ready. When transitioning to the world_ready state, the manager executes an on_launch_world()
function, which creates a LauncherWorld object. The specifications of this class can be found in manager/manager/launcher/launcher_world.py
, which takes the parameters and the path to the world we want to launch, which was sent to the manager when clicking the exercise.
When transitioning to the visualization_ready state, the manager executes an on_prepare_visualization()
function, which creates a LauncherVisualization object. The specifications of this class can be found in manager/manager/launcher/launcher_visualization.py
and it essentially initializes VNC displays for the terminal and the Gazebo GUI, this last one is also initialized in this step.