gz: fix gimbal message type (#25770)

This commit is contained in:
Jacob Dahl 2025-10-15 13:28:14 -08:00 committed by GitHub
parent 9c1f3306a4
commit 54866b886e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -228,12 +228,12 @@ 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::Float msg;
gz::msgs::Double msg;
float new_stp = computeJointSetpoint(att_stp, rate_stp, last_stp, dt);
new_stp = math::constrain(new_stp, min_stp, max_stp);
last_stp = new_stp;
msg.set_data(new_stp);
msg.set_data((double)new_stp);
publisher.Publish(msg);
}