Skip to content

Surface Subsystems

Michael Carlstrom edited this page Jun 29, 2023 · 1 revision

Surface Subsystems

Task Scheduler

The task scheduler works on the principle that only one task should be running at a time, as such it only allows one task to run at a time.

Main Node

The main node is a ROS Node that advertises all the runnable tasks under one big umbrella. This node also handles running and cancelling running tasks through a service.

Run Task Service

This service takes an integer id as an input and sends back 'ok' to affirm the scheduler is in fact alive. This id is processed through an internal enum. The service canceles the current running task and runs the selected task.

To be added: Topic with the currently running task

Tasks

The tasks are designed to be autonomous or tele-op tasks that can be run from any* robot state.
*(This is not confirmed)

The tasks are listed below:

  • (To be listed here)

How to make a new task

The task functions as an action server, and can be made in whatever node you are running your preexisting code in. Please see ROS2 Wiki on making an action server Link Here to make one.

The action server uses a special format that has no input value, only feedback for textual feedback

You then need to make an action client in here to ensure both ends of the communication work.

The basic structure of the action/node should follow the example of the basic timed/not task nodes found on GitHub here.

Ask Eric/Ben for more further instructions.
More documentation may come later.

GUI

The GUI works through a main window made in app.py (format?), which in essence makes a box that the GUI operates within. The actual content of the GUI is made of a collection of modules.

The GUI currently has 3 themes, light (default), dark and watermelon. Feel free to investigate those themes and add more as desired.

Modules

Within each module there are PyQT signals, which change the actual GUI and are not to go outside of the module they were created within. Each module also has one or more custom built event nodes which communicate with the ROS network at large, and also between the modules. They operate based on multithreading in Python and spinning things, ask Benjamin for more details.

How to make a new module

To be added

Human Input (PS5 and Keyboard Control)

PS5