Skip to content

HelloRIC UI Communication

A ROS2 Jazzy FastAPI server that acts as a bridge between web-based user interfaces and the ROS2 ecosystem for the HelloRIC robot platform.

The Tour Guide Manager App (TGM) and the Emotion interface communicate with the ROS2 backend using this communication layer:

  • TGM consumes RESTful HTTP endpoints for tour management operations
  • Emotion interface connects via WebSocket at the /ws endpoint for real-time audio and emotion data
  • The FastAPI server provides bidirectional communication between web clients and ROS2 services

The system supports real-time audio processing, emotion display, microphone control, and comprehensive tour management through a unified web interface.

The FastAPI server is published using Uvicorn.

Architecture

The following graph shows all current relations between the interacting ROS2-Nodes.

It was generated using ROS2-Graph.

To produce another diagram, follow the install instructions and start all relevant nodes.

flowchart LR

/HelloRIC_ui_com[ /HelloRIC_ui_com ]:::main
/llm_node[ /llm_node ]:::main
/stt_node[ /stt_node ]:::main
/tts_node[ /tts_node ]:::main
/chat_node[ /chat_node ]:::main
/chat_node[ /chat_node ]:::node
/play_audio([ /play_audio<br>ric_messages/msg/PlayAudio ]):::bugged
/microphone/set_enabled([ /microphone/set_enabled<br>std_srvs/srv/SetBool ]):::bugged
/HelloRIC_ui_com/get_type_description[/ /HelloRIC_ui_com/get_type_description<br>type_description_interfaces/srv/GetTypeDescription \]:::bugged
/tour_create[/ /tour_create<br>ric_messages/srv/TourCreate \]:::bugged
/tour_delete[/ /tour_delete<br>ric_messages/srv/TourDelete \]:::bugged
/tour_get[/ /tour_get<br>ric_messages/srv/TourGet \]:::bugged
/tour_list[/ /tour_list<br>ric_messages/srv/TourList \]:::bugged
/tour_update[/ /tour_update<br>ric_messages/srv/TourUpdate \]:::bugged
/clear_history[/ /clear_history<br>std_srvs/srv/Empty \]:::bugged
/llm[/ /llm<br>ric_messages/srv/LLMChat \]:::service
/llm_node/get_type_description[/ /llm_node/get_type_description<br>type_description_interfaces/srv/GetTypeDescription \]:::bugged
/stt[/ /stt<br>ric_messages/srv/AudioBytesToText \]:::service
/stt_node/get_type_description[/ /stt_node/get_type_description<br>type_description_interfaces/srv/GetTypeDescription \]:::bugged
/tts[/ /tts<br>ric_messages/srv/TextToAudioBytes \]:::service
/tts_node/get_type_description[/ /tts_node/get_type_description<br>type_description_interfaces/srv/GetTypeDescription \]:::bugged
/chat[/ /chat<br>ric_messages/srv/Chat \]:::bugged
/chat_node/get_type_description[/ /chat_node/get_type_description<br>type_description_interfaces/srv/GetTypeDescription \]:::bugged

/HelloRIC_ui_com --> /play_audio
/HelloRIC_ui_com --> /microphone/set_enabled
/HelloRIC_ui_com/get_type_description o-.-o /HelloRIC_ui_com
/clear_history o-.-o /llm_node
/llm o-.-o /llm_node
/llm_node/get_type_description o-.-o /llm_node
/stt o-.-o /stt_node
/stt_node/get_type_description o-.-o /stt_node
/tts o-.-o /tts_node
/tts_node/get_type_description o-.-o /tts_node
/chat o-.-o /chat_node
/chat_node/get_type_description o-.-o /chat_node
/HelloRIC_ui_com <-.-> /tour_create
/HelloRIC_ui_com <-.-> /tour_delete
/HelloRIC_ui_com <-.-> /tour_get
/HelloRIC_ui_com <-.-> /tour_list
/HelloRIC_ui_com <-.-> /tour_update
/chat_node <-.-> /llm
/chat_node <-.-> /stt
/chat_node <-.-> /tts
/chat_node <-.-> /llm
/chat_node <-.-> /stt
/chat_node <-.-> /tts


subgraph keys[<b>Keys<b/>]
subgraph nodes[<b><b/>]
topicb((No connected)):::bugged
main_node[main]:::main
end
subgraph connection[<b><b/>]
node1[node1]:::node
node2[node2]:::node
node1 o-.-o|to server| service[/Service<br>service/Type\]:::service
service <-.->|to client| node2
node1 -->|publish| topic([Topic<br>topic/Type]):::topic
topic -->|subscribe| node2
node1 o==o|to server| action{{/Action<br>action/Type/}}:::action
action <==>|to client| node2
end
end
classDef node opacity:0.9,fill:#2A0,stroke:#391,stroke-width:4px,color:#fff
classDef action opacity:0.9,fill:#66A,stroke:#225,stroke-width:2px,color:#fff
classDef service opacity:0.9,fill:#3B8062,stroke:#3B6062,stroke-width:2px,color:#fff
classDef topic opacity:0.9,fill:#852,stroke:#CCC,stroke-width:2px,color:#fff
classDef main opacity:0.9,fill:#059,stroke:#09F,stroke-width:4px,color:#fff
classDef bugged opacity:0.9,fill:#933,stroke:#800,stroke-width:2px,color:#fff
style keys opacity:0.15,fill:#FFF
style nodes opacity:0.15,fill:#FFF
style connection opacity:0.15,fill:#FFF

Requirements

Contributing

We welcome contributions to this project! Please see the contributing guidelines at contributing.md in the root of this repository for more information on how to get started.