mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
gz: fix gimbal message type (#25770)
This commit is contained in:
parent
9c1f3306a4
commit
54866b886e
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user