-
Notifications
You must be signed in to change notification settings - Fork 276
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
247 lines (239 loc) · 6.22 KB
/
Copy pathCMakeLists.txt
File metadata and controls
247 lines (239 loc) · 6.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# Copyright 2022 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
add_library(threadpool STATIC)
target_sources(
threadpool
PUBLIC threadpool.h
PRIVATE threadpool.cc
)
target_link_libraries(
threadpool
absl::base
)
target_include_directories(threadpool PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..)
add_library(
libmjpc STATIC
states/state.cc
states/state.h
agent.cc
agent.h
trajectory.cc
trajectory.h
utilities.cc
utilities.h
tasks/tasks.cc
tasks/tasks.h
tasks/acrobot/acrobot.cc
tasks/acrobot/acrobot.h
tasks/allegro/allegro.cc
tasks/allegro/allegro.h
tasks/bimanual/insert/insert.cc
tasks/bimanual/insert/insert.h
tasks/bimanual/handover/handover.cc
tasks/bimanual/handover/handover.h
tasks/bimanual/reorient/reorient.cc
tasks/bimanual/reorient/reorient.h
tasks/cartpole/cartpole.cc
tasks/cartpole/cartpole.h
tasks/fingers/fingers.cc
tasks/fingers/fingers.h
tasks/humanoid/interact/interact.cc
tasks/humanoid/interact/interact.h
tasks/humanoid/interact/contact_keyframe.cc
tasks/humanoid/interact/contact_keyframe.h
tasks/humanoid/stand/stand.cc
tasks/humanoid/stand/stand.h
tasks/humanoid/tracking/tracking.cc
tasks/humanoid/tracking/tracking.h
tasks/humanoid/walk/walk.cc
tasks/humanoid/walk/walk.h
tasks/manipulation/common.cc
tasks/manipulation/common.h
tasks/manipulation/manipulation.cc
tasks/manipulation/manipulation.h
tasks/op3/stand.cc
tasks/op3/stand.h
tasks/panda/panda.cc
tasks/panda/panda.h
tasks/particle/particle.cc
tasks/particle/particle.h
tasks/rubik/solve.cc
tasks/rubik/solve.h
tasks/shadow_reorient/hand.cc
tasks/shadow_reorient/hand.h
tasks/quadrotor/quadrotor.cc
tasks/quadrotor/quadrotor.h
tasks/quadruped/quadruped.cc
tasks/quadruped/quadruped.h
tasks/swimmer/swimmer.cc
tasks/swimmer/swimmer.h
tasks/walker/walker.cc
tasks/walker/walker.h
tasks/humanoid_bench/utility/dm_control_utils_rewards.cpp
tasks/humanoid_bench/walk/walk.cc
tasks/humanoid_bench/walk/walk.h
tasks/humanoid_bench/walk_reward.cc
tasks/humanoid_bench/walk_reward.h
tasks/humanoid_bench/stand/stand.cc
tasks/humanoid_bench/stand/stand.h
tasks/humanoid_bench/push/push.cc
tasks/humanoid_bench/push/push.h
planners/planner.cc
planners/planner.h
planners/policy.h
planners/include.cc
planners/include.h
planners/cost_derivatives.cc
planners/cost_derivatives.h
planners/model_derivatives.cc
planners/model_derivatives.h
planners/cross_entropy/planner.cc
planners/cross_entropy/planner.h
planners/robust/robust_planner.cc
planners/robust/robust_planner.h
planners/sample_gradient/planner.cc
planners/sample_gradient/planner.h
planners/sampling/planner.cc
planners/sampling/planner.h
planners/sampling/policy.cc
planners/sampling/policy.h
planners/gradient/gradient.cc
planners/gradient/gradient.h
planners/gradient/planner.cc
planners/gradient/planner.h
planners/gradient/policy.cc
planners/gradient/policy.h
planners/gradient/settings.h
planners/gradient/spline_mapping.cc
planners/gradient/spline_mapping.h
planners/ilqg/backward_pass.cc
planners/ilqg/backward_pass.h
planners/ilqg/boxqp.h
planners/ilqg/planner.cc
planners/ilqg/planner.h
planners/ilqg/policy.cc
planners/ilqg/policy.h
planners/ilqg/settings.h
planners/ilqs/planner.cc
planners/ilqs/planner.h
estimators/batch.cc
estimators/batch.h
estimators/estimator.h
estimators/include.cc
estimators/include.h
estimators/kalman.cc
estimators/kalman.h
estimators/unscented.cc
estimators/unscented.h
direct/direct.cc
direct/direct.h
direct/trajectory.h
direct/model_parameters.cc
direct/model_parameters.h
spline/spline.cc
spline/spline.h
app.cc
app.h
norm.cc
norm.h
simulate.cc
simulate.h
task.cc
task.h
$<TARGET_OBJECTS:mujoco::platform_ui_adapter>
)
set_target_properties(libmjpc PROPERTIES OUTPUT_NAME mjpc)
target_compile_options(libmjpc PUBLIC ${MJPC_COMPILE_OPTIONS})
target_compile_definitions(libmjpc PRIVATE MJSIMULATE_STATIC)
target_link_libraries(
libmjpc
absl::any_invocable
absl::check
absl::flat_hash_map
absl::log
absl::random_random
absl::span
glfw
lodepng
mujoco::mujoco
mujoco::platform_ui_adapter
threadpool
Threads::Threads
)
target_include_directories(libmjpc
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/..
${CMAKE_CURRENT_BINARY_DIR}/..
)
add_executable(
mjpc
main.cc
)
target_link_libraries(
mjpc
absl::flags
absl::flags_parse
absl::random_random
absl::strings
libmjpc
mujoco::mujoco
threadpool
Threads::Threads
)
target_include_directories(mjpc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..)
target_compile_options(mjpc PUBLIC ${MJPC_COMPILE_OPTIONS})
target_link_options(mjpc PRIVATE ${MJPC_LINK_OPTIONS})
target_compile_definitions(mjpc PRIVATE MJSIMULATE_STATIC)
if(APPLE)
target_sources(mjpc PRIVATE macos_gui.mm)
target_link_libraries(mjpc "-framework Cocoa")
endif()
add_library(
libtestspeed STATIC
testspeed_app.cc
testspeed.h
testspeed.cc
)
target_link_libraries(
libtestspeed
absl::random_random
absl::strings
libmjpc
mujoco::mujoco
threadpool
Threads::Threads
)
target_include_directories(libtestspeed PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..)
add_executable(
testspeed
testspeed_app.cc
)
target_link_libraries(
testspeed
libtestspeed
absl::flags
absl::flags_parse
)
target_include_directories(testspeed PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..)
target_compile_options(testspeed PUBLIC ${MJPC_COMPILE_OPTIONS})
target_link_options(testspeed PRIVATE ${MJPC_LINK_OPTIONS})
target_compile_definitions(testspeed PRIVATE MJSIMULATE_STATIC)
add_subdirectory(tasks)
if(BUILD_TESTING AND MJPC_BUILD_TESTS)
enable_testing()
add_subdirectory(test)
endif()
if(MJPC_BUILD_GRPC_SERVICE)
add_subdirectory(grpc)
endif()