Skip to content

Commit

Permalink
WIP-FIX: trying to solve PR conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
9and3 committed Nov 20, 2024
2 parents 450ec64 + ddd5f38 commit 8f4ec70
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 69 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/joss-pdf-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,6 @@ jobs:
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
- name: Delete branch remotely joss-pdf-ac-branch (if exists)
run: |
git fetch --prune
if git branch -r | grep -q 'origin/joss-pdf-ac-branch'; then
git push origin --delete joss-pdf-ac-branch
else
echo "Branch joss-pdf-ac-branch does not exist."
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash

- name: Get current branch name
run: |
current_branch=$(git branch --show-current)
Expand Down
148 changes: 92 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,95 +9,131 @@
</p>



# Augmented Carpentry

Donwnload the repo first:
```bash
git clone https://github.com/ibois-epfl/augmented-carpentry.git
git submodule sync
git pull --recurse-submodules
```
This is the repo containing the necessary code to run the Augmented Carpentry (AC) software. This is a research thesis project from the [Laboratory of Timber Constructions (IBOIS)](https://ibois.epfl.ch/) at the [Swiss Federal Institute of Technology in Lausanne (EPFL)](https://www.epfl.ch/). It is an Augmented Reality (AR) application that helps operators to integrate ordinary tools (e.g. power drills, circular saws and chainsaws) into digitally guided woodworking to obtain live computed feedback. The aim is to suppress 2D execution drawings and markings and empower the worker with precise and real-time guidance to replicate even a complex digital designs with manual tools.

## System dependecies
AC needs some local libraries already installed before compilation with cmake.
</br>

Before start you will need many dependencies but the largest will be opencv `4.5.5`. Be sure to have installed this version in your local system.
## Quickstart

Next we need glm dependencies and libraries:
```bash
sudo apt-get -y install libmpfr-dev libboost-dev libgoogle-glog-dev \
freeglut3-dev libglew-dev libglfw3 libglfw3-dev \
git-lfs libassimp-dev libglm-dev libimgui-dev \
libcgal-dev
```
### 1 Software Requirements
AC is build and tested for *UNIX x64 machines running on Ubuntu 22.04 LTS*. It does not exploit GPU acceleration and can run on a laptop or a desktop. The software is built with *C++*.

For tbb and opencv you will also need these:
First refresh the package list and install the necessary dependencies:
```bash
sudo apt -y install build-essential cmake git pkg-config libgtk-3-dev \
libavcodec-dev libavformat-dev libswscale-dev libv4l-dev \
libxvidcore-dev libx264-dev libjpeg-dev libpng-dev libtiff-dev \
gfortran openexr libatlas-base-dev python3-dev python3-numpy \
libtbb2 libtbb-dev libdc1394-dev libopenexr-dev \
libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev
apt-get -qq update && apt-get -qq -y install g++ cmake git git-lfs
```
For the video recorder you will need opencv too and ffmpeg
And here's the dependecies for the project:
```bash
sudo apt -y install ffmpeg
apt-get -qq update && apt-get -qq -y install \
wget \
curl \
unzip \
xvfb \
freeglut3-dev \
libfreetype-dev \
libassimp-dev \
libboost-all-dev \
libeigen3-dev \
libglew-dev \
libglfw3-dev \
libglm-dev \
libgmp-dev \
libgoogle-glog-dev \
libmpfr-dev \
libimgui-dev \
libopencv-dev
```

Next you need to pull the PyTorch dependency with the Large File System in git, to do this:
```bash
cd deps/TTool
git lfs pull
### 2 Hardware Requirements

#### 2.1 Computing unit, interface and sensors
AC works on *x64 machines* running on *Ubuntu 22.04 LTS* and a simple *monocular camera*. For a quick start, you can use a laptop and your webcam. If you want to build on a touch screen, you can use the WaveShare WS170120 and follow the instructions below:

To config the touch screen on the pc follow [these steps first](https://www.waveshare.com/wiki/7inch_HDMI_LCD). Be sure to switch the display on, plug the mini-USB and finally plug the HDMI cable.

Set the display properties in the `config.ini` properties (to find them run the commands `xinput` for the name and `xrandr` for the connection type).

The following specs works on the X11 display server. If you are using wayland and wanting to switch to X11 follow [this link](https://helpdesk.psionline.com/hc/en-gb/articles/13470827149332-How-to-perform-the-switch-from-the-Wayland-display-server-to-Xorg-X11-on-Linux-Ubuntu-22-04-LTS).

```c++
[MonitorSpecs]
monitor_name = WaveShare WS170120
monitor_link_t = HDMI
monitor_resolution = 1280 x 720
```

## Build
> [!NOTE]
> You can use any other touch screen, just make sure to set the correct specs in the `config.ini` file.
Time to build.. If you are deploying on a touch monitor set the flag `-DDEPLOY_ON_TOUCH=ON`, you can config:
> [!WARNING]
> Wayland display and touchscreen are not compatible yet as the touchscreen register for the main display and not the small display.
> ```c++
> [MonitorSpecs]
> LinkMode = XWAYLAND1
> Name = Virtual core pointer
> Resolution = 1280 x 720
> ```
> [!TIP]
> You can build AC with the touch screen or on a non-touch screen. To do so set ON or OFF the CMake option `DEPLOY_ON_TOUCH` later when configuring the build: `cmake -S . -B build -DDEPLOY_ON_TOUCH=ON`.
#### 2.2 Wood working tools
AC is designed to be *machine independent*, it is only dependent on the toolheads (e.g.: drill bits, circular saw blades and chainsaw boards). You can find a list of the available toolheads [here](https://zenodo.org/records/12578820). If you want to add your own, open a Pull Request to the repo [TTool](https://github.com/ibois-epfl/TTool) and follow the [Wiki](https://github.com/ibois-epfl/TTool/wiki).
#### 2.3 Stickers
The last thing you need is a set of *STags*. These are the markers that help the camera understand its position and orientation to the timber beam. You can find them as 450 stripes for a total of 21149 tags are available in batches of 50 stripes with an A0 format, ready to print (better as stickers) and can [be downloaded here](https://zenodo.org/record/7738721/files/stag_stickers_ready.zip?download=1). They are made to be print as stickers, but if you want to generate your own you can find a [script here](https://github.com/ibois-epfl/TSlam/tree/main/stag_util).
### 3 Build & Run
Donwnload the repo first:
```bash
git clone --recurse-submodules https://github.com/ibois-epfl/augmented-carpentry.git
```
AC can be built either on a touch screen or on a non-touch screen like your laptop.
Time to build.. If you are deploying on a touch monitor set the flag `-DDEPLOY_ON_TOUCH=ON`, you can config:
```bash
cd augmented-carpentry
cmake -S . -B build
cmake --build build
```

To run the code:
```bash
./build/bin/AC
```
While running the code, make sure that `config.ini` and `assets/` exists in the current directory. If errors related to config present, please reconfigure the `config.ini` by copy-pasting the content from `/assets/default_config.ini`.
## Set touch monitor
That's it your are running Augmented Carpentry🪚!
The prototype is tested on a touch screen 7inch HDMI LCD (B) (WaveShare WS170120) and a laptop running Ubuntu 20/22.04 LTS. To config the touch screen on the pc follow [these steps first](https://www.waveshare.com/wiki/7inch_HDMI_LCD). Be sure to switch the display on, plug the mini-USB and finally plug the HDMI cable.
Set the display properties in the `config.ini` properties (to find them run the commands `xinput` for the name and `xrandr` for the connection type).
### 4 How to use
Follow our [online documentation](missinglink) to learn how to use the AC.
The following specs works on the X11 display server. If you are using wayland and wanting to switch to X11 follow [this link](https://helpdesk.psionline.com/hc/en-gb/articles/13470827149332-How-to-perform-the-switch-from-the-Wayland-display-server-to-Xorg-X11-on-Linux-Ubuntu-22-04-LTS)
./
</br>
```c++
[MonitorSpecs]
monitor_name = WaveShare WS170120
monitor_link_t = HDMI
monitor_resolution = 800x480
```
For wayland display server. WARNING: Wayland display and touchscreen are not compatible yet as the touchscreen register for the main display and not the small display.

```c++
[MonitorSpecs]
LinkMode = XWAYLAND1
Name = Virtual core pointer
Resolution = 800x480
## How to cite
To cite the software follow the following BibTeX entry:
```bibtex
@software{AugmentedCarpentrySoftware2024,
title = {{Augmented Carpentry Software}},
author = {Andrea Settimi, Hong-Bin Yang, Naravich Chutisilp, Nazgul Zholmagambetova, Florian Aymanns, Edward Andò and Nicolas Richart},
year = {2024},
doi = {10.5281/zenodo.14191429},
url = {https://github.com/ibois-epfl/augmented-carpentry}
```
or the associated Zenodo DOI:
> You can build AC with the touch screen or on a non-touch screen. To do so set ON or OFF the CMake option `DEPLOY_ON_TOUCH` in the `CMakeLists.txt`:
<a href="https://doi.org/10.5281/zenodo.14191429"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.14191429.svg" alt="DOI"></a>
<br />
To cite the research follow the the BibTeX entry linked to the publication:
```bibtex
incoming
```
## STag PDFs
Stags are prepared in PDFs batches of ~150 stripes. You can find them [here](https://drive.google.com/drive/folders/1jic85gclymiV9014zc3tuUgIBq8lTyZr?usp=sharing).
They are made to be print as stickers. The code to generate them can be found ![here](https://github.com/ibois-epfl/TSlam/tree/main/stag_util).
## Disclaimer
>This software is provided "as-is" as a prototype, without any warranties, express or implied, including but not limited to fitness for a particular purpose or non-infringement. The user assumes full responsibility for the use of the software, and we are not liable for any damages, losses, or misuse arising from its use. By using this software, you agree to these terms.
2 changes: 1 addition & 1 deletion paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ bibliography: paper.bib

# Summary

test 51
test 52
<!-- this is a sort of abstract. (MAX 50 words) -->
<!-- ![Test image captation.](01_fig_placeholder.png){ width=20% } -->

Expand Down

0 comments on commit 8f4ec70

Please sign in to comment.