Skip to content

Conversation

@tanjpg
Copy link
Collaborator

@tanjpg tanjpg commented Dec 10, 2025

This PR contains the commits for the current initial status of the VDA5050 master prototype package. Future PRs to this package will be incremental.

Features

1. Abstracted communication layer

The ICommunicationStrategy class contains a generic class for communication from the VDA5050 Master to the VDA5050 AGV.
We use the generic ConnectionState enum to represent the connection states.

There are currently 2 implementations of this class.

1a. MqttCommunication (InheritsICommunicationStrategy)

MqttCommunication contains the MQTT Implementation of the ICommunicationStrategy class. This uses the mqtt_client implementation of the mqtt client as the base API layer

Unit tests for this class here

1b. Ros2Communication (InheritsICommunicationStrategy)

Ros2Communication contains standard implementation of ROS2 related pub-sub architecture.

Unit tests for this class here

2. Heartbeat implementation

As per the VDA5050 specifications, the connection and state topics require a certain minimum frequency of publishing. The HeartbeatListener class is the generic listener that will take callbacks to handle the state transition for the AGV given connection or state message lapses.

Unit tests for this class here

3. AGV class implementation

This current design uses the AGV class with its own individual ICommunicationStrategy pubs and subs. these subs will handle two different states. The AGVConnectionState enum handles the connection message related state transitions, while the AGVState enum handles state message related state transitions. These topic subs will have separate HeartbeatListeners

Unit tests for class here

3a. AGVConnectionState state transition

When AGV is first onboarded, or when disconnected explicitly- OFFLINE

When no connection message received after seconds - 'CONNECTIONBROKEN`

When receiving online status - ONLINE

Unit tests for state transitions here

3.b AGVState state transition

When AGV is first onboarded - STATE_UNKNOWN

When state message comes in - AVAILABLE

When state message does not come in and heartbeat fails - STATE_UNKNOWN

If ever AGVConnectionState transitions to OFFLINE or CONNECTIONBROKEN - UNAVAILABLE

Any errors reported in state message - ERROR

Unit tests for this state transition here

4. VDA5050 Master

An initial skeleton of how (1) to (3) ties in together is shown in the VDA5050Master class. The main thing added here is the onboarding and offboarding methods (register_agv and unregister_agv). Simple functions for publishing to order and instant actions are also added.

Unit tests for this class is also in the same file as the one for AGV here Since the main functions to test are mainly registering and unregistering AGVs

In future, the main VDA5050 workflow logic will be added to this class.

tanjpg added 30 commits December 8, 2025 10:12
…ructs and handler structs. Parsing to be handled by external function handles
Signed-off-by: Tan Jing Peng Glenn <[email protected]>
Signed-off-by: Tan Jing Peng Glenn <[email protected]>
Signed-off-by: Tan Jing Peng Glenn <[email protected]>
Signed-off-by: Tan Jing Peng Glenn <[email protected]>
Signed-off-by: Tan Jing Peng Glenn <[email protected]>
…tes and AGV Connection as enums, added State and Connection Heartbeat into AGV Class

Signed-off-by: Tan Jing Peng Glenn <[email protected]>
…Connection broken only for heartbeat lapses or explicit mention of connectionbroken.

Signed-off-by: Tan Jing Peng Glenn <[email protected]>
…externally is not available

Signed-off-by: Tan Jing Peng Glenn <[email protected]>
…he AGV state if disconnected or connection lost. Minor sleep to allow paho to cleanup as well.

Signed-off-by: Tan Jing Peng Glenn <[email protected]>
@tanjpg tanjpg requested review from Briancbn and sauk2 December 10, 2025 04:12
@tanjpg tanjpg self-assigned this Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant