While sending flight control signal in Horizontal Ground Frame: the ground frame(only orientation) is parallel to the the orientation in which drone is powered on. So, the forward(+x) , left(+y) of ground frame is same as drone body frame, when powered on. Even if during the flight the pose(orientation) of uav changes(for ex. if yaw changes), still the velocities sent are preserved in ground frame. This is great.
But for some reason, I power on the uav at point(x,y,z) in rpy_degrees(0,0,30)[using rpy in degrees for ease of asking question] and after some time in flight, the uav is at point(x1,y1,z1) in rpy_degrees(0,0,60). Now if I want to set this as my new home pose and send new velocities based on goals with reference to new home(like i will send a goal in my code go (1,1,1) from where uav current home.) . which means my ground frame is rotated by +30degrees in yaw(xy plane). But the dji sdk or dji Flight controller doesn't know this rotation.
so all my new goals and velocity vector i can send to uav using HORIZONTAL_GROUND needs to be multiplied by Rotation matrix before publishing.
(ps currently local position is kind of odometry from gps )
If you can allow user to call srv call to set local_ref_pose instead of set_local_ref_home_position and inform the the corresponding quaternion to either DJI FC(which will be great) or at least inform DJI onboard sdk, which can do the math inside before sending velocities to FC.
Hi,
While sending flight control signal in Horizontal Ground Frame: the ground frame(only orientation) is parallel to the the orientation in which drone is powered on. So, the forward(+x) , left(+y) of ground frame is same as drone body frame, when powered on. Even if during the flight the pose(orientation) of uav changes(for ex. if yaw changes), still the velocities sent are preserved in ground frame. This is great.
But for some reason, I power on the uav at point(x,y,z) in rpy_degrees(0,0,30)[using rpy in degrees for ease of asking question] and after some time in flight, the uav is at point(x1,y1,z1) in rpy_degrees(0,0,60). Now if I want to set this as my new home pose and send new velocities based on goals with reference to new home(like i will send a goal in my code go (1,1,1) from where uav current home.) . which means my ground frame is rotated by +30degrees in yaw(xy plane). But the dji sdk or dji Flight controller doesn't know this rotation. so all my new goals and velocity vector i can send to uav using HORIZONTAL_GROUND needs to be multiplied by Rotation matrix before publishing.
(ps currently local position is kind of odometry from gps ) If you can allow user to call srv call to set local_ref_pose instead of set_local_ref_home_position and inform the the corresponding quaternion to either DJI FC(which will be great) or at least inform DJI onboard sdk, which can do the math inside before sending velocities to FC.
Thanks.