bool LocalPrefServer::QueueCommand(const ServerCommand& command, int id) { int playerNum = idToPlayerNum(id); if( playerNum == InvalidPlayerNum ) { return false; } addCommandToQueue(command, playerNum); return true; }
void UrRealtimeCommunication::setSpeed(double q0, double q1, double q2, double q3, double q4, double q5, double acc) { char cmd[1024]; sprintf(cmd, "speedj([%1.5f, %1.5f, %1.5f, %1.5f, %1.5f, %1.5f], %f, 0.02)\n", q0, q1, q2, q3, q4, q5, acc); addCommandToQueue((std::string) (cmd)); if (q0 != 0. || q1 != 0. || q2 != 0. || q3 != 0. || q4 != 0. || q5 != 0.) { //If a joint speed is set, make sure we stop it again after some time if the user doesn't safety_count_ = 0; } }