Linux + ARM + KINECT + C# + MonoDevelop, is that possible? - c#

I am developing a project that involves creating a product composed of hardware and software that enables interaction with various features.
I'm still in the testing phase , however , is sent to the brain of this product is a mini computer ODROID U3 , running Xubunto 13.10.
In addition to other components , I want the system refer to the use of the Kinect , or any other similar , however , for the test phase only own a Kinect.
I'm more accustomed to the language C # ( . NET ) , I used in windows environment with Visual Studio and did some games in Unity3D . The MonoDevelop looks very interesting alternative for Linux , and I'm currently testing it.
Well, as you may have noticed, I 'm new at this , and I have not much knowledge in Linux , MonoDevelop as well as Kinect , and I'm having some doubts .
I'm already trying to put the Kinect running on Linux for two days and the results are not very encouraging , installed libfreenect , nite , OpenNI and sensorKinect , but so far , the closest I got was to run one or two samples , not all work . Maybe I'm not doing things correctly ...
So loved your help , opinion or tip the following:
What is the best way to install and recognize the Kinect on Linux ?
Is it possible to run applications on computers Kinect ARM architecture ?
It is possible to develop applications for Kinect on Linux , with c# ?
Is it possible to do this with MonoDevelop ? If yes, how to install or use the wrapper for this purpose?
Does Microsoft user therms allow us to use Kinect on a different operating system, and sell a product with it?
Any help is welcome, and I want to thank the community already;)
Greetings.

This may be a late reply but better late than never.
What is the best way to install and recognize the Kinect on Linux?
If you have a choice please opt for libfreenect (aka OpenKinect). It access the sensors at much lower level. If you have to go with OpenNI you must install SensorKinect driver as well.
Is it possible to run applications on computers Kinect ARM architecture?
Yes. Both OpenNI+Sensor Kinect and libfreenect work just fine on ARM architectures.
It is possible to develop applications for Kinect on Linux , with c#?
Yes. Check Mono. However, I do not trust the C# performance on linux/android. I never did on Windows either. On such a complicated platform I'd recommend Python wrappers. OpenNI has a mono wrapper and libfreenect does not. I think wrapping libfreenect into a mono wrapper is not that difficult considering they did it for Matlab.
Is it possible to do this with MonoDevelop? If yes, how to install or use the wrapper for this purpose?
Yes. 1) install dependancies (libusb, opengl, freeglut). 2) Clone and build OpenNI from github. 3) Clone and build SensorKinect from github.
PS. In OpenNI and SensorKinect folder edit Platform/Linux/Build/Common/Platform.Arm and comment out the "-mfloat-abi=softfp" CFLAG. This is essential when you build on ARM architecture since the processor has an FPU and is using hard floating point.
Does Microsoft user therms allow us to use Kinect on a different operating system, and sell a product with it?
As far as I know the answer is "Yes" (at least for Kinect 1). The Kinect sensor is an open architecture founded by PrimeSense (Apple bought this company now). Asus and other manufacturers relased several verisons of the same sensor. They are all supported by OpenNI. As for libfreenect support, you should keep an eye on the git hub users.

Related

Cross platform UI module that plays nice with C# / Mono backend

EDIT 1 2017/01/29 - At the moment our choice has gone to electron in combination with EdgeJS and all the power of NodeJS and the packages/resources on npm there.. There is no better alternative for us to create cross platform apps for all three plyers (macOS, linux and windows). Thanks everyone for their input.
ORIGINAL Question:
TL;DR - Backend code written in C# (.Net/Mono). Writing a desktop application that needs low level access to the system (cross platform OSX, Linux, Windows 7 to 10). In search of a one-stop cross platform UI tool/framework that can interface with the status of the backend-code, either by polling/messaging or calling into the code of the backend code. This "backend" includes for example the scanning & listing of process info, taking screenshots, etc.. Sending network information (which websites were visited etc..) It's in essence an exam monitor for students when they're doing an online exam in classrooms.**
Options we are exploring:
electron (formerly known as atom shell) looks nice, but we have no idea whether it can interop/call into/kickstart a C#/Mono application. Posted this as well on their official forum for feedback, and whether it is a good use case for electron. In an ideal world, we'd like to use electron fully, but unfortunately I think we need platform specific logic (which now we handle in C# w/ .net & mono).
Eto.Forms is what we work with now, but is limiting in it's UI's capabilites - as sometimes it still renders differently (sizing of windows) on different platforms. It also has a different look & feel that's tied to the platform of the user - which is a good feature, but it makes it difficult to make dedicated controls to visualise status, which would be easier in html/css.
Another route, is a mix between Eto.Forms (or something else) to bootstrap a native UI that hosts a browser in it's window that cross platform and not dependent on the locally installed browsers, such as Awesomium. This would still require Eto.Forms, or any other bootstrapper to kickstart the application, but all other navigation would go through the Awesomium rendered html.
Thanks,
Yves
AvaloniaUI (A cross platform XAML Framework for .NET Framework, .NET Core and Mono) would be a perfect choice if you are familiar with WPF.
There are many other frameworks to develop cross-platform desktop apps. You can checkout my github repo electron-alternatives for more cross-platform desktop development options.
Xamarin Forms is my framework of choice. https://visualstudio.microsoft.com/xamarin/ It's made for mobile but was extended to include desktop as well.

Kinect Initialization error (Failed in native DLL. HRESULT=0x8004022b.)

I've been developing with kinect XBOX 360 for a while.
Today, after connecting a different kinect device (XBOX 360) i've started getting an error
on the initalization line:
kinect.Initialize(RuntimeOptions.UseSkeletalTracking | RuntimeOptions.UseDepthAndPlayerIndex | RuntimeOptions.UseColor);
The error I was getting:
Failed in native DLL. HRESULT=0x8004022b.
and the stack trace showed:
at Microsoft.Research.Kinect.Nui.SkeletonEngine..ctor(Runtime mainNui, CINuiInstanceHelper nuiInstance)
I've already tried :
Reinstalling all kinect related drivers and restarting.
Switching back to the old kinect sensor I was using.
Reinstalling the kinect sdk (the version i'm using is : Microsoft
Kinect 1.0 Beta2 SDK v.1.0.0.45
The following link - http://social.msdn.microsoft.com/Forums/en-US/kinectsdk/thread/5b9ffac3-86c0-4147-a6c7-f8e4bbc73c56 - talks about finding the registry key but I couldn't understand how to do it.
According to this link - http://msdn.microsoft.com/en-us/library/ms919477.aspx this is an error code:
VFW_E_SAMPLE_REJECTED This sample cannot be rendered. 0x8004022B 555
is there a way I could use it to solve the problem?
I'm running win7 64 bit.
Try using the Kinect for Windows SDK 1.5. It's been out for a couple of weeks now.
The API should mostly be the same as in 1.0 beta, but you will have to change the names of some namespaces when using them.
Also, you will still be able to use the Kinect for Xbox360 for development purposes, unless you want to use near mode for depth acquisition.
Like Chris Ortner said, you should switch to the full version as it is much more efficient. You can find it here. If you are fearing that you must convert all of your code, look here and here. If you are worried about converting code like getDisplayPosition, see Converting Kinect Methods from Beta 2, to Version 1. If you need any more help converting, just ask! Hope this helps!
I had this error. It was nothing to do with drivers or versions.
The Kinect sensor uses a lot of the USB bandwidth, so it is essential to have it on its own USB controller. Try the different USB ports until it works. You can use the Device Manager to see which devices are on which controllers: View > Devices by connection.
Thanks a lot for your help.
I prefer not to change to kinect for windows to timelines.
I was able to solve this issue thanks to this link which worked like a charm.
The steps to resolve this issue were:
1.Uninstall all kinect drivers from all the USB ports.
2.Uninstall the kinect sdk.
3.Reinstall the Kinect SDK.
4.Disabled network adapter.
5.Plug in the kinect sensor.
The idea is to reinstall all the drivers and prevent it from obtaining drivers from Windows Update.
I appreciate your help.
Thanks,
Oded

developing tool for building Android/Iphone app

I have .net c# background(don't mind to learn new language to get the things right). Right now i want to make some small applications for Iphone/Android phones.Basically, i will show some graphs with data retrieved through my webservice.
Can anyone tell me which developing tool should i use to create those small apps quickly?
I don't have any experience with Flash.And i just know that Flash builder 4.5 can convert Flash applications to Iphone/Android. However, i don't feel like that it is a native way to build Iphone/Android app
But if you advise that, i might go that way.
thank you
Xamarin has products that allows you to use C# (and your existing skills) for both iOS (iPhone / iPad) and Android devices : MonoTouch and Mono for Android.
disclaimer: I work for Xamarin
You might want to use frameworks that help build apps for multiple platforms with the need to know native programming languages. PhoneGap is one of these popular frameworks.
You can use C# to create a WCF service. There are a few different libraries to develop Android applications. If you want to work with C#, you can check out Mono for Android.
http://docs.xamarin.com/android
From my knowledge, however, Java is the preferred language to develop Android application. Eclipse has a great plugin which integrates with the Android SDK / Emulator.

How to write applications for different platforms? Linux, Mac, Windows and Mobile Platforms

We want to write a client for an online service which should be available on as many platforms as possible. This question is about what programming language and framework we should use to create this client.
These platforms are required: Linux, Mac, Windows, iOS (iPhone, iPod, iPad) and Android. The more the better.
For the mobile platforms there is Titanium Mobile. I haven't tried this thing yet, the website says you can develop for both iOS and Android using web skills such as Javascript. I don't know yet if you can deploy for both platforms using the SAME code. It would be great!
There is also Titanium Desktop but I don't like the idea that the complete source code is shared with the final application. Titanium does this for Mobile too but it isn't that easy to modify an app loaded via App Store.
So, what other way is there to create an application which runs on at least the three major desktop platforms? I thought c# with mono would be the way to go but I just realized that you need to use mono with MonoMac in order to publish it on the Mac App Store and use things like Growl. And since MonoMac is naturally only available for Macs, it's again not possible to deploy the mono app on all platforms without rewriting it for at least the Mac. And it would be nice if the app looks "native" on all platforms. Gtk# just does not look good on a Mac. It's "okay" on Windows and great on Linux.
I know we could use Objective-C for iOS and Mac, Java for Android, C#.net for Windows and C#.mono for Linux but the main point is that we don't want to write the same app in a lot of different languages. That would make development and maintenance really hard.
And we prefer languages with C-style syntax which are much easier to learn for us PHP web developers. Btw: We dislike Air and I'm not sure about Java since I never used it but it also does not look "native" and it feels kinda slow.
Edit:
Just a note: It wouldn't be a problem to create an own form for each platform if at least the remaining code is the same. Is it possible to use MonoMac, Gtk# and Win Forums in the same C# application? And I'd prefer C# over C++ as I have no skills in C++, so I first need to check how hard it is to write with Qt.
Another note: We don't plan to spend much money and because we need to pay Apples Developer Programs we want to use free or cheap technology. Preferable Open Source.
Just use C# for all of the above.
The mono project will cover Mac and Linux, with monodroid your android requirements are covered and monotouch will take care of iPod/iPad/iPhone.
In regards to UI - mono has full support for the System.Windows.Forms namespace, so you don't have to use GTK# if you don't want to.
I don't think I need to mention windows support ;)
If you really want to support all those platforms from a single application, your best bet will be to create a web application. With HTML5, such an application can even be cached on the device and used when no connection is available. Also, that strategy would make it feasible to customize the UI based on the device running the app.
You will not have good luck if you set out to build a single native app that runs on Android and iOS, let alone all the other platforms you mentioned. The reason that they're different platforms rather than the same is that they're, well, different. They have different capabilities, run on different hardware, are built with different languages, employ different application models with different user interfaces, and have audiences with different expectations.
The best solution I've come across over the years is Qt SDK.
Great support for all major platforms, Symbian, OS X, Linux flavors, Windows, Windows CE (mobile), Android and iOS partial support and etc.
Its base is C++ but bindings for almost every language (like C#) is available. Lots of help and support is also covered.
The core Qt libs are very fast and extensive, And the whole KDE desktop (of Linux) is done with it. Famous software like VLC and VirtualBox are done in Qt.
Another relatively new way of doing cross-platform development is to use the open source Eto.Forms, which allows you to have one UI codebase target each platform's native toolkit. It is a UI abstraction layer that can target GTK#, MonoMac/OSX, WinForms, and WPF.
There is also an iOS port in the works.
Java sounds like the best fit. It is cross-platform, easy to understand, has a huge userbase and android is based on it.
Depending if you need an offline interaction mode, it sounds like you should develop a web application. You can develop a mobile version and a desktop version and thus support all the of the above platforms. Look at youtube's application for Iphone, it retains the same functionality as the the iphone app but is purely html. Furthermore, html5 capable browsers could also have the ability to run offline.
Crazy as it sounds, check out Flash/Flex - it is cross platform, code once, run everywhere ,now compiles down to native code on e.g. Android and iOS and the 10.1 player is shipping all over. I had to solve exactly this problem and when Flash Builder Burrito catered for mobile after working with it for a while I have switching from C#/Flash hybrid to Flash only for clients. (Our backend is C#/Node/C++, etc).
Depending on your timelines and needs it is something look into.
Some random links to peruse:
Blog post about performance and video to single app multi device
Developing flash and flex applications

develop C#/.NET on Android devices

I want to run C# programs on my HTC Magic, I can find the mono app on the Android market but I have no clue on how to run C# using.
The code is just for fun, I don't want official support and such. After coding Visual Basic on windows mobile, I really want to code C# on Android, whether directly using some sort of editor if exists, or compiling it on a PC then installing it on Android.
If anyone knows a way to do such please let me know.
Thank you
There's the androidmono project, which I gather pretty much works but is in relatively early stages.
EDIT: More recently: Mono for Android
As I originally answered this over two years ago...
These days I would look at Mono for Android, developed by the Mono team.
It's a commercial product, but yes, you can then sell your app on the Android Marketplace (aka Google Play store).
Xamarin supports C# coding for both Android and iPhone, and is based on Mono. For more details, check out:
http://xamarin.com/
You may want to have a look at dot42 at https://www.dot42.com/ I've never tried it myself, tough looking at various articles, it seems that this may be a valid option.

Categories

Resources