Send MOCAP position data to pixhawk over mavlink protocol

Hi , I am a student at university of Stuttgart. I have been working on a hobby project for a month. I am trying to build a autonomous Quadcopter drone for indoor facility. My project involves Pixhawk flight controller.(PX4 flight stack). I use Nexonar IR tracker system to capture position data of the drone. I have hit a wall now. I am not able to figure out how do I send mocap data to pixhawk. I searched on internet but not enough information to get it done.

Based on my research on internet I use the following procedure.

  1. I have connected ski telemetry radio(Air) on pixhawk ā€“ TELEM 1
  2. ski telemetry radio(Ground) is connected to laptop ā€” COM8
  3. Qgroundcontrol is connected to pixhawk using ski radio.
  4. nexonar IR tracker software saves mocap data captured from sensor into a file.
  5. I followed this tutorial to send basic mavlink packets to pixhawk and I used this mavlink library. please find a Arduino sketch attached.
  6. Arduino is connected to laptop ā€“ COM3
    I need help on>
  7. what should be mavlink_message_t(sysid and compid) and mavlink_param_set_t(target_system, target_component). I have set pixhawk system id to 1 and qgroundcontrol system id is 255.
  8. When I uploaded the sketch on Arduino and checked on serial Monitor. It keeps printing ā€˜pā€™ there if I use FastSerial library. I am not sure packet is sent successfully.
  9. if I am able to send a mavlink packet successfully from Arduino then how will it be received by Qgroundcontrol and then sent to pixhawk, because Arduino is connected on COM3 and Qgroundcontrol is connected to pixhwak on COM8 via ski radio. How the connection is going to work between Arduino and Qgroundcontrol?
  10. Further I want to enhance my sketch to send mocap data using arduino to pixhawk. Am I on a right track and will it be feasible to do that? If not please suggest and guide me another approach to send mocap data to pixhawk.

i checked the similar thread but no help.

1 Like