mit-biomimetics / Cheetah-Software

MIT License
2.52k stars 911 forks source link

Running Cheetah under program control #32

Open sanjainarainperspectalabs opened 4 years ago

sanjainarainperspectalabs commented 4 years ago

Hello, we'd like to understand how Cheetah's design parameters affect its performance e.g., maximum running speed. Parameters we might want to alter are in mc-mit-ctrl-user-parameters.yaml.

Would appreciate knowing how to do this under program control, not via an external joystick. We can modify the parameters in the file, but how do we run the simulated robot without a joystick. Even if we can do this with a mouse that would help.

We do not have a physical robot and would like to do this purely with simulation.

We have been able to build the software at our end.

Thanks very much.

qiayuanl commented 4 years ago

The speed command is given by

void Simulation::highLevelControl() {
  // send joystick data to robot:
  _sharedMemory().simToRobot.gamepadCommand = _window->getDriverCommand();
  _sharedMemory().simToRobot.gamepadCommand.applyDeadband(
      _simParams.game_controller_deadband);

in simulation.cpp. So you only need to rewrite function:
void updateGamepadCommand(GamepadCommand &gamepadCommand); of GameController class.

sanjainarainperspectalabs commented 4 years ago

Thanks. We will try out this suggestion and let you know.