Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
821 commits
Select commit Hold shift + click to select a range
3976905
cleaning up c3 solvers
yangwill Nov 8, 2023
032ccae
moving c3 target state out of c3 controller
yangwill Nov 8, 2023
5c0bcba
making metadata struct construction false by default for lcm trajecto…
yangwill Nov 8, 2023
3b3dc4d
allowing subplots in log_plotter_franka
yangwill Nov 8, 2023
f9bc470
improving plotting script
yangwill Nov 8, 2023
efe03cc
enabling joint acceleration constraints as an option in OSC
yangwill Nov 8, 2023
095391c
outputting force trajectory from c3
yangwill Nov 9, 2023
1732adf
adding qp projection option
yangwill Nov 9, 2023
4158d9e
implemented very hacky way of adding external force tracking
yangwill Nov 9, 2023
88cd525
adding option for different contact model and linearization, but they…
yangwill Nov 10, 2023
080af9a
fixing qp and anitescu linearization
yangwill Nov 10, 2023
fc2f6ab
resetting target to neutral position if c3 finds totally infeasible
yangwill Nov 10, 2023
4f96bd9
Merge branch 'plate_balancing' of github.com:DAIRLab/dairlib into pla…
yangwill Nov 10, 2023
c202236
updating end effector urdf from physical model
yangwill Nov 13, 2023
12b7aff
tracking forces, updating urdfs, removing dependence on lcmtraj files
yangwill Nov 13, 2023
d4e0943
finalizing end effector force tracking and visualizing object orienta…
yangwill Nov 13, 2023
4eb156b
minor changes, playing with differnet c3 parameters
yangwill Nov 13, 2023
19981a8
issue with force tracking is time delay for solve
yangwill Nov 13, 2023
132cc81
cleaning up code as per comments
yangwill Nov 14, 2023
35d9c45
fixing compile issues, renaming base to pelvis for cassie examples
yangwill Nov 14, 2023
36c292c
renaming hardcoded base link for cassie examples
yangwill Nov 14, 2023
84acf18
Merge remote-tracking branch 'origin/model_instance_support' into pla…
yangwill Nov 14, 2023
e7c1060
Merge remote-tracking branch 'origin/model_instance_support' into pla…
yangwill Nov 14, 2023
02037e2
more changes
yangwill Nov 14, 2023
c4d938e
tuning c3 controller
yangwill Nov 14, 2023
1cd6ff8
adding nav_msgs as ROS message type
yangwill Nov 15, 2023
dde03a0
updating ros lcm bridge to include tray state
yangwill Nov 15, 2023
eb31dd9
updating tray estimation slightly
yangwill Nov 15, 2023
b0f4278
using lossy encoding scheme to record videos to greatly reduce file size
yangwill Nov 16, 2023
f26b2d1
plotting updates for franka
yangwill Nov 16, 2023
f9a08cb
updating tray sdf origin
yangwill Nov 16, 2023
53cc8fd
tuning c3 params
yangwill Nov 17, 2023
5511ffa
reasonble closed loop solutions in sim
yangwill Nov 17, 2023
4f2c06f
updating sim params to reflect slower tray publish rate
yangwill Nov 20, 2023
72a0876
small cleanup
yangwill Nov 21, 2023
0084160
publishing c3 target and actual state
yangwill Nov 21, 2023
d6b2538
small plotting changes for franka experiments
yangwill Nov 29, 2023
dba73f4
plotting changes and adding debug info to osc
yangwill Nov 30, 2023
a32397d
plotting updates
yangwill Nov 30, 2023
59a6c44
cleaning up system naming and adding supports again
yangwill Dec 4, 2023
3edd6d6
adding supports demo
yangwill Dec 4, 2023
8d5f0da
organizing c3 gains
yangwill Dec 5, 2023
5ba8aed
cleaner way to change scenes
yangwill Dec 5, 2023
8f16e8d
changing mu to be a diagonal matrix
yangwill Dec 5, 2023
b216bed
option to use anitescu model
AlpAydinoglu Dec 5, 2023
ff4d2cf
making sure im parallelizing correctly
yangwill Dec 5, 2023
4b34373
debugging scene 2
yangwill Dec 6, 2023
7efe7de
cleaning up yamls and adding visualizing force feature
yangwill Dec 7, 2023
0bf6ab9
extracted lcs factory to be outsdie of c3 controller, working on visu…
yangwill Dec 8, 2023
2b2578f
trying to visualize all lcs forces
yangwill Dec 11, 2023
b71a4cc
force visualization works
yangwill Dec 11, 2023
64a1187
small naming improvements
yangwill Dec 11, 2023
ab96213
selectively adding and drawing forces
yangwill Dec 12, 2023
6acd51d
still investigating contact model
yangwill Dec 12, 2023
495fcfa
fixing big bug in my lcs factory
yangwill Dec 12, 2023
168a7dc
still needs tuning, solution looks much better
yangwill Dec 12, 2023
8f50387
changing parameters for c3
yangwill Dec 13, 2023
e5f4f11
fixing cassie stuff with rot space changes
yangwill Dec 13, 2023
f8d2371
need to spend some time tuning c3 parameters, bugs seem mostly fixed,…
yangwill Dec 13, 2023
65788b4
reordering geometry additions so sortedpair has the right visualizatin
yangwill Dec 14, 2023
9cab04f
cleaning up code
yangwill Dec 15, 2023
861aba8
attempted basic hydroelastic lcs, most likely turning into better poi…
yangwill Dec 18, 2023
45f087f
sliding almost working properly, sensitive to gap
yangwill Jan 1, 2024
8167d26
some more tuning
yangwill Jan 2, 2024
3cd7810
warm starting c3, not clear if it helps
yangwill Jan 2, 2024
2b187d4
adding option to disable ff force in osc
yangwill Jan 2, 2024
b7aad2a
adjusting sim set up for clearance
yangwill Jan 3, 2024
61d7a60
playing with different gains
yangwill Jan 3, 2024
440a64b
minor visualization changes for franka example
yangwill Jan 3, 2024
f862434
adjusting sim params to reflect hardware setup
yangwill Jan 4, 2024
d4ccbfd
updating osc with new offset as well
yangwill Jan 4, 2024
181f04e
using point contact and box model now
yangwill Jan 4, 2024
20e51b1
removing box from franka sim
yangwill Jan 4, 2024
7acd905
attempting these gains on hardware
yangwill Jan 5, 2024
ec6f2c0
printing xbox settings
yangwill Jan 5, 2024
902371a
features implemented, need to tune with plots'
yangwill Jan 8, 2024
83a6431
some parameter tuning
AlpAydinoglu Jan 8, 2024
3835b47
tuning and adjusting warm startg
yangwill Jan 8, 2024
5ac5c52
works on lab desktop, sensitive to solve time
yangwill Jan 8, 2024
766b75f
fixing small typo in gains
yangwill Jan 8, 2024
267d621
updating support position to reflect hardware
yangwill Jan 8, 2024
1c82ac2
adding feature for c3 to place plate back
yangwill Jan 10, 2024
f2f8e0f
adding feature to easily repeat motion
yangwill Jan 11, 2024
333b5ef
small changes to make the plate sliding demo more consistent
yangwill Jan 11, 2024
21ee642
gains for hardware experiments
yangwill Jan 11, 2024
9e06e62
removing unnecessary setting of solver options every iteration
yangwill Jan 11, 2024
be066d2
Merge branch 'plate_balancing' of github.com:DAIRLab/dairlib into pla…
yangwill Jan 11, 2024
942b989
more intelligent setting of next target
yangwill Jan 12, 2024
11f7803
minor updates
yangwill Jan 12, 2024
83a4da4
changing w support demo
yangwill Jan 12, 2024
98942dc
minor changes from hardware
yangwill Jan 12, 2024
23a6e21
updating drake version
yangwill Jan 12, 2024
4db2e1a
slight tuning and updating sim params to allow modifying camera pose
yangwill Jan 12, 2024
fff0d31
minor changes to work with drake v1.24.0
yangwill Jan 15, 2024
71980c3
reordering parameter file, tuning plate balancing for anitescu model
yangwill Jan 16, 2024
00e7df0
improving visualization settings
yangwill Jan 16, 2024
6d18c3f
minor adjustments
yangwill Jan 16, 2024
806f067
parameters to reflect new support position
yangwill Jan 16, 2024
dccb1d3
visualization changes
yangwill Jan 17, 2024
6ec0a55
adding options to use different support orientation/placement
yangwill Jan 17, 2024
11ad8b3
updating plot configs
yangwill Jan 18, 2024
319a5d4
tuned side supports scenario in sim
yangwill Jan 18, 2024
378a454
updating contact spheres to reflect end effector thickness
yangwill Jan 18, 2024
a32f124
limiting distance between predicted and measured initial state
yangwill Jan 18, 2024
b6e140e
refactoring lcm visualization systems
yangwill Jan 18, 2024
03712c3
adding plot to try and analyze friction boundary
yangwill Jan 18, 2024
c9241b7
updating sim params to better reflect friction coeffs in real, qol ch…
yangwill Jan 18, 2024
c40d3a6
minor plotting changes
yangwill Jan 20, 2024
302f011
plotting updates
yangwill Jan 20, 2024
fb00120
updating gains, reducing end effector friction for tuning
yangwill Jan 20, 2024
4e29b5b
Merge branch 'plate_balancing' of github.com:DAIRLab/dairlib into pla…
yangwill Jan 20, 2024
42f31f1
using better predicted state
yangwill Jan 21, 2024
e2bae31
more consistent transition between teleop and mpc
yangwill Jan 22, 2024
cc3f4b4
varying tray mass
yangwill Jan 22, 2024
f270914
plot and vis updates
yangwill Jan 22, 2024
ceb6b00
eliminating extra geom geom call
yangwill Jan 22, 2024
a52a342
tweaking parameters for more consistent task completion
yangwill Jan 22, 2024
0b441b7
c3 gains for parameter study
yangwill Jan 22, 2024
eb8bfc1
adding code for parameter sweeps
yangwill Jan 22, 2024
6b65264
updating plotting scripts
yangwill Jan 23, 2024
b25079e
updating changes
yangwill Jan 23, 2024
7c81808
parameters to identify support friction
yangwill Jan 23, 2024
5d721dd
tuning low friction gains
yangwill Jan 24, 2024
a8a3a7c
tuning parameters, still not perfect
yangwill Jan 24, 2024
2758261
working on wgetting stuck near workspace
yangwill Jan 24, 2024
6f6bbc6
small updates
yangwill Jan 25, 2024
f3ef800
fixing bug in rot tracking data
yangwill Jan 25, 2024
402ec36
very minor channges to try to get c3 more consistent
yangwill Jan 25, 2024
6ab1929
minor changes for parameter study
yangwill Jan 25, 2024
38d37c4
reliable parameters
yangwill Jan 26, 2024
d4afacc
somewhat reliable gains
yangwill Jan 27, 2024
540ac8f
changing visualization colors
yangwill Jan 29, 2024
73f653c
commit used for ablation for force tracking
yangwill Jan 29, 2024
0223f4c
visualization changes
yangwill Jan 29, 2024
b3050cf
updating analysis scripts
yangwill Jan 31, 2024
b2139ff
plotting changes
yangwill Jan 31, 2024
8c3ec1a
plotting changes
yangwill Feb 1, 2024
7e9d6ec
updating plotting script
yangwill Feb 1, 2024
e24c6cc
debugging all controller + sim in loop
yangwill Feb 2, 2024
7c08c32
changes for c3_tracking figure
yangwill Feb 2, 2024
8f5f7bb
parameter study changes
yangwill Feb 2, 2024
03121cf
cleaning up code
yangwill Feb 6, 2024
fdf1680
cleaning up code
yangwill Feb 6, 2024
5be8fb7
visualization changes to reduce flickering
yangwill Feb 8, 2024
cbd009a
minor renaming
yangwill Feb 16, 2024
3f38517
working on full diagram
yangwill Feb 20, 2024
07f46d6
deterministic sim is running but not quite fully working
yangwill Feb 20, 2024
1297fbf
making contexts consistent in lcs factory:
yangwill Feb 20, 2024
58d0a20
adding foward kinematics systems to work with mujoco mpc
yangwill Feb 29, 2024
ede8c97
removing mutables in c3 controller
yangwill Feb 29, 2024
dac266e
small cleanup of c3_controller
yangwill Feb 29, 2024
555b374
attempting to get full diagram to succeed, radio parser doesn't seem …
yangwill Mar 11, 2024
1986fdf
small tweaks
yangwill Mar 13, 2024
f40059d
giving fk for mpc state responsibility for also publishing target state
yangwill Mar 14, 2024
bb42f39
working on closed loop sim
yangwill Mar 20, 2024
7199031
working on deterministic sim
yangwill Mar 21, 2024
4952fa9
fixing bug in gap function taylor expansion
yangwill Mar 21, 2024
0539720
deterministic sim still not quite working
yangwill Mar 25, 2024
09b4a3d
rerunning parameter sweep after tuning c3 parameters to be more robust
yangwill Mar 25, 2024
067ff48
minor changes
yangwill Mar 26, 2024
ddc05a1
deterministic sim
yangwill Mar 28, 2024
d68062b
setting option to allow ending on qp step
yangwill Mar 29, 2024
62704e4
working on very slightly more expressive workspace constraints
yangwill Mar 30, 2024
70cae27
task at different angle mostly works, workspace limits seem off still
yangwill Mar 31, 2024
5c2cbc5
options to add another object to franka examples
yangwill Mar 31, 2024
8a1fa88
working on a more flexible scene specification
yangwill Mar 31, 2024
6b333ba
separating scene to separate yaml
yangwill Mar 31, 2024
3e40ae3
specifying wall example
yangwill Mar 31, 2024
6d2e0ae
wall scene wroks
yangwill Mar 31, 2024
288e94e
allowing sim to be specified with a scene file as well
yangwill Apr 1, 2024
5277f65
working on tuning wall scene
yangwill Apr 1, 2024
b21634a
still tuning wall example
yangwill Apr 1, 2024
b87ee50
gains that somewhat work for wall example
yangwill Apr 1, 2024
401cfe3
reverting visualization scaling and small tweaks to fix rotated suppo…
yangwill Apr 2, 2024
33f2ca5
working on other scenes
yangwill Apr 2, 2024
26dd238
adding external force
yangwill Apr 3, 2024
6f7530e
fixing conflict on channel 11
yangwill Apr 3, 2024
8048e54
working on rotating with wall
yangwill Apr 3, 2024
5f37ad6
still working on rotating with wall
yangwill Apr 4, 2024
70453a2
working wall task
yangwill Apr 4, 2024
715f5db
commiting gains that kind of work on april7
yangwill Apr 7, 2024
2020479
minor gain changes for perturbation rejection
yangwill Apr 9, 2024
3d0e7ab
final working gains
yangwill Apr 10, 2024
9b843c6
visualization changes
yangwill Apr 11, 2024
45287a1
last changes from rebuttal
yangwill Apr 29, 2024
14b9776
Merge branch 'plate_balancing' of github.com:DAIRLab/dairlib into pla…
yangwill Apr 29, 2024
9fd76d3
bazel settings for new version of drake
yangwill Apr 29, 2024
507b2f6
changes for updating to drake, still need to resolve drake model paths
yangwill Apr 29, 2024
bb0dfe4
using new franka model path
yangwill Apr 29, 2024
a505c42
filtering out collision geometry that i previously removed in my prev…
yangwill Apr 29, 2024
30608ef
fixing some more model paths
yangwill Apr 29, 2024
42b96ad
scaling lambda only within c3 instead of in lcs factory
yangwill Apr 29, 2024
1f650ee
fixing bug in scaling visualization
yangwill Apr 29, 2024
2fdb93d
minor chagnes to scaling
yangwill Apr 30, 2024
7697f9f
outputting c3 debug information
yangwill May 2, 2024
e6bfc36
adding flag to publish object velocities
yangwill May 2, 2024
6dcc3c4
adding bridge to use drake lcm driver
yangwill May 3, 2024
f2bb7ae
minor cleanup
yangwill May 6, 2024
47b1d85
minor formatting and clean up along with dynamic camera tracking
yangwill May 7, 2024
d015b51
adding example procman script and README for franka examples
yangwill May 8, 2024
1592909
working on robust formulation anitescu, need to verify activation
yangwill May 8, 2024
f9e6ae1
robust formulation runs but doesn't work
yangwill May 10, 2024
7a3ee46
trying to tune for stewart and trinkle
yangwill May 13, 2024
fe0e018
updating procman script
yangwill May 14, 2024
63cc66a
fixing bug in visualizing stewart and trinkle forces
yangwill May 15, 2024
cd5ea5b
minor renaming for visualizing force code
yangwill May 15, 2024
9196ed8
updating readme
yangwill May 15, 2024
be5fec7
only using robust projection on the last admm iteration
yangwill May 16, 2024
52496c5
reasonably working params on fast computer
yangwill May 16, 2024
2205b12
fixing constraint construction
yangwill May 16, 2024
2a1e45b
finally propering visualizing stewart and trinkle forces
yangwill May 16, 2024
2f70695
minor fixes
yangwill May 16, 2024
62b4b56
still working on getting framework to be more reliable
yangwill May 22, 2024
8850d56
cleaning up code and debugging anitescu
yangwill May 27, 2024
66e3a76
trying init state constraint in projection step
yangwill May 27, 2024
2e92c6c
cleaning up initial state constraint in projection, and robust constr…
yangwill May 28, 2024
d3908a4
working on robust formulation
yangwill May 28, 2024
f2ff8ed
updating to work with drake lcm driver
yangwill Jun 5, 2024
7cf1cda
updaing visualization
yangwill Jun 5, 2024
938a815
cleaning up code
yangwill Jun 5, 2024
82131d0
updating franka hardware procman
yangwill Jun 6, 2024
2a76134
updating franka readme with new hardware instructions for 22.04
yangwill Jun 6, 2024
7f31546
working on simple example
yangwill Jun 10, 2024
2330539
minor refactoring
yangwill Jun 11, 2024
570e392
moving c3 controller to separate folder
yangwill Jun 11, 2024
f6c84b9
playing with visualization
yangwill Jun 14, 2024
4bebe5b
renaming and adding comments
yangwill Jun 14, 2024
2fe13d7
successfully bound lcs factory, need to update simple model
yangwill Jun 15, 2024
148bc2e
simple python example is running but doesn't work
yangwill Jun 16, 2024
2ea7227
fixing planar lcs, gains work but are not convincing
yangwill Jun 20, 2024
bda5d64
working but not great example
yangwill Jun 20, 2024
44f28ee
debugging consensus const
yangwill Jun 20, 2024
831cdbf
reexamining planar box example because sdf links have default mass of 1
yangwill Jun 21, 2024
3dbad2d
planar box results still don't make sense
yangwill Jun 21, 2024
5d86320
Update Drake version to enable building of branch (#369)
sharanyashastry May 20, 2025
df15fe6
Expose Franka systems for use in other examples, e.g. future sampling…
sharanyashastry May 21, 2025
4af86ae
Quaternion error hessian (#372)
ebianchi May 22, 2025
d12eb6d
First sampling C3 example: jack (#370)
sharanyashastry Jun 27, 2025
3f50df0
Update Drake version to 1.39 (#378)
mposa Jun 28, 2025
05d1aec
Fixes to bazel build files (#381)
mposa Jul 2, 2025
1ccb1a6
OSQP fix after Drake (and OSQP) upgrade (#383)
ebianchi Jul 2, 2025
62ea631
Update to Drake 1.42 (#382)
mposa Jul 3, 2025
fae4ba2
Second sampling C3 example: push T (#384)
ebianchi Jul 3, 2025
22bdee6
Add README for sampling C3 documentation
ebianchi Jul 3, 2025
1db6ad5
Fix intended checks for resolving contact pairs and maintaining sampl…
ebianchi Jul 8, 2025
835671f
Add parameters for different contact pair configurations
ebianchi Jul 8, 2025
eabf277
Include workspace and input limits as constraints in C3 QP step
ebianchi Jul 8, 2025
db49a8f
Resolve merge conflicts with main (#386)
xuanhien070594 Jul 10, 2025
e84ca32
Waiter task runs (#387)
juanmed Jul 21, 2025
52547e4
Fix bug where empty list of external contact force names was passed, …
xuanhien070594 Sep 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .bazeliskrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Keep this version number in sync with the Ubuntu deb installed by
# drake/setup/ubuntu/source_distribution/install_bazel.sh.
#
# These files should also be updated:
# drake/tools/workspace/drake_visualizer/image/provision.sh
USE_BAZEL_VERSION=8.2.1
13 changes: 10 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ test --test_output=errors
test --test_summary=terse

# Use C++14.
build --cxxopt=-std=c++17
build --host_cxxopt=-std=c++17
build --cxxopt=-std=c++20
build --host_cxxopt=-std=c++20

# https://github.com/bazelbuild/bazel/issues/1164
build --action_env=CCACHE_DISABLE=1
Expand All @@ -52,7 +52,14 @@ build --action_env=LD_LIBRARY_PATH=
# customizations somehow.

# build with snopt
build --define=WITH_SNOPT=ON
build --define=WITH_GUROBI=ON
build --define=NO_CLARABEL=ON

build:omp --copt=-DEIGEN_DONT_PARALLELIZE
build:omp --copt=-fopenmp
build:omp --linkopt=-fopenmp

# use python3 by default
build --python_path=python3

common --enable_bzlmod
89 changes: 28 additions & 61 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,91 +1,58 @@
registry_config: ENCRYPTED[!88cf0d757d2f8b93dca9e57dc166b65ddedef6378e7ac12a91a022ab3fb28dd47b10d452dc5c53a68e144e6bdbae999b!]
build_jammy_task:
timeout_in: 120m
container:
dockerfile: install/jammy/Dockerfile
image: ghcr.io/dairlab/docker-dair/jammy-dair-base:v1.42
cpu: 8
memory: 24
memory: 24G
test_script:
- export CC=clang-12
- export CXX=clang++-12
- bazel build
--define=WITH_SNOPT=OFF
--local_ram_resources=24000
--local_cpu_resources=8
--local_resources=memory=24000
--local_resources=cpu=8
--jobs=8
--remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST
//...
- bazel test
--define=WITH_SNOPT=OFF
--local_ram_resources=24000
--local_cpu_resources=8
--local_resources=memory=24000
--local_resources=cpu=8
--remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST
//...
build_focal_task:

build_noble_task:
timeout_in: 120m
container:
dockerfile: install/focal/Dockerfile
image: ghcr.io/dairlab/docker-dair/noble-dair-base:v1.42
cpu: 8
memory: 24
memory: 24G
test_script:
- export CC=clang-12
- export CXX=clang++-12
- bazel build
--define=WITH_SNOPT=OFF
--local_ram_resources=24000
--local_cpu_resources=8
--local_resources=memory=24000
--local_resources=cpu=8
--jobs=8
--remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST
//...
- bazel test
--define=WITH_SNOPT=OFF
--local_ram_resources=24000
--local_cpu_resources=8
//...
build_with_ros_task:
timeout_in: 120m
container:
dockerfile: install/focal/ros/Dockerfile
cpu: 8
memory: 24
env:
DAIRLIB_WITH_ROS: ON
test_script:
- cd tools/workspace/ros
- ./compile_ros_workspace.sh
- cd ../../../
- bazel build
--define=WITH_SNOPT=OFF
--local_ram_resources=24000
--local_cpu_resources=8
--jobs=8
//...
- bazel test
--define=WITH_SNOPT=OFF
--local_ram_resources=24000
--local_cpu_resources=8
--jobs=8
--local_resources=memory=24000
--local_resources=cpu=8
--remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST
//...

drake_master_build_task:
timeout_in: 120m
container:
dockerfile: install/focal/ros/Dockerfile
image: ghcr.io/dairlab/docker-dair/jammy-dair-base:v1.42
cpu: 8
memory: 24
memory: 24G
allow_failures: true
env:
DAIRLIB_WITH_ROS: ON
test_script:
- git clone https://github.com/RobotLocomotion/drake.git ../drake
- export DAIRLIB_LOCAL_DRAKE_PATH=$PWD/../drake
- cd tools/workspace/ros
- ./compile_ros_workspace.sh
- cd ../../../
- bazel build
--define=WITH_SNOPT=OFF
--local_ram_resources=24000
--local_cpu_resources=8
--jobs=8
--override_module=drake=$PWD/../drake
--local_resources=memory=24000
--local_resources=cpu=8
//...
- bazel test
--define=WITH_SNOPT=OFF
--local_ram_resources=24000
--local_cpu_resources=8
--jobs=8
--override_module=drake=$PWD/../drake
--local_resources=memory=24000
--local_resources=cpu=8
//...
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ attic/multibody/solver_log/
.vscode
*.csv
/examples/Cassie/saved_trajectories/
/MODULE.bazel.lock
11 changes: 0 additions & 11 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,3 @@

# This is an empty BUILD file, to ensure that the project's root directory is a
# bazel package.

load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier")

buildifier(
name = "buildifier",
)

load("@bazel_gazelle//:def.bzl", "gazelle")

# gazelle:prefix github.com/example/project
gazelle(name = "gazelle")
122 changes: 122 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
## MODULE.bazel
module(
name = "dairlib"
)

drake_dep_repositories = use_extension(
"@drake//tools/workspace:default.bzl",
"drake_dep_repositories",
)

# If you don't want to support building on macOS, you may remove the next line.
# Note that it must appear prior to loading "rules_cc", per the documentation:
# https://github.com/bazelbuild/apple_support?tab=readme-ov-file#bazel-7-setup
bazel_dep(name = "apple_support", version = "1.17.1")

# Add the Bazel rules we need.
bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "rules_python", version = "1.0.0")
bazel_dep(name = "bazel_skylib", version = "1.7.1")

use_repo(
drake_dep_repositories,
"blas",
"buildifier",
"drake_models",
"eigen",
"fmt",
"gflags",
"glib",
"gtest",
"lapack",
"lcm",
"meshcat",
"mosek",
"opencl",
"pybind11",
"pycodestyle",
"snopt",
"spdlog",
"styleguide",
"x11",
"zlib",
"gurobi",
)

bazel_dep(name = "gazelle", version = "0.44.0")

bazel_dep(name = "osqp", version = "0.6.3.bcr.2")

# Use gurobi_cxx, which Drake deprecated
gurobi_extension = use_extension("@dairlib//tools/workspace/gurobi:repository.bzl", "gurobi_extension")
use_repo(gurobi_extension, "my_gurobi")

# Replace Drake's Gurobi repository with ours.
override_repo(
drake_dep_repositories,
gurobi = "my_gurobi",
)

# Here we introduce Drake as a module dependency, but note that Drake is not
# published to any Bazel registry. Below, we'll override it with a github
# source archive.
bazel_dep(name = "drake")

bazel_dep(name = "inekf")

# By default, this example always uses the latest Drake master branch.

# To use a local version of drake, use
# build --override_module=drake=/home/user/stuff/drake
# this will also work to override inekf

# You can also use DRAKE_COMMIT to choose a Drake release; e.g.:
DRAKE_VERSION = "v1.42.0"
DRAKE_CHECKSUM = "d860c15f50397c8a946fcc79e0a58a91ebc56f2189ef9edfcac929aa04157f8b"

# Before changing the DRAKE_VERSION, temporarily uncomment the next line so that Bazel
# displays the suggested new value for the CHECKSUM.
# DRAKE_CHECKSUM = "0" * 64

# This declares the `@drake` module as a source code archive from github.
# See README.md for instructions to use a local path, instead.
archive_override(
module_name = "drake",
urls = [x.format(DRAKE_VERSION) for x in [
"https://github.com/RobotLocomotion/drake/archive/{}.tar.gz",
]],
sha256 = DRAKE_CHECKSUM,
strip_prefix = "drake-{}".format(DRAKE_VERSION.lstrip("v")),
)

INEKF_COMMIT = "297c308e50fa599af92ce3bd5f11d71e2bf8af69"
INEKF_CHECKSUM = "c5a056ce00e1625e52f5a71b1d5c202acd53c1a8c7bca33da458db1e4f3f2edf"


# Before changing the COMMIT, temporarily uncomment the next line so that Bazel
# displays the suggested new value for the CHECKSUM.
#INEKF_CHECKSUM = "0" * 64

# This declares the `@inekf` module as a source code archive from github.
archive_override(
module_name = "inekf",
urls = [x.format(INEKF_COMMIT) for x in [
"https://github.com/DAIRLab/invariant-ekf/archive/{}.tar.gz",
]],
sha256 = INEKF_CHECKSUM,
strip_prefix = "invariant-ekf-{}".format(INEKF_COMMIT),
)

# Use the host system /usr/bin/python3.
python_repository = use_repo_rule(
"@drake//tools/workspace/python:repository.bzl",
"python_repository",
)

python_repository(
name = "python",
linux_interpreter_path = "/usr/bin/python3",
requirements_flavor = "build",
)

register_toolchains("@python//:all")
19 changes: 5 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
Warning! This is very much "development-level" code and is provided as-is. APIs are likely to be unstable and, while we hope for the documentation to be thorough and accurate, we make no guarantees.

## Current Continuous Integration Status
* `master` branch build and unit tests (Ubuntu 18.04): [![Build Status](https://api.cirrus-ci.com/github/DAIRLab/dairlib.svg?task=build&script=test)](https://cirrus-ci.com/github/DAIRLab/dairlib)
* `master` branch build and unit tests (Ubuntu 20.04): [![Build Status](https://api.cirrus-ci.com/github/DAIRLab/dairlib.svg?task=build_focal&script=test)](https://cirrus-ci.com/github/DAIRLab/dairlib)
* `master` branch build and unit tests (Ubuntu 20.04 with ROS): [![Build Status](https://api.cirrus-ci.com/github/DAIRLab/dairlib.svg?task=build_with_ros&script=test)](https://cirrus-ci.com/github/DAIRLab/dairlib)
* Experimental build against Drake's `master` branch: [![Build Status](https://api.cirrus-ci.com/github/DAIRLab/dairlib.svg?task=drake_master_build&script=test)](https://cirrus-ci.com/github/DAIRLab/dairlib)
* `main` branch build and unit tests (Ubuntu Jammy 22.04): [![Build Status](https://api.cirrus-ci.com/github/DAIRLab/dairlib.svg?task=build_jammy&script=test)](https://cirrus-ci.com/github/DAIRLab/dairlib)
* `main` branch build and unit tests (Ubuntu Focal 24.04): [![Build Status](https://api.cirrus-ci.com/github/DAIRLab/dairlib.svg?task=build_focal&script=test)](https://cirrus-ci.com/github/DAIRLab/dairlib)
* Experimental build against Drake's `master` branch (Jammy): [![Build Status](https://api.cirrus-ci.com/github/DAIRLab/dairlib.svg?task=drake_master_build&script=test)](https://cirrus-ci.com/github/DAIRLab/dairlib)
## Complete Build Instructions

### Download dairlib
Expand All @@ -29,21 +28,13 @@ There is no need to extract the tar.
The library is meant to be built with Drake (see http://drake.mit.edu/ for more details). There are two ways to use Drake within dairlib:

#### Option 1: use pegged revision (Note - These steps may need repeated if switching to a branch with a different pegged revision of drake).
The only specific action needed here is to install all of Drake's prerequisites. There are two choices for completing this step:

a) In `dairlib/install`, run the appropriate `install_prereqs_xxx.sh`. This is untested on mac, and has not been tested to get every dependency for a fresh install.

b) Download a source copy of drake, and install pre-requisites as described here: http://drake.mit.edu/from_source.html. Drake dependencies can change without notice. For full compatiability, you may need to checkout the drake commit which is pegged in WORKSPACE to install the correct dependencies. There is no need to build Drake itself. Proceed only until you have run the Drake setup script.

bazel will automatically download the pegged revision, specified in the WORKSPACE file. dairlib developers hope to keep this pegged revision current, and ensure that the pegged version will always work with a specific version of dairlib.
In `dairlib/install`, run the `install_prereqs_ubuntu.sh`. Our build process does not currently support MacOS, though it has in the past and likely will in the future.

This option is recommended for users who are not currently editing any source code in Drake itself.

#### Option 2: source install of Drake
Complete both steps (a) and (b) above. By running the drake install script after the dairlib install script, you are capturing any dependency changes between the pegged revision and the current Drake master, while still getting any aditional dairlib dependencies we may add. There is no need to build Drake. Next, to tell dairlib to use your local install, set the environment variable `DAIRLIB_LOCAL_DRAKE_PATH`, e.g.
```
export DAIRLIB_LOCAL_DRAKE_PATH=/home/user/my-workspace/drake
```
If you would like to use your own local install of Drake, likely because you are modifying it, when you build with Bazel you will need to use `bazel build --override_module=drake=/home/user/my-workspace/drake <package you are building>` (using the appropriate directory for your own install). There is no need to build Drake.

### IDE setup
JetBrains IDEs have worked well for us and are available for free to students. For C++ development using the CLion Bazel plugin, see https://drake.mit.edu/clion.html and replace `drake` with `dairlib` in the "Setting up Drake in CLion" section.
Expand Down
Loading