https://github.com/stephane-caron/bazel_pinocchio
Bazel workspace rules to build Pinocchio targets
https://github.com/stephane-caron/bazel_pinocchio
Last synced: about 2 months ago
JSON representation
Bazel workspace rules to build Pinocchio targets
- Host: GitHub
- URL: https://github.com/stephane-caron/bazel_pinocchio
- Owner: stephane-caron
- License: apache-2.0
- Created: 2022-10-07T17:13:33.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-27T18:04:50.000Z (9 months ago)
- Last Synced: 2025-04-02T01:03:16.329Z (about 2 months ago)
- Language: Python
- Homepage:
- Size: 50.8 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Bazel rules for Pinocchio
Workspace rules for building C++ targets that depend on [Pinocchio](https://github.com/stack-of-tasks/pinocchio).
## Prerequisites
You will need the build dependencies of Pinocchio for your operating system. For instance, on Ubuntu 22.04:
```console
sudo apt install libboost-filesystem-dev libboost-serialization-dev libboost-system-dev libeigen3-dev liburdfdom-dev
```## Setup
Add the following to your ``WORKSPACE`` file:
```python
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")http_archive(
name = "bazel_pinocchio",
url = "https://github.com/stephane-caron/bazel_pinocchio/archive/refs/tags/v3.2.0.tar.gz",
sha256 = "ce307e630eada26d0a3d01deaae7cc44afd8316c1248969420cbc0bcb7c76ace",
strip_prefix = "bazel_pinocchio-3.2.0",
)load("@bazel_pinocchio//tools/workspace:default.bzl", add_bazel_pinocchio = "add_default_repositories")
# This creates the @eigen and @pinocchio dependencies
add_bazel_pinocchio()
```You can then build C++ targets that depend on ``@pinocchio``:
```python
cc_binary(
name = "overview-simple",
srcs = ["overview-simple.cpp"],
deps = ["@pinocchio"],
)
```## Example
From this repository, run:
```console
./tools/bazelisk run //examples/cpp:overview-simple
```This example should output ``tau = 0 0 0 0 0 0``.