Replies: 5 comments 8 replies
-
Is there a reason to expect Bonsai on linux to have better timing characteristics than on Windows? I'm trying to get feedback latency down as low as possible and wondering if switching to linux might be helpful. |
Beta Was this translation helpful? Give feedback.
-
Amazing work on Bonsai 2.8🥳 Can’t wait to run it on the Raspberry! Do you have a recommended way to install OpenCV for RPi? (I assume it’s slightly different from Ubuntu - or would you run Ubuntu instead of RPi OS?) |
Beta Was this translation helpful? Give feedback.
-
Updated - Building and installing OpenCV from source on Ubuntu 22.04When trying to build OpenCV from source on Ubuntu 22.04, you may encounter some errors during the build process. I was able to successfully build and utilize OpenCV version 2.4.1 for Bonsai-Rx on Ubuntu 22.04 using the following updated steps. Add old libjasper repository to package list:
Install compiler dependencies:
OpenCV requires python 2, which no longer ships natively with Ubuntu. To install python 2 and numpy, you can run the following commands:
You then need to install the pip package manager for python 2, as well as the numpy library for python 2 using the following commands:
You can install libdc with the following command:
You can now clone the opencv repo:
And prepare to install using:
This time, when running the make command, specify the paths to the python2 executable, include directory, and libraries. Specifying the c++ standard is also required:
Finally, run to make the install script and install the OpenCV library:
For bonsai to access the OpenCV libraries, you can create an empty file to dynamically link the OpenCV library at the global system level:
and add the following line to this file:
Finally, run this command in the terminal to update:
|
Beta Was this translation helpful? Give feedback.
-
This is a great start for Linux support, but I would appreciate a dedicated page that is versioned and goes beyond Debian. I suggest we include guides for Fedora and Arch. I would love to have nix support, but understand that it is well beyond the scope of the project. Can we make this possible @glopesdev? Opinion |
Beta Was this translation helpful? Give feedback.
-
Since my laptop is a mac, and I have been working with documentation using docfx on mac, i decided for fun to try running bonsai with mono (V2.8.5, v2.9.0-preview1) on Mac and unfortunately it doesn't work because it looks for Nuget.Config in the wrong place:
--→ I found it instead in No real reason to fix it since I don't know who would use it outside of my very specific workcase haha and I am sure other stuff will break down the road, just wanted to put this somewhere in case anyone was wondering and as a followup to the last time this question was posted on the google groups discussion https://groups.google.com/g/bonsai-users/c/5E6KQPzvsRs. Haven't tried VMs. |
Beta Was this translation helpful? Give feedback.
-
Installing Bonsai on Linux
mono Bonsai.exe
.There is a common warning message related to libcanberra-gtk that can be removed by installing the relevant package:
Install OpenGL
Several Bonsai packages require OpenGL 4.0+ for interfacing with graphics. Below are some suggested instructions for a vanilla Ubuntu distribution. They may have to be tweaked for your particular system:
The
glxinfo
command should return version 4.0 or greater for full compatibility with the shaders package.Install OpenAL
The audio capture requires OpenAL as a dependency for interfacing with the microphone drivers.
Configure access to serial port
Occasionally the access to serial port on devices such as an Arduino might be blocked by your system. If this is the case, you can often use
screen
to configure access to the serial port:Install OpenCV from pre-built binaries
Bonsai requires the C interface exposed by OpenCV 2.4 to drive its image processing primitives. OpenCV.NET provides pre-built binaries for a few ubuntu architectures on its latest release 3.4.2.
Add the earlier release repositories for libjasper
Download and install pre-built binaries
The OpenCV project does not provide binary distributions for 2.4 for the latest versions of Ubuntu. These distributions are unofficial builds so you will have to download the .deb packages and install them locally.
Build OpenCV from source
You can also build OpenCV from source for your system. The below guide is adapted from the official build instructions.
Add the earlier release repositories for libjasper
Install compiler dependencies
Build and install OpenCV 2.4
Make sure to build the 2.4 branch, or download the tarball from GitHub.
For example to clone the 2.4 branch:
Example build configuration using cmake:
Build using make:
Configure environment
OpenCV installs libraries into
usr/local/lib
, so you may need to configure your environment using one of these options to share libraries at a system level.Beta Was this translation helpful? Give feedback.
All reactions