forked from DAIRLab/dairlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWORKSPACE
146 lines (115 loc) · 5.01 KB
/
WORKSPACE
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
# -*- mode: python -*-
# vi: set ft=python :
workspace(name = "dairlib")
# dairlib can use either a local version of drake or a pegged revision
# If the environment variable DAIRLIB_LOCAL_DRAKE_PATH is set, it will use
# a local version, ad the specified path. Otherwise, it will get a pegged
# revision from github.
# As an example,
# export DAIRLIB_LOCAL_DRAKE_PATH=/home/user/workspace/drake
# Choose a revision of Drake to use.
DRAKE_COMMIT = "1cab4e23d5d41690a3c43a0af80cb62f7eaacf3f"
DRAKE_CHECKSUM = "da63499c336e690afa41db030c7586e8c2c2ae53ca0a81acf8f94d162a6a2b0e"
# Before changing the COMMIT, temporarily uncomment the next line so that Bazel
# displays the suggested new value for the CHECKSUM.
# DRAKE_CHECKSUM = "0" * 64
# Load an environment variable.
load("//:environ.bzl", "environ_repository")
environ_repository(
name = "environ",
vars = ["DAIRLIB_LOCAL_DRAKE_PATH"],
)
load("@environ//:environ.bzl", "DAIRLIB_LOCAL_DRAKE_PATH")
# The WORKSPACE file does not permit `if` statements, so we handle the local
# option by toying with the repository names. The selected repository is named
# "@drake", the other is named "@drake_ignored".
(_http_drake_repo_name, _local_drake_repo_name) = (
"drake_ignored" if DAIRLIB_LOCAL_DRAKE_PATH else "drake",
"drake" if DAIRLIB_LOCAL_DRAKE_PATH else "drake_ignored",
)
# Maybe download Drake.
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = _http_drake_repo_name,
sha256 = DRAKE_CHECKSUM,
strip_prefix = "drake-{}".format(DRAKE_COMMIT),
urls = [x.format(DRAKE_COMMIT) for x in [
"https://github.com/RobotLocomotion/drake/archive/{}.tar.gz",
]],
)
# Maybe use a local checkout of Drake.
print("Using DAIRLIB_LOCAL_DRAKE_PATH={}".format(DAIRLIB_LOCAL_DRAKE_PATH)) if DAIRLIB_LOCAL_DRAKE_PATH else None # noqa
local_repository(
name = _local_drake_repo_name,
path = DAIRLIB_LOCAL_DRAKE_PATH,
)
# Reference external software libraries and tools per Drake's defaults. Some
# software will come from the host system (Ubuntu or macOS); other software
# will be downloaded in source or binary form from github or other sites.
load("@drake//tools/workspace:default.bzl", "add_default_repositories")
add_default_repositories()
load("@dairlib//tools/workspace/signal_scope:repository.bzl", "signal_scope_repository")
signal_scope_repository(name = "signal_scope")
# Prebuilt ROS workspace
new_local_repository(
name = "ros",
build_file = "tools/workspace/ros/ros.bazel",
path = "tools/workspace/ros/bundle_ws/install",
)
# Other catkin packages from source
# TODO: generate this automatically from rosinstall_generator
http_archive(
name = "genmsg_repo",
build_file = "@//tools/workspace/ros/bazel:genmsg.BUILD",
sha256 = "d7627a2df169e4e8208347d9215e47c723a015b67ef3ed8cda8b61b6cfbf94d2",
strip_prefix = "genmsg-0.5.8",
urls = ["https://github.com/ros/genmsg/archive/0.5.8.tar.gz"],
)
http_archive(
name = "genpy_repo",
build_file = "@//tools/workspace/ros/bazel:genpy.BUILD",
sha256 = "35e5cd2032f52a1f77190df5c31c02134dc460bfeda3f28b5a860a95309342b9",
strip_prefix = "genpy-0.6.5",
urls = ["https://github.com/ros/genpy/archive/0.6.5.tar.gz"],
)
# dairlib can use either a local version of invariant-ekf or a pegged revision
# If the environment variable DAIRLIB_LOCAL_INEKF_PATH is set, it will use
# a local version, ad the specified path. Otherwise, it will get a pegged
# revision from github.
# As an example,
# export DAIRLIB_LOCAL_INEKF_PATH=/home/user/workspace/invariant-ekf
# Choose a revision of InEKF to use.
INEKF_COMMIT = "7fde9f84dbe536ba9439a3b8c319efb51ff760dd"
INEKF_CHECKSUM = "f87e3262b0c9c9237881fcd539acd1c60000f97dfdfa47b0ae53cb7a0f3256e4"
# Before changing the COMMIT, temporarily uncomment the next line so that Bazel
# displays the suggested new value for the CHECKSUM.
# INEKF_CHECKSUM = "0" * 64
# Load an environment variable.
environ_repository(
name = "environ_inekf",
vars = ["DAIRLIB_LOCAL_INEKF_PATH"],
)
load("@environ_inekf//:environ.bzl", "DAIRLIB_LOCAL_INEKF_PATH")
# The WORKSPACE file does not permit `if` statements, so we handle the local
# option by toying with the repository names. The selected repository is named
# "@inekf", the other is named "@inekf_ignored".
(_http_inekf_repo_name, _local_inekf_repo_name) = (
"inekf_ignored" if DAIRLIB_LOCAL_INEKF_PATH else "inekf",
"inekf" if DAIRLIB_LOCAL_INEKF_PATH else "inekf_ignored",
)
# Maybe download InEKF.
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = _http_inekf_repo_name,
sha256 = INEKF_CHECKSUM,
strip_prefix = "invariant-ekf-{}".format(INEKF_COMMIT),
urls = [x.format(INEKF_COMMIT) for x in [
"https://github.com/DAIRLab/invariant-ekf/archive/{}.tar.gz",
]],
)
# Maybe use a local checkout of InEKF.
print("Using DAIRLIB_LOCAL_INEKF_PATH={}".format(DAIRLIB_LOCAL_INEKF_PATH)) if DAIRLIB_LOCAL_INEKF_PATH else None # noqa
local_repository(
name = _local_inekf_repo_name,
path = DAIRLIB_LOCAL_INEKF_PATH,
)