Skip to content
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 CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ option(package_debian "Build a Debian package" ON)

set(KIPR_VERSION_MAJOR 1)
set(KIPR_VERSION_MINOR 2)
set(KIPR_VERSION_PATCH 3)
set(KIPR_VERSION_PATCH 1)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down
49 changes: 6 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,37 +120,9 @@ Pass any of these to CMake with `-D`, for example `-Dwith_camera=OFF`.
| `DUMMY` | Use the dummy device backend, for building on a computer | `OFF` | |
| `wasm` | Build `kipr.wasm` for dynamic linking (Emscripten builds only) | `OFF` | |

## AI Camera
## Installation

libwallaby supports the KIPR AI camera, a Pi Zero that connects to the Wombat over USB networking.
When a camera is opened, libwallaby checks for the AI camera at `192.168.1.2` and uses it if it responds; otherwise it uses a regular USB camera.

Wombat images and `.deb` packages with the latest AI camera changes are published on the [Releases page](https://github.com/kipr/libwallaby/releases) (currently the `v1.2.5` pre-release).
To test newer changes, build a package as described in [Building](#wombat-aarch64).

### Installation

First, plug the Pi Zero into the Wombat, then SSH into the Wombat and create the necessary connection.

```sh
sudo nmcli connection add type ethernet con-name ai-camera-link ifname usb0 ipv4.addresses 192.168.1.1/24 ipv4.method manual ipv6.method auto ipv6.addresses "fe80::c3ed:d6c2:1e76:cebe/64" ipv6.routes "fe80::/64 :: 101"
```

The connection should come up pretty quickly (<30 sec).

You can verify the connection by `ssh`ing from the Wombat to the Pi Zero:

```sh
ssh kipr@192.168.1.2
```

We will be rebooting the Wombat later, so you may wish to power off the Pi Zero now to avoid potential disk corruption.

```sh
sudo poweroff
```

Now, install the new version of libwallaby.
To install a libwallaby `.deb` on a Wombat:

1. Copy the libwallaby `.deb` file to the Wombat:

Expand All @@ -170,20 +142,9 @@ Now, install the new version of libwallaby.
sudo reboot
```

### Using the AI camera

Objects found by the AI camera are reported through a camera channel, which you configure in BotUI under Settings → Channels.
Create the channel with the "QR Code Scanner" type. A future release will use a more appropriate name.

Read the results with the usual camera object functions:
A Wombat that has an AI camera pre-release (`v1.2.3` or `v1.2.5`) installed will see this package as a downgrade, so confirm the downgrade when `apt` asks.

- `get_object_centroid()` - centroid
- `get_object_bbox()` - bounding box
- `get_object_confidence()` - confidence
- `get_object_data()` - string from the model that names the object type
- `get_object_data_length()` - length of that string

### Debugging with systemd
## Debugging with systemd

`botui` on the Wombat runs as a systemd unit.
You can view a unit's logs by running:
Expand Down Expand Up @@ -221,3 +182,5 @@ libwallaby is licensed under the terms of the [GPLv3 License](LICENSE).
## Contributing

Want to contribute? Start here: https://github.com/kipr/KIPR-Development-Toolkit

AI camera support is developed on the [`ai-camera`](https://github.com/kipr/libwallaby/tree/ai-camera) branch.
2 changes: 1 addition & 1 deletion module/camera/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ if(with_camera)
swscale_wrapper
dl
)
endif()
endif()
14 changes: 5 additions & 9 deletions module/camera/dependencies/opencv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ExternalProject_Add(dep_opencv
URL https://github.com/opencv/opencv/archive/refs/tags/4.6.0.tar.gz
CMAKE_ARGS
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-DBUILD_SHARED_LIBS=ON
-DBUILD_SHARED_LIBS=OFF
-DWITH_FFMPEG=OFF
-DWITH_1394=OFF
-DWITH_GSTREAMER=OFF
Expand All @@ -26,14 +26,13 @@ ExternalProject_Add(dep_opencv
-DBUILD_PERF_TESTS=OFF
-DBUILD_EXAMPLES=OFF
-DBUILD_opencv_apps=OFF
-DBUILD_JPEG=ON
-DWITH_OPENEXR=OFF
-DWITH_JASPER=OFF
-DWITH_OPENJPEG=ON
-DWITH_OPENJPEG=OFF
-DWITH_WEBP=OFF
-DWITH_PNG=ON
-DWITH_JPEG=ON
-DWITH_TIFF=ON
-DWITH_PNG=OFF
-DWITH_JPEG=OFF
-DWITH_TIFF=OFF
-DCMAKE_INSTALL_PREFIX=${OPENCV_DIR}
-DOPENCV_GENERATE_PKGCONFIG=YES
-DBUILD_opencv_dnn=OFF
Expand Down Expand Up @@ -152,6 +151,3 @@ target_link_libraries(opencv_videoio_wrapper INTERFACE opencv opencv_videoio)
# opencv_imgcodecs
add_library(opencv_imgcodecs_wrapper INTERFACE)
target_link_libraries(opencv_imgcodecs_wrapper INTERFACE opencv opencv_imgcodecs)

# Install compiled opencv libs as required by AI Camera update
install(DIRECTORY ${OPENCV_LIB_DIR}/ TYPE LIB)
5 changes: 1 addition & 4 deletions module/camera/public/kipr/camera/camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,14 @@ enum Resolution
MED_RES,
HIGH_RES,
TELLO_RES,
AI_CAMERA_RES,
NATIVE_RES
};

enum Model
{
WHITE_2016,
BLACK_2017,
TELLO,
AI_CAMERA
TELLO
};

/**
Expand Down Expand Up @@ -126,7 +124,6 @@ int camera_open_black();
* - MED_RES (320x240)
* - HIGH_RES (640x480)
* - TELLO_RES (1280x720)
* - AI_CAMERS_RES (1280x720)
* \warning Only LOW_RES is currently supported. The function will fail for other resolutions.
* \return 1 on success, 0 on failure
* \see camera_open
Expand Down
22 changes: 0 additions & 22 deletions module/camera/src/KIPRnet.hpp

This file was deleted.

Loading
Loading