mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Adding gimbal rate in gz simulation (#24125)
* Adding gimbal rate in gz simulation * add submodule
This commit is contained in:
parent
6b10f1ca12
commit
8a9391321d
@ -1 +1 @@
|
||||
Subproject commit f48a17a4b30601ebb11e2f9e3e678fec8a73ebdc
|
||||
Subproject commit 75318c05c0c84d98ac786963d3c333f3bde0d718
|
||||
@ -104,6 +104,14 @@ void GZGimbal::gimbalIMUCallback(const gz::msgs::IMU &IMU_data)
|
||||
IMU_data.orientation().z());
|
||||
_q_gimbal = q_FLU_to_FRD * q_gimbal_FLU * q_FLU_to_FRD.inversed();
|
||||
|
||||
matrix::Vector3f rate = q_FLU_to_FRD.rotateVector(matrix::Vector3f(IMU_data.angular_velocity().x(),
|
||||
IMU_data.angular_velocity().y(),
|
||||
IMU_data.angular_velocity().z()));
|
||||
|
||||
_gimbal_rate[0] = rate(0);
|
||||
_gimbal_rate[1] = rate(1);
|
||||
_gimbal_rate[2] = rate(2);
|
||||
|
||||
pthread_mutex_unlock(&_node_mutex);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user