Offboard control through raspberry pi

Hi
I am trying to build a drone for wind turbine inspection.

So I want to use offboard control through raspberry pi as onboard computer. I am writing scripts in mavsdk-python but I’m not getting expected response from drone.

I simulation it works fine.
Any ideas?

Make sure you are sending the same sysid as on your flight controller.
For example, if you are sending a heartbeat you can position yourself here and check what you are receiving:
https://github.com/PX4/PX4-Autopilot/blob/646f711b1a3b700bb55f3eec909ff53c728afe1f/src/modules/mavlink/mavlink_receiver.cpp#L2083

Another thing, you can inspect Mavlink messages directly from QGroundControll like here:

Is it connecting properly? Have you checked the connection debugging steps?

http://mavsdk-python-docs.s3-website.eu-central-1.amazonaws.com/#debug-connection-issues

Yeah, I’m pretty sure I’m connected cuz the drone responses. Only while changing the modes from ‘POSCTL’ to ‘OFFBOARD’ it oscillates and then give aggressive movements too.

In that case please share a logfile of when that happens using logs.px4.io.