mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
gazebo: fix implicit conversion errors ([-Wdouble-promotion])
This commit is contained in:
parent
c2fb48990a
commit
2297e66a9d
@ -228,7 +228,7 @@ void GZGimbal::publishDeviceAttitude()
|
||||
void GZGimbal::publishJointCommand(gz::transport::Node::Publisher &publisher, const float att_stp, const float rate_stp,
|
||||
float &last_stp, const float min_stp, const float max_stp, const float dt)
|
||||
{
|
||||
gz::msgs::Double msg;
|
||||
gz::msgs::Float msg;
|
||||
|
||||
float new_stp = computeJointSetpoint(att_stp, rate_stp, last_stp, dt);
|
||||
new_stp = math::constrain(new_stp, min_stp, max_stp);
|
||||
|
||||
@ -117,8 +117,8 @@ bool GZMixingInterfaceServo::init(const std::string &model_name)
|
||||
return false;
|
||||
}
|
||||
|
||||
double min_val = get_servo_angle_min(i);
|
||||
double max_val = get_servo_angle_max(i);
|
||||
double min_val = (double)get_servo_angle_min(i);
|
||||
double max_val = (double)get_servo_angle_max(i);
|
||||
_angle_min_rad.push_back(min_val);
|
||||
_angular_range_rad.push_back(max_val - min_val);
|
||||
}
|
||||
|
||||
@ -240,7 +240,7 @@ void MovingPlatformController::updateWrenchCommand(
|
||||
|
||||
if (accel_xy > max_accel) {
|
||||
const float scaling = max_accel / accel_xy;
|
||||
_force += feedback_force * gz::math::Vector3d(scaling, scaling, 1.);
|
||||
_force += feedback_force * gz::math::Vector3d((double)scaling, (double)scaling, 1.);
|
||||
|
||||
} else {
|
||||
_force += feedback_force;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user