add only sending setpoint when new setpoint has arrived
This commit is contained in:
@@ -382,10 +382,10 @@ private:
|
||||
}
|
||||
else
|
||||
{
|
||||
// if (!new_setpoint)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
if (!new_setpoint)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (current_control_mode == CONTROL_MODE_VELOCITY)
|
||||
{
|
||||
RCLCPP_INFO(this->get_logger(), "velocity %f %f %f", velocity[0], velocity[1], velocity[2]);
|
||||
@@ -396,7 +396,7 @@ private:
|
||||
RCLCPP_INFO(this->get_logger(), "position %f %f %f", position[0], position[1], position[2]);
|
||||
send_position_setpoint();
|
||||
}
|
||||
// new_setpoint = false;
|
||||
new_setpoint = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user