RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.34k stars 1.27k forks source link

[tutorials] Debugging a dynamical system #17249

Open hongkai-dai opened 2 years ago

hongkai-dai commented 2 years ago

Currently we have a tutorial https://github.com/RobotLocomotion/drake/blob/master/tutorials/dynamical_systems.ipynb on the concept of dynamical systems. It would be good to add a tutorial to talk about practical guides on debugging dynamical systems (similar to in mathematical optimization we have tutorials like this on the concept, and a debugging tutorial )

I would imagine the debugging tutorial can contain these tips

  1. Generating the visual connection diagram in graphviz file, that shows the overall diagram with each input/output port and connections. This looks similar to the simulink block.
  2. Using Simulator.monitor or VectorLogSink to inspect the simulation data.
  3. Choosing the right simulator. For example in continuous-time simulation, if the simulation step is very small, then it indicates the system being stiff. The user should look into why the system has stiff dynamics, and possibly switch to implicit integrator and discrete-time system.

cc @sherm1 @jwnimmer-tri

sherm1 commented 2 years ago

Assigning to @jwnimmer-tri for disposition as component lead.