Skip to content

Commit

Permalink
Add compilation instructions and an script to install all necessary t…
Browse files Browse the repository at this point in the history
…hings (#9)
  • Loading branch information
femder-bdai authored Apr 19, 2024
1 parent 2c26a66 commit d1c89b5
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Install dependencies and build
on:
# By default, this workflow is not triggered when a PR is merged.
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
- labeled
- unlabeled
push:
branches:
- "*"

jobs:
compile:
name: Install dependencies and compile project
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies & build
run: |
# Install dependencies
./install_dependencies.sh
# Build realsense lcm driver
bazel build //...
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Dependency installation

Install all necessary dependencies to run realsense lcm drivers you need to run the following:

`./install_dependencies.sh`

After that, you will need to compile:

`bazel build //...`

Finally, you can run the nodes:

`bazel run rgbd_sensor:realsense_rgbd_publisher`

16 changes: 16 additions & 0 deletions install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

sudo apt-get update \
&& sudo apt-get install -y python3-dev python3-pip libglib2.0-dev \
&& sudo rm -rf /var/lib/apt/lists/*

# Install Bazel
sudo apt-get update \
&& sudo apt-get install apt-transport-https curl gnupg -y \
&& sudo rm -rf /var/lib/apt/lists/*
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg
sudo mv bazel-archive-keyring.gpg /usr/share/keyrings
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list

#install realsense driver dependencies
sudo apt-get update && sudo apt-get install -y libjpeg-dev libtbb-dev libtiff5-dev libpng-dev libboost-all-dev libeigen3-dev libfmt-dev libspdlog-dev && sudo rm -rf /var/lib/apt/lists/*

0 comments on commit d1c89b5

Please sign in to comment.