vulp icon indicating copy to clipboard operation
vulp copied to clipboard

Re-sending of previous commands

Open stephane-caron opened this issue 2 years ago • 1 comments

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.

stephane-caron avatar Sep 14 '22 15:09 stephane-caron