vulp
vulp copied to clipboard
Re-sending of previous commands
When the spine is in neither of the following three states:
- Stop
- Shutdown
- Act
Then Spine::cycle_actuation
will send the previous command:
if (state_machine_.state() == State::kSendStops ||
state_machine_.state() == State::kShutdown) {
write_stop_commands(actuation_.commands());
} else if (state_machine_.state() == State::kAct) {
Dictionary& action = dict_("action");
write_position_commands(actuation_.commands(),
actuation_.servo_joint_map(), action);
} else {
// TODO(scaron): clear commands, otherwise the previous ones will be
// sent again!
}
This is OK for stop commands, but not OK for infrequent position commands.