Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version bumps and minor updates #10

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build --incompatible_default_to_explicit_init_py
# enable implementation_deps on cc_library targets
build --experimental_cc_implementation_deps

# set c++14 for all builds
# set c++17 for all builds
build --cxxopt="-std=c++17"
build --host_cxxopt="-std=c++17"

Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.3.2
6.5.0
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ as a launch tool for Bazel.

Create an empty folder and add the following files to it:
* `WORKSPACE` file:

```python
workspace(name = "my_first_bazel_ros_workspace") # choose your workspace name here
# load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
Expand Down Expand Up @@ -83,47 +84,55 @@ Create an empty folder and add the following files to it:
load("@rules_ros//thirdparty:setup_04.bzl", "setup_04")
setup_04()
```

* `.bazelrc` file:

```bash
# enable incompatible Python init mode
build --incompatible_default_to_explicit_init_py

# enable implementation_deps on cc_library targets
build --experimental_cc_implementation_deps

# set C++14 for all builds
# set C++17 for all builds
build --cxxopt="-std=c++17"
build --host_cxxopt="-std=c++17"
```

* `.bazelversion` file (in case you are using bazelisk):
```text
5.3.1
```

```text
6.5.0
```

### Run Bazel example

To **build** an example delivered in the `rules_ros` repository run, e.g.

```bash
bazel build @rules_ros//examples/hello_world
```
from anywhere within your workspace.

**Executing** the example can be done by calling

```bash
bazel run @rules_ros//examples/hello_world
```
Note that no sourcing is necessary. Bazel will take care of all the dependencies.

**Deploying** a package archive to an install folder can be done by

```bash
bazel run @rules_ros//examples:rules_ros_examples.install <install_folder>
```
Now we are back to working with ROS as usual. Source the package as usual:

```bash
source <install_folder>/setup.bash
```
and run an executable with

```bash
ros2 run hello_world hello_world
```
Expand Down
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/bazel_simple_example/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/bazel_simple_example/publisher.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Apex.AI, Inc.
// Copyright 2024 Apex.AI, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/bazel_simple_example/subscriber.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Apex.AI, Inc.
// Copyright 2024 Apex.AI, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/hello_world/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pkg/defs.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pkg/detail/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pkg/detail/executable_wrapper_generator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pkg/detail/package_xml_generator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions pkg/detail/ros_archive.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("@rules_pkg//:providers.bzl", "PackageFilegroupInfo", "PackageFilesInfo")
load("@rules_pkg//pkg:providers.bzl", "PackageFilegroupInfo", "PackageFilesInfo")
load(
":utils.bzl",
_add_filegroup = "add_filegroup",
Expand Down
4 changes: 2 additions & 2 deletions pkg/detail/ros_pkg.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("@rules_pkg//:providers.bzl", "PackageFilegroupInfo", "PackageFilesInfo")
load("@rules_pkg//pkg:providers.bzl", "PackageFilegroupInfo", "PackageFilesInfo")
load("@rules_python//python:packaging.bzl", "PyWheelInfo")
load(
":utils.bzl",
Expand Down
2 changes: 1 addition & 1 deletion pkg/detail/setup_bash_generator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pkg/detail/templates/install.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /bin/bash
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions pkg/detail/utils.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("@rules_pkg//:providers.bzl", _PackageFilegroupInfo = "PackageFilegroupInfo")
load("@rules_pkg//pkg:providers.bzl", _PackageFilegroupInfo = "PackageFilegroupInfo")
load("@rules_ros//pkg:providers.bzl", _RosPkgInfo = "RosPkgInfo")

def add_files_to_filegroup_info(filegroup_info, pkg_files_info, label):
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ament.ament_index/ament_index_cpp.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ament.ament_index/ament_index_python.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/config/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/config/defs.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/config/detail/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/config/detail/generate_ros2_config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /usr/bin/env python3
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/config/detail/git_repository.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/config/detail/http_archive.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions repos/config/detail/lock_repos.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /usr/bin/env python3
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -53,7 +53,7 @@ def main():

with open(args.lock, "w", encoding='utf8') as lock_file:
print(
"#\n# To update, call `bazel run //repos/config:repos_lock.update` with the right distro set in the WORKSPACE\n#",
"#\n# To update, call `bazel run @rules_ros//repos/config:repos_lock.update` with the right distro set in the WORKSPACE\n#",
file = lock_file
)
yaml.dump(repos, lock_file, default_flow_style=False, allow_unicode=True)
Expand Down
2 changes: 1 addition & 1 deletion repos/config/detail/new_local_repository.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/config/detail/ros2_config.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ros-tooling.libstatistics_collector/root.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ros2.common_interfaces/std_msgs.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ros2.rcl/rcl.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ros2.rcl/rcl_yaml_param_parser.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ros2.rcl_interfaces/builtin_interfaces.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ros2.rcl_interfaces/rcl_interfaces.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ros2.rcl_interfaces/rosgraph_msgs.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ros2.rcl_interfaces/statistics_msgs.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ros2.rcl_logging/rcl_logging_interface.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ros2.rclcpp/build_interfaces.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ros2.rclcpp/rclcpp.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ros2.rcpputils/rcpputils.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ros2.rcutils/build_logging_macros.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ros2.rcutils/root.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ros2.rmw/rmw.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ros2.ros2_tracing/tracetools.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ros2.ros2cli/ros2cli.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ros2.ros2cli/ros2pkg.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion repos/ros2.ros2cli/ros2run.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Apex.AI, Inc.
# Copyright 2024 Apex.AI, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Loading
Loading