You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simply, this thesis consists of two topic to produce the control way and feedback way. Raspberry Pi is a client of GUI Controller. Client will subscribe to AGV/<AGV_ID>/control and publish messages to AGV/<AGV_ID>/feedback to send present status. In another way, GUI will publish message to AGV/<AGV_ID>/control to send command and simulate the path tracking.
GUI publish message framework
GUI message frame: Message has 2 keys which are Method and Payload.
GUI message frame: Message has 2 keys which are Method and Payload.
Method key includes 3 type:
method
describe
STATUS
Sending present
STATUS:
{
"method": "STATUS",
"payload":"1,2,2"//"direction (1 for go ahead, 0 for go back),row,column"
}
QT GUI ARCHITECHTURE
Besides 1 main thread (MainWindow UI), this GUI application also has 3 sub-threads responsible for MQTT communication and capturing notification.
UI init with capture task. This task is responsible for capturing messages from all tasks, including MQTT messages from the subscribe task, and pub/sub task statuses. Capture serves as the bridge between the main application and the two lower tasks. The main application sends a signal/command to the capture task, which then forwards the message to the lower tasks.
Publish task has three cases:
PUBLISH_SIG: publishing a message to the broker.
SET_TOPIC_SIG: setting the topic to publish.
STOP_TASK: killing this task when the disconnect button is clicked.
Subscribe task has two cases:
SUBSCRIBE_SIG: starting to subscribe to the topic and beginning to loop.
STOP_TASK: unsubscribing from the topic, then disconnecting from the broker and stopping the loop thread forcefully.