google-deepmind / google-deepmind/mujoco_mpc
[Request] Add practical examples to Direct Optimization documentation
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 282
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to create a simple optimization tool that estimates a pre-planned sequence of target configurations that I can then track in real-time with MPC using the [Direct Optimization](https://github.com/google-deepmind/mujoco_mpc/blob/main/docs/DIRECT.md) interface, but I've found the documentation to be lacking, particularly in providing practical implementation examples that users can start from when designing their own DO strategies.
In my particular case, for instance, as a minimal starting point to allow me to better understand the practical workflow of the Direct API, I want to track a short reference kinematic/joint trajectory for a robot that is equipped with position-controlled actuators and associated joint position sensors (ignoring force tracking at the moment).
Pre-optimization, I populate `sensor_measurement` with my target joint positions, initialize `configuration` and `configuration_previous` with the same values and add noise [as done in the unit testing code](https://github.com/google-deepmind/mujoco_mpc/blob/ff572a21e7c2bf9fda62e1862a758da7e9a8719b/mjpc/test/direct/direct_optimize_test.cc#L62).
Optimization converges to perfect match between `sensor_prediction` matches `sensor_measurement` after a single iteration, but `configuration` holds rather different values, which I am having trouble understanding why, considering position-controlled joints + join position sensors should lead to a direct correspondence (or at least similar values) with the reference sensor measurement
What exactly am I missing here?
Contributor guide
Assessment
This issue has not been assessed yet.