-
Notifications
You must be signed in to change notification settings - Fork 37
/
WORKSPACE
74 lines (59 loc) · 2.02 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
workspace(name = "drake_ros_examples")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "com_google_googletest",
sha256 = "5cf189eb6847b4f8fc603a3ffff3b0771c08eec7dd4bd961bfd45477dd13eb73", # noqa
strip_prefix = "googletest-609281088cfefc76f9d0ce82e1ff6c30cc3591e5",
urls = ["https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip"], # noqa
)
# Use the ROS 2 bazel rules
local_repository(
name = "bazel_ros2_rules",
path = "../bazel_ros2_rules",
)
load("@bazel_ros2_rules//deps:defs.bzl", "add_bazel_ros2_rules_dependencies")
add_bazel_ros2_rules_dependencies()
load("@bazel_ros2_rules//ros2:defs.bzl", "ros2_local_repository")
# N.B. We do *not* name this as `drake_ros` to avoid module shadowing.
# See https://github.com/bazelbuild/bazel/issues/17691
# If you wish to maintiain the name as `drake_ros` and you need Python, then
# you should ensure `legacy_create_init=False` (or an equivalent effect) is
# present:
# https://bazel.build/reference/be/python#py_binary.legacy_create_init
local_repository(
name = "drake_ros_repo",
path = "../drake_ros",
)
load(
"@drake_ros_repo//:required_packages.bzl",
"DRAKE_ROS_REQUIRED_PACKAGES",
"drake_ros_fail_if_missing_required_packages",
)
ROS_PACKAGES = DRAKE_ROS_REQUIRED_PACKAGES + [
"geometry_msgs",
"rclcpp",
"rclpy",
"ros2cli_common_extensions",
"rviz2",
"tf2_ros",
"tf2_ros_py",
"visualization_msgs",
]
drake_ros_fail_if_missing_required_packages(ROS_PACKAGES)
# Use ROS 2
ros2_local_repository(
name = "ros2",
include_packages = ROS_PACKAGES,
workspaces = ["/opt/ros/humble"],
)
load("@drake_ros_repo//:drake.bzl", "DRAKE_SUGGESTED_VERSION")
http_archive(
name = "drake",
sha256 = DRAKE_SUGGESTED_VERSION.sha256,
strip_prefix = DRAKE_SUGGESTED_VERSION.strip_prefix,
urls = [
DRAKE_SUGGESTED_VERSION.url,
],
)
load("@drake//tools/workspace:default.bzl", "add_default_workspace")
add_default_workspace()