Skip to content

Commit 13d2a95

Browse files
Merge of 1d8f72e
PiperOrigin-RevId: 601753731 Change-Id: Ia0d30df816c8f83285a1b2a619f57500c3a78816
2 parents 7c421b8 + 1d8f72e commit 13d2a95

File tree

30 files changed

+1773
-29
lines changed

30 files changed

+1773
-29
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ real-time predictive control with [MuJoCo](https://mujoco.org/), developed by
1616
Google DeepMind.
1717

1818
MJPC allows the user to easily author and solve complex robotics tasks, and
19-
currently supports three shooting-based planners: derivative-based iLQG and
20-
Gradient Descent, and a simple yet very competitive derivative-free method
21-
called Predictive Sampling.
19+
currently supports multiple shooting-based planners. Derivative-based methods include iLQG and
20+
Gradient Descent, while derivative-free methods include a simple yet very competitive planner
21+
called Predictive Sampling and the Cross Entropy Method (with diagonal covariance).
2222

2323
- [Overview](#overview)
2424
- [Graphical User Interface](#graphical-user-interface)

docs/OVERVIEW.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Values in brackets should be replaced by the designer.
132132

133133
`Agent` settings can be specified by prepending `agent_` for corresponding class members.
134134

135-
`Planner` settings can similarly be specified by prepending the corresponding optimizer name, (e.g., `sampling_`, `gradient_`, `ilqg_`).
135+
`Planner` settings can similarly be specified by prepending the corresponding optimizer name, (e.g., `sampling_`, `cross_entropy_`, `gradient_`, `ilqg_`).
136136

137137
It is also possible to create GUI elements for parameters that are passed to the residual function. These are specified by the prefix `residual_`, when the suffix will be the display name of the slider:
138138

@@ -280,12 +280,15 @@ Additionally, custom labeled buttons can be added to the GUI by specifying a str
280280

281281
The purpose of `Planner` is to find improved policies using numerical optimization.
282282

283-
This library includes three planners that use different techniques to perform this search:
283+
This library includes multiple planners that use different techniques to perform this search:
284284

285285
- **Predictive Sampling**
286286
- random search
287287
- derivative free
288288
- spline representation for controls
289+
- **Cross Entropy Method**
290+
- all properties of Predictive Sampling
291+
- refits a nominal policy to mean of elite samples instead of using the best
289292
- **Gradient Descent**
290293
- requires gradients
291294
- spline representation for controls

mjpc/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ add_library(
4040
tasks/acrobot/acrobot.h
4141
tasks/cartpole/cartpole.cc
4242
tasks/cartpole/cartpole.h
43+
tasks/cube/solve.cc
44+
tasks/cube/solve.h
4345
tasks/fingers/fingers.cc
4446
tasks/fingers/fingers.h
4547
tasks/hand/hand.cc
@@ -54,6 +56,8 @@ add_library(
5456
tasks/manipulation/common.h
5557
tasks/manipulation/manipulation.cc
5658
tasks/manipulation/manipulation.h
59+
tasks/op3/stand.cc
60+
tasks/op3/stand.h
5761
tasks/panda/panda.cc
5862
tasks/panda/panda.h
5963
tasks/particle/particle.cc
@@ -75,6 +79,8 @@ add_library(
7579
planners/cost_derivatives.h
7680
planners/model_derivatives.cc
7781
planners/model_derivatives.h
82+
planners/cross_entropy/planner.cc
83+
planners/cross_entropy/planner.h
7884
planners/robust/robust_planner.cc
7985
planners/robust/robust_planner.h
8086
planners/sampling/planner.cc

mjpc/grpc/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ findorfetch(
3737

3838
find_package(ZLIB REQUIRED)
3939
set(gRPC_ZLIB_PROVIDER "package" CACHE INTERNAL "")
40-
40+
set(ZLIB_BUILD_EXAMPLES OFF)
4141
set(_PROTOBUF_LIBPROTOBUF libprotobuf)
4242
set(_REFLECTION grpc++_reflection)
4343
set(_PROTOBUF_PROTOC $<TARGET_FILE:protoc>)

mjpc/main.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ int main(int argc, char** argv) {
4747
#endif
4848
absl::ParseCommandLine(argc, argv);
4949

50-
mjpc::StartApp(mjpc::GetTasks(), 6); // start with manipulation bring
50+
mjpc::StartApp(mjpc::GetTasks(), 14); // start with quadruped flat
5151
return 0;
5252
}

0 commit comments

Comments
 (0)