Building a Rover with Pixhawk, Robotic Arm, and Sensors - Need Guidance on Custom Message Formats

I am currently in the process of planning a project and would greatly appreciate some guidance from the community.

My project involves creating a rover that integrates a Pixhawk, a robotic arm, and a range of sensors for enhanced functionality. The main goal is to establish a seamless flow of information between the various components.

Concept Image:

The idea is to have the Arduino send data such as motor encoder readings, stepper motor positions, and sensor data. This data will then be send to the Pixhawk, which will serve as the bridge to transmit the information to the software (Qground control) on the station side.

Additionally, I want to do bidirectional communication, allowing the Ground Control Station to send commands like motor PWM and stepper motor instructions via Pixhawk to the Arduino

I’ve taken initial steps to retrieve data from Pixhawk to Arduino, but I’m facing a challenge when it comes to defining and utilizing custom message formats for efficient data exchange.

I kindly request your assistance in the following areas:

1, Creating Custom Message Formats: how to structure custom messages effectively for both data transmission and command

2, Establishing Data Flow: Any insights on establishing a robust data flow path from Arduino to Pixhawk to the station-side software would be immensely valuable.

3, Bi-directional Communication: I’m interested in understanding how to set up a reliable method for sending commands from the GCS to the Arduino through Pixhawk.

I am open to any suggestions, code examples, or references that you might have. Your expertise and insights would greatly contribute to the success of my project.

I’m comfortable with the basics of Arduino and Python, I’ll admit that I’m still in the process of getting acquainted with C programming.