Closed byt3bl33d3r closed 5 months ago
telemetry_server
allows you to publish MAVLink telemetry messages like position
indeed. But PX4 does not listen for those messages :thinking:. You would use telemetry_server
to write your own autopilot component, for instance.
Or maybe I misunderstand: what do you expect PX4 to do when you send position messages to it? It's a bit like if you send a "takeoff" message to QGC: it's not exactly like if QGC itself can fly :grin:. "Takeoff" is a command you send to a drone, and "position" is telemetry that is usually received by a GCS that observes a drone.
Gootcha, ok so i think I misunderstood how the pieces fit together. What I'm trying to do is basically send "mocked" sensor data to the PX4. Specifically I want to send IMU and GPS data from a Python script to the PX4 so that it thinks it's receiving the data from an actual GPS and IMU.
Is this possible?
That's what HITL does, but I don't know exactly how it works :thinking:
Makes sense. I'll take a look at HITL then. Cheers
I have the following code that reads a CSV over the network with telemetry I want to feed to PX4:
I'm starting PX4 in SITL mode with the following command:
At first glance this seems to work as
telemetry_server.publish_position()
doesn't return an error (telemetry_server.publish_imu()
seems to be broken but that's another discussion).However, it seems like PX4 is not actually reading the data I send it which can be confirmed by opening up a GCS or querying it's position via MAVLink.
Am i fundementally misundestanding what
telemetry_server
is supposed to do? or is this a bug and/or user error?Thanks