Hi everyone,
I’m developing a drone that take uwb coordinates from dwm1001-dev and send to flight controller (MATEK f405-HDTE) with ros(noetic). Each uwb sensor and flight controller are connected to orangepi zero 2w (flight controller over uart and uwb sensor over usb).
For send coordinates i’ve follow this steps with ros, and mavlink (i use python):
- take data from dwm1001-dev, in particular anchors_id, anchors (x,y,z) position and distance, tag (x,y,z) position and distance.
- convert this data with PoseStamped msg and publish with a topic.
- create a node that subscribe to this topic and send this data to flight controller with two pymavlink methods: the first one to set global position (with conversion of tag coordinates from local to global and send with global_position_int() method), and the second one for local position (with set_target_position_local_ned_encode() method).
That is from code side.
On mission planner i’ve set those parameters: - GPS_TYPE = 0
- EK3_ENABLE = 1
- EK3_SRC1_POSXY = 4 (Beacons)
- EK3_SRC1_POSZ = 4 (Beacons)
- EK3_SRC1_VX = 0
- EK3_SRC1_VZ = 0
- SERIAL1 = MAVLink2
- SERIAL1 Baud = 57600
- BCN_TYPE = 1 (Pozyx)
On mission planner i see only global position, and for local data mavlink inspector create another vehicle (vehicle 1 and 255).
I choose another way by send coordinates with mavros, that probably is the best way. I send global and local coordinates with topics “mavros/setpoin_position/local” and “mavros/setpoint_position/global”. The result is the same: " PreArm: Need Position Estimate".
Could someone help me please?
I use ArduCopter 4.3.5
pymavlink version 2.4.42
Ros Noetic
Ubuntu Focal on my orangePi zero 2w (4Gb)
Thanks to everyone that will reply