37 if (!planning_command->has_header() || !planning_command->header().has_sequence_num()
38 || planning_command->header().sequence_num() == last_sequence_num_) {
40 if (last_cruise_speed_ > 0.0) {
47 if (planning_command->is_motion_command()) {
53 if (!planning_command->has_custom_command()
56 if (last_cruise_speed_ > 0.0) {
61 const auto& custom_command = planning_command->custom_command();
63 if (!custom_command.UnpackTo(&speed_command)) {
65 if (last_cruise_speed_ > 0.0) {
68 AERROR <<
"Unpack speed command failed!";
73 if (speed_command.has_is_restore_target_speed() && speed_command.is_restore_target_speed()) {
77 last_sequence_num_ = planning_command->header().sequence_num();
79 if (last_cruise_speed_ < 0.0) {
83 if (speed_command.has_target_speed()) {
85 }
else if (speed_command.has_target_speed_factor()) {
87 double target_speed = last_cruise_speed_ * speed_command.target_speed_factor();