Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expect radians for DO_GIMBAL_MANAGER_PITCHYAW msg #24122

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/modules/gimbal/input_mavlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -879,11 +879,9 @@ InputMavlinkGimbalV2::_process_command(ControlData &control_data, const vehicle_
if (vehicle_command.source_system == control_data.sysid_primary_control &&
vehicle_command.source_component == control_data.compid_primary_control) {

const matrix::Eulerf euler(0.0f, math::radians(vehicle_command.param1),
math::radians(vehicle_command.param2));
const matrix::Eulerf euler(0.0f, vehicle_command.param1, vehicle_command.param2);
const matrix::Quatf q(euler);
const matrix::Vector3f angular_velocity(NAN, math::radians(vehicle_command.param3),
math::radians(vehicle_command.param4));
const matrix::Vector3f angular_velocity(NAN, vehicle_command.param3, vehicle_command.param4);
const uint32_t flags = vehicle_command.param5;

// TODO: support gimbal device id for multiple gimbals
Expand Down
Loading