I have been using Mavlink to communicate with px4 mini (1.9v firmware) to send motion capture coordinates to perform indoor operation without GPS using offboard and positional hold flight modes. My architecture has an onboard rspi-3 connected to pixhawk via usb(rspi-3) <-> (to) micro usb(debug port on px4) mounted onto /tty/ACM0 serial port. I am encoding Mocap data from raspi-3 by using att_pos_mocap_encode Mavlink API and sending it out via send_mavlink interface. The vehicle gets armed and then I set target via
set_position_target_local_ned_encode and switch to offboard or positional hold it does not takeoff to desired set point. The mocap data is fed at 60 HZ frequency.
Not sure if the Pixhawk is receiving encoded messages via Mavlink? but if it was an issue with Mavlink I believe it would have not allowed me arm via through the script using mavproxy. So ruling that out I also checked through Mavlink Inspector to see if local_NED value read the mocap but it does not. And also got the Ulog data parsed to check if att_mocap .csv file is creates but that is too not created.
I have followed all the setup specified at https://dev.px4.io/en/ros/external_position_estimation.html but no helped yet. Please if any one has any suggestion do let us know. I would really appreciate your quick help/response here.
pixhawk parameter configured:
MAV_0_Config is connected to telemetry, so using mav_1_config parameter to communicate over rspi-3 to Pixhawk. Please do correct me if any of the above procedure are incorrect.
below API used to encode mocap data and set position via Mavlink:
I’m doubting if the Pixhawk read the sent Mavlink encoded message? Is there any ways to check, apart from above mentioned method please do let us know.