I am trying to implement a single camera relative position detection for a quadcopter. Let’s say, I get a rotation and translation matrix that describes the necessary rotations and translations required to get from camera coordinate system to quadcopter coordinate frame. I would then like to us MAVSDK-Python, to set the quadcopter local position in relation to that camera (assuming I know the location and orientation of the camera or set it to arbitrary location and orientation), so that I can control the quadcopter without the GPS signal.
Can this be done with the information I have? I looked into the mocap commands, but was unable to understand the message format required to implement them:
If I understand correctly, I should set local position with
set_attitude_position_mocap() but how are the other 2 used?
If the above stated works, can I then switch my quadcopter to offboard mode and set desired location with
offboard.set_position_ned() to set the x,y,z and yaw?
I will be grateful for any advice or recommendations.