Intel RealSense depth camera D435i

310 views
Skip to first unread message

Jorge Miguel Claro Cardoso

unread,
Oct 11, 2019, 8:23:10 AM10/11/19
to Bonsai Users
Dear all,

Is anyone using Intel RealSense depth camera model D435i with Bonsai?

What version of Bonsai and camera drivers are you using?

We are considering acquiring some of those and would really appreciate if you can share your feedback.







Best regards,

Jorge Cardoso

Gonçalo Lopes

unread,
Oct 31, 2019, 8:43:20 PM10/31/19
to Jorge Miguel Claro Cardoso, Bonsai Users
Hi Jorge,

I've heard some rumors that people got it to work, but you have to update to the relevant drivers, and I haven't got the chance to try them yet so I don't know (if anybody has figured it out, please post here).

Soon there are also plans to update the drivers on the Bonsai RealSense package, which are significantly outdated by now. A new .NET wrapper has been developed by Intel and should be on nuget soon, so we will be able to use that which should support all cameras.


--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bonsai-users/6a710158-3bb3-43f7-9b7d-f7c523109e97%40googlegroups.com.

chr...@protonmail.com

unread,
Nov 16, 2020, 11:25:48 PM11/16/20
to Bonsai Users
Hi Gonçalo,

Are there any news on the RealSense front? 

The official Realsense SDK now has C# wrappers and there is also a nuget Realsense Dll package, so it should in principle be straightforward. I'm just not very familiar with C#, so I'm struggling a bit to make it work.

I can compile the Dlls from the SDK C# wrappers, but I'm struggling to make Bonsai see them. I tried making custom c# nodes (very nice addition to bonsai!), and I have tried to reference the Realsense Dlls in various ways, but I can never see any Intel namespaces from the bonsai nodes. I'm not sure what I'm doing wrong.

Could you perhaps explain how to make code in Dlls available to a Bonsai node? Like, for example: How would I set up a custom C# source, that includes, for example, the Realsense Dlls hosted on nuget?

Thanks so much!

Best, Christian

Gonçalo Lopes

unread,
Dec 13, 2020, 7:39:26 AM12/13/20
to Christian Ebbesen, Bonsai Users
Hi Christian,

Apologies for side-tracking the conversation out of the forums. Thanks for giving a try to run the Intel.RealSense package, it looks like you were almost there. Did you uninstall the original RealSense package?

It looks like duplicate types might be the problem. I'll hopefully be going back soon to this package after the release of Bonsai 2.6.

Hope this helps.

On Wed, 18 Nov 2020 at 13:47, Christian Ebbesen <chr...@protonmail.com> wrote:
Hi Gonçalo,

Thanks so much for your reply! It sounds great that you will be working on this package, I would *definitely* use it! I'm doing experiments with my own 3D tracking system for mice, that I currently run in python, and I think it would be really fun to try to port it over to Bonsai (both for the speed and the nice concurrence management, and to easily share it with people): https://www.biorxiv.org/content/10.1101/2020.05.21.109629v1

I cloned the new realsense branch and tried to run it in Bonsai, but I still had a few issues. Maybe you can help me get going? Here's what I managed to do:

1. The Intel.RealSense version that you had used in March is gone from nuget, so I coudn't build the solution. The Dll on nuget has changed it's name to "Intel.RealSenseWithNativeDll". I changed a few lines in packages.config and Bonsai.RealSense.csproj to load the new Dll instead.changed intel version.PNG

2. This got rid of the missing assemblies, but the solution still wouldn't build because of a few errors, see here:
5 errors.PNG

3. Just to test the system, I commented out all the functions with the errors, so only one function (RealSenseDevice) remained, and I tried to make a super simple test source:
super simple source.PNG

4. This got rid of the errors, and I can build the solution. Bonsai launches: bonsai launches.PNG

5. But when I try to make a new project or load a saved one, Bonsai crashes with the error "An entry with the same key already exists" (I have attached the error log to this email):
then it crashes.PNG

Do you have any idea what the problem could be? If I can get VS to run the code, then I think I could slowly follow the c# wrapper examples in the realsense SDK to get the camera streams going and play around with porting my system from python to Bonsai.

In your realsense branch, it is building against bonsai.core 2.4 and net45, my bonsai is the most recent (bonsai 2.5.1 and net 452) -- is that a problem? Do I need to update the realsense package for this as well?

Thanks so much for your help!

Best, Christian

--
Christian L. Ebbesen, PhD

Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Tuesday, November 17, 2020 9:03 PM, Gonçalo Lopes <goncal...@gmail.com> wrote:

Hey Christian,

I've been slowly chipping at this from March, unfortunately didn't have time yet to clean-up the solution but I've pushed the current working state here:

Not all features are available but should give you a working depth stream using the Intel.Realsense package.

You do have to build it from source using that branch, but you can run it directly from visual studio. The cleanup and publishing will be on my todo list with high priority from January next year (in case I don't get time to do it before).

Hope this helps.

Søren HJ

unread,
Feb 24, 2021, 9:16:58 AM2/24/21
to Bonsai Users
Hi Gonçalo and Christian

I am also considering acquiring the D435 camera to track mice. Is the package for integrating realsense cameras working now? 

Best regards
Søren

Søren HJ

unread,
Mar 9, 2021, 2:22:36 AM3/9/21
to Bonsai Users
Hi again 

So I went ahead and bought the Intel Realsense D435 and have been trying to run it using bonsai - but I'm struggling to get it working.

I initially tried running it using the existing package from Package Manager. However, when I try to run it, it says that the index is missing with this error message:  "Error calling 'rs_get_device' with context:000002734D4DA440, index:0. out of range value for argument "index".  (See Image "ErrorMessageOriginalPackage"). I tried changing the index to 1 & 2 but the same thing happens.


I then tried to run the version on github using visual studio (after first uninstalling the existing realsense package) and I wa able to get the package working with realsense actions to select from but when running it - I get a different error message:    Attempted to run a program with a wrong format (Exception from HRESULT:0x800700B)  - (I translated the error message from danish).  (See image "ErrorMessageNewPackageVisualStudio"). 
 
Do you have any idea how to fix this?

Best regards
Søren  
ErrorMessageNewPackageVisualStudio.png
ErrorMessageOriginalPackage.png

Gonçalo Lopes

unread,
Apr 3, 2021, 9:58:57 AM4/3/21
to Søren HJ, Bonsai Users
Hi Søren,

I will likely be trying these cameras next week and will let you know of any updates.


Gonçalo Lopes

unread,
May 5, 2021, 6:59:33 AM5/5/21
to Søren HJ, Bonsai Users
I have uploaded a preview package for Bonsai - RealSense 0.3.0 on the package manager. You can try to install it by ticking "Include Prerelease" in the package manager.

It's still undergoing testing and changes so the interface is very likely to change, but maybe it can help in the meantime.

Søren HJ

unread,
May 7, 2021, 5:14:44 AM5/7/21
to Bonsai Users
Hi  Gonçalo

Thanks for the update and for your work on this! 

I tried installing the prerelease package, but was unfortunately unsuccessful - it gave an error message during the installation: "Could not load file or assembly 'realsense2.dll' or one of its dependencies. The module was expected to contain an assembly manifest." 

I tried to install it one more time which was successful, but no realsense modules show up in the toolbox. 

Any idea how to fix that? 

Best regards
Søren
RealSense_InstallationError.PNG

Gonçalo Lopes

unread,
May 16, 2021, 1:57:05 PM5/16/21
to Søren HJ, Bonsai Users
Hi Søren,

Thanks for giving it a try, there was an issue with the package generation. I have fixed it now, so please try to download and install the latest prerelease.

Reply all
Reply to author
Forward
0 new messages