I want to save the context of a system into a file so that I can later read from the file and use this context (e.g., do some useful calculations or repeatable simulations). However, I havent' found appropriate methods to save the context into file or read the context from file. Are there any methods for this usage? Thank you for your help.
I'm afraid we don't gave that general feature yet; although it's been on the list for a long time: https://github.com/RobotLocomotion/drake/issues/5856 . As that issue says, we have an amazing new YAML serialization workflow, so it's definitely worth revisiting the idea.