![]() |
Simple Custom Video Dashboard 30+ FPS
2 Attachment(s)
I've made a dashboard in C# that uses the stock camera code. I get 30 FPS with their newest code.
I've attached the executable and source code. Requirements .NET 4.0 Framework How To Use Set the drop down list to Tcp as that is currently the only supported format. Set the text box with "Robot IP Goes Here" to your robot's IP. Notes It will take about three seconds to show video. |
Re: Simple Custom Video Dashboard 30+ FPS
Thank you very much, that code was very useful, but just a few questions, first, why would you use XAML and not a regular windows form, second what is the reason for 2 classes, you can just put the content of Reciever in TcpListener and just use the thread within TcpListener itself.
I hope you dont mind if I use your code in my own program with many modifications ;), I willll be sure to release it with credit :D. |
Re: Simple Custom Video Dashboard 30+ FPS
I'm using Wpf which requires Xaml. Wpf is supposed to be hardware accelerated by direct 2D.
I split up the recievers because I also had a Udp receiver and I still may add that. |
Re: Simple Custom Video Dashboard 30+ FPS
Thanks for the reply, I dont think you want to add a UDP reciever because UDP is prohibited during matches, the block the network (UDP network), or atleast I heard so. They use UDP to switch Autonomous from OperatorControl and so they dont want any UDP traffic other than their own.
|
Re: Simple Custom Video Dashboard 30+ FPS
I know I made a UDP video server and the GDC said it was illegal.
|
Re: Simple Custom Video Dashboard 30+ FPS
Quote:
|
Re: Simple Custom Video Dashboard 30+ FPS
Can you please post a Ubuntu-Mono friendly version?
|
Re: Simple Custom Video Dashboard 30+ FPS
why it is using .Net 4? I like to try to make my programs use .net 2 for greatest compatibility. You can use 3.0 for WPF
|
Re: Simple Custom Video Dashboard 30+ FPS
Quote:
Great program! Works really well for the COMETS! |
Re: Simple Custom Video Dashboard 30+ FPS
deleted
|
Re: Simple Custom Video Dashboard 30+ FPS
Quote:
|
Re: Simple Custom Video Dashboard 30+ FPS
He is probably using Visual Studio 2010 like me, its default configuration is to make .NET 4.0 applications, but there is an option during the Project Wizard on which .NET to use, as low as 2.0 or 1.0 I believe, but I forget :D.
|
Re: Simple Custom Video Dashboard 30+ FPS
can you please post a version that is compatible with mono?
|
Re: Simple Custom Video Dashboard 30+ FPS
Quote:
|
Re: Simple Custom Video Dashboard 30+ FPS
2 Attachment(s)
I've commented the code. I'm just slightly confused as to why you want to run it on Ubuntu especially since we all got tiny little 2Go computers with XP.
|
Re: Simple Custom Video Dashboard 30+ FPS
Quote:
|
Re: Simple Custom Video Dashboard 30+ FPS
Thanks a lot. I choose to use Ubuntu because I do not want to have programs I make today compatible with computers that run in 40 years, m$ probably will not survive if Linux really takes off.
|
Re: Simple Custom Video Dashboard 30+ FPS
Quote:
|
Re: Simple Custom Video Dashboard 30+ FPS
Quote:
That was my first concern, making sure the 2010 Breakway Dashboard runs in year 2050 under Linux version 35.6. What? |
Re: Simple Custom Video Dashboard 30+ FPS
Quote:
|
Re: Simple Custom Video Dashboard 30+ FPS
I am not trying to dump on microsoft, it is an unintended side effect. I would like to try to port this code to an open framework, such as GTK/Gstreamer. VLC would possibly be a good candidate for this too. If anyone can help me with porting this, can you please contact me? I dont mean to sound rude by saying those last few posts, but I do not use windows and dislike it b/c it crashes very often when i use it (my laptop crashed when i opened google with IE).
|
Re: Simple Custom Video Dashboard 30+ FPS
This dashboard is written in C# and uses both the .NET framework and the WPF, all Windows technologies. Porting it wouldn't be far from rewriting it completely. If you'd like to write your own video dashboard, contact me or TheDominis and we'd be happy to explain how the video system works.
|
Re: Simple Custom Video Dashboard 30+ FPS
For my team, this seemed to cennect unreiable. The fps was below 5, and you had to resart it several times for the video feed to come. Do you have to turn off firewalls, or do something special? We are running this off a computer connected via usb to ethernet adapter. to a windoes XP professional machine.
|
Re: Simple Custom Video Dashboard 30+ FPS
thats about the bandwidth of USB, sorry, but you guys are SOL
|
Re: Simple Custom Video Dashboard 30+ FPS
I ported (different front end) this to .net 2, and integrated it with our ZomB Dashboard, which you can download here: http://www.chiefdelphi.com/forums/sh...d.php?p=931845
It gets the same as the original, but easier for non WPF users (like Ubuntu users) to use. |
Re: Simple Custom Video Dashboard 30+ FPS
Quote:
|
Re: Simple Custom Video Dashboard 30+ FPS
Quote:
As far as I can tell I get around 5 FPS as well, with the stock dashboard OR his dashboard. That makes me believe that the framerate you see on your dashboard is also affected by the framerate the crio is processing. I wonder why that is if it's the case - couldn't we decouple the two and have new pictures sent to the dashboard as quickly as possible while doing the image processing in a parallel loop? I'm going to post the question for the NI guys because I don't see any obvious reasons it wouldn't work. |
Re: Simple Custom Video Dashboard 30+ FPS
Quote:
I'm developing my own video display (using C++ instead of a .NET language) with some hardware acceleration (Direct3D 9). I'll let you know if there's any speed increase. |
Re: Simple Custom Video Dashboard 30+ FPS
I use my dashboard on the classmate and get 30+ FPS...
|
Re: Simple Custom Video Dashboard 30+ FPS
Can you please make it wine-compatible?
|
Re: Simple Custom Video Dashboard 30+ FPS
Sure...
It'll take me about 30 minutes or less... or maybe longer... not much though |
Re: Simple Custom Video Dashboard 30+ FPS
thanks
|
Re: Simple Custom Video Dashboard 30+ FPS
Quote:
http://www.chiefdelphi.com/forums/sh...ad.php?t=82612 EDIT: Mono migration tool says one error, but it is easily fixed, I'll post a mono-friendly version in about 3 minutes. void Receiver_OnImageUpdate () Image Image.FromStream (Stream, bool, bool) useEmbeddedColorManagement and validateImageData aren't supported. EDIT2: posted at above url |
Re: Simple Custom Video Dashboard 30+ FPS
1 Attachment(s)
I have ported the video dashboard to 2.0 .NET as well as made it (most likely) Wine friendly. I also made the program more robust -- probably.
Please report any issues. |
Re: Simple Custom Video Dashboard 30+ FPS
I read with some surprise the following thread:
http://www.chiefdelphi.com/forums/sh...ad.php?t=84087 I'll ask here: for the developers and users of this video dashboard, what networking setup are you using between the classmate and the machine displaying the video? Is it known to work under a real FMS? |
Re: Simple Custom Video Dashboard 30+ FPS
Quote:
|
Re: Simple Custom Video Dashboard 30+ FPS
How you get the screen on the "Driver" Account?
I opened it on the "Developer" account, and I got 5fps.... |
Re: Simple Custom Video Dashboard 30+ FPS
Quote:
|
Re: Simple Custom Video Dashboard 30+ FPS
Quote:
EDIT: Also how tough would it be to implement command line parameters for robot IP, and starting size and location of the window? I am looking at calling this from a Labview dashboard and while we could position it and enter the IP every time that seems a bit cumbersome. I would try it myself if I knew C#... |
Re: Simple Custom Video Dashboard 30+ FPS
1 Attachment(s)
Quote:
Just create a file called smash-ip.txt in the start up directory and the first line will be the IP. |
Re: Simple Custom Video Dashboard 30+ FPS
Quote:
And how can I get it running on the Driver account? |
Re: Simple Custom Video Dashboard 30+ FPS
Quote:
All I can report is that I get 30+ FPS on our team's classmate. Perhaps you can change power saving options so that they are on performance. |
Re: Simple Custom Video Dashboard 30+ FPS
What settings are you running on the crio? 320x240? Any compression?
Thank your for making this, the LV dashboard kills the poor classmate cpu. |
Re: Simple Custom Video Dashboard 30+ FPS
For those getting mysteriously low frame rates one thing to check is the camera configuration. The Axis camera's video server has an option to limit the frame rate, and there may be (or have been) software floating around that reconfigures it without your direct intent..
Connect the camera directly to a computer that's configured with a 192.168.0.X IP address, and open the camera IP (192.168.0.90) in a web browser. Go to the video configuration page and see if the frame rate limiting is set. This happened to us. When we first tried the camera, running direct to a web browser, it was real-time video fast. Later in the build season, running through the cRIO/classmate/video dashboard we were stuck at 2 FPS no matter what we did. Looking at the config page, guess what we found? We have no idea how it got that way. |
Re: Simple Custom Video Dashboard 30+ FPS
I use only the following code :
Code:
AxisCamera &camera = AxisCamera::GetInstance(); |
Re: Simple Custom Video Dashboard 30+ FPS
The default camera compression when the camera is reset is definitely not zero. I've seen a number of threads saying to set compression to zero or saying it is best to set compression to zero. As with any advice, verify a before and after. I definitely do not see best performance with compression at zero.
As for the LV dashboard killing the Classmate CPU. You have access to the source, and in fact there are a few things that drastically lower the CPU usage. The simplest change is to click on the image display and in Visible Items, hide the Image Information element. There is another thing you can do, but it was really the combination of these two things that was causing lots of excessive drawing. I'll write up more on this once I have a chance to test it on an actual classmate. Greg McKaskle |
Re: Simple Custom Video Dashboard 30+ FPS
Quote:
|
Re: Simple Custom Video Dashboard 30+ FPS
I'm referring to the default of the Axis camera, not the default of the WPI code. The default LV compression was five this year in order to minimize noise in the image, but this does affect loop rate at medium and large image sizes.
Greg McKaskle |
| All times are GMT -5. The time now is 21:26. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi