Hello,
For context, I am a PhD student studying the interplay and intersection of MPC and RL. I was wondering what is the best way to go about exposing the iLQG value function and Q functions gradients and Hessians seen in iLQGBackwardPass in backward_pass.h? My end goal is to be able to call these values in the Python API agent.
Forgive my very limited understanding of how grpc works, but would the following idea be the general approach to doing this?
- Extend the protocol buffer interface with messages like
GetBackwardPassResultsRequest and GetBackwardPassResultsResponse in agent.proto.
- Add the corresponding methods to
agent_service.h and agent_service.cc.
- Add getter functions in
backward_pass.h and backward_pass.cc and expose them too in planner.h and planner.cc
- Rebuild mjpc
- Modify
agent.py to have get_backwardpass_results methods that call a request and get a response from grpc.
I'm unsure of how the details would work on certain steps:
- For step 3, it would be more proper to add the getter functions to the
policy.h and policy.cc instead of in the planner? My understanding (which might be wrong) is that we call an agent, which has a planner. The agent calls the planner to create optimal control gains, which is stored in the policy. The agent then calls the policy when it wants to apply those control gains.
- For step 4, would it suffice to just rerun
python setup.py install as seen in the Python API installation instructions to now have access to those values from the Python agent?
Thank you in advance for any help and guidance!
Hello,
For context, I am a PhD student studying the interplay and intersection of MPC and RL. I was wondering what is the best way to go about exposing the iLQG value function and Q functions gradients and Hessians seen in
iLQGBackwardPassinbackward_pass.h? My end goal is to be able to call these values in the Python API agent.Forgive my very limited understanding of how grpc works, but would the following idea be the general approach to doing this?
GetBackwardPassResultsRequestandGetBackwardPassResultsResponseinagent.proto.agent_service.handagent_service.cc.backward_pass.handbackward_pass.ccand expose them too inplanner.handplanner.ccagent.pyto haveget_backwardpass_resultsmethods that call a request and get a response from grpc.I'm unsure of how the details would work on certain steps:
policy.handpolicy.ccinstead of in theplanner? My understanding (which might be wrong) is that we call an agent, which has a planner. The agent calls the planner to create optimal control gains, which is stored in the policy. The agent then calls the policy when it wants to apply those control gains.python setup.py installas seen in the Python API installation instructions to now have access to those values from the Pythonagent?Thank you in advance for any help and guidance!