Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Customizable Dashboard (http://www.chiefdelphi.com/forums/showthread.php?t=80561)

byteit101 07-03-2010 08:08

Re: Customizable Dashboard
 
When I run it, the mouse flickers, CPU usage goes up to nearly 100%, and it is a bit slow (it claims the frame rate is 3-9FPS)
what data do you send from the robot side?
GetDashbaordDataPacker()->AddI32(55)?

is there a way to not have full screen dashboard? the set resolution fails

slavik262 07-03-2010 10:21

Re: Customizable Dashboard
 
Quote:

Originally Posted by byteit101 (Post 932587)
When I run it, the mouse flickers, CPU usage goes up to nearly 100%, and it is a bit slow (it claims the frame rate is 3-9FPS)
what data do you send from the robot side?
GetDashbaordDataPacker()->AddI32(55)?

is there a way to not have full screen dashboard? the set resolution fails

Are you running it on the Classmate? I haven't tested it yet on the Classmate - and the combination of a lack of discrete graphics hardware and slow processor might cause that low of FPS. If you'd read the planned updates, I'm going to release a configuration utility that lets you specify what renderer you want to use. It's possible the software renderer might help you. Also, if you had the window minimized our out of focus and bring it back up, the FPS will shoot down for just a few seconds. This isn't because the FPS actually decreased, but because the program sleeps to conserve processor usage when it's not the selected window and the FPS counter averages FPS over the last few seconds. Therefore, when you bring the window back up, it averages the 0 FPS it had while sleeping with whatever the current FPS which causes the drop.

What we're doing is using a separate laptop to run the dashboard and connecting it to the Classmate using a USB to Ethernet adapter. It works quite well, and you have the added benefit of not just a faster computer, but a larger screen so your drivers don't have to view the dashboard in Squint-O-Vision. On a fairly standard laptop that our team bought for programming, we got 90 fps on average.

The CPU is pegged not because of a problem, but because the dashboard runs as fast as possible. I can have it sleep in the render loop if it's that huge of an issue, but it shouldn't be. Remember that this isn't an event-based system, but a real-time render loop. If you're worried about running other programs while you're designing the dashboard, don't worry as the dashboard sleeps and uses almost no processor when its window isn't selected.

Could you please explain what you mean by "The set resolution fails?" In the edit menu, you can set the resolution to whatever you want. While at first I was going to limit options to the possible resolutions of the computer the dashboard is running on, I decided to let the user set it to whatever they wanted in case they wanted to design a dashboard on one computer and run it on a different one. When you run the dashboard, it checks if the computer supports the desired resolution, and if it doesn't, returns to edit mode after displaying an error message.

On the robot side, you use the high-priority packer to pack the dashboard with floats (as I stated in my previous post).

TheDominis 07-03-2010 11:50

Re: Customizable Dashboard
 
I ran this on my MacBook (w/ Win7) and my FPS was ~130 until I added controls when it dropped to ~80 at 5 controls and ~60 at 13 controls. When displaying properties with 13 controls the FPS is ~60 +/- ~10.

I tried to resize from 1280x800 to 800x600, but the resolution did not change; however, it did remove some components.

byteit101 07-03-2010 17:00

Re: Customizable Dashboard
 
Quote:

Originally Posted by slavik262 (Post 932635)
Are you running it on the Classmate?

no, my desktop w/ 2GB Memory, 2GHz Intel Processor, and XP. I ran it, with no controls, in design mode, for about 1 minute, and that was the (approximate) average FPS.

Quote:

Originally Posted by slavik262 (Post 932635)
Could you please explain what you mean by "The set resolution fails?"

Quote:

Originally Posted by slavik262 (Post 932635)
When you run the dashboard, it checks if the computer supports the desired resolution, and if it doesn't, returns to edit mode after displaying an error message.

It's displaying this message for all but the native (1440x900) and 800x600 It's also resizing all the windows to 800x600 when in that mode

slavik262 07-03-2010 17:29

Re: Customizable Dashboard
 
I'm not sure what's going on with the fullscreen mode. I'll take a look at the code as soon as I get home.

Byteit - I have no idea what could be causing FPS to drop so low. Could you give me more details as to what you were doing when it happened?

A note on FPS - the entire system is texture-based (since this it runs on a graphics engine after all). The arrows on the Numeric Up/Down controls are textures, the text in the controls are textures, etc. I sped up performance by making each of the labels in the Properties windows solid textures, but that's sill a lot of texture changes (I ran some diagnostics and I think there's like 90 textures in the properties window). Now for those of you who know anything about graphics processing, switching textures, meshes, and shaders is expensive for the graphics card. So having the properties window open will cause the FPS to drop.

Also, adding controls not only adds the need to draw the controls themselves, but the data source boxes, etc. Just know that display-mode performance will be much higher than your edit performance - even by a factor of 2 or 3 according to initial tests.

While I obviously want designer mode to run fast, I care much less about optimizing the designer mode than the display mode, since during a match you'll be looking at the display, not editing it. :p

bronxbomber92 07-03-2010 19:16

Re: Customizable Dashboard
 
You should be able to get a performance boost by switching to power-of-two textures. Also, I'm not very familiar with Irrlicht, but you should make sure the quads are not being drawn in immediate-mode, and instead thrown into VBOs (or at the very least, vanilla vertex arrays).

slavik262 07-03-2010 19:45

Re: Customizable Dashboard
 
Quote:

Originally Posted by bronxbomber92 (Post 933071)
You should be able to get a performance boost by switching to power-of-two textures. Also, I'm not very familiar with Irrlicht, but you should make sure the quads are not being drawn in immediate-mode, and instead thrown into VBOs (or at the very least, vanilla vertex arrays).

I'm already using power of two textures for almost everything :)
As for VBOs, I'm using their built-in 2-D rendering mode, which is in the process of being switched over to VBOs (I think in the next update). The video system, which I'm working on right now, will use VBOs. :D

Robototes2412 07-03-2010 19:51

Re: Customizable Dashboard
 
Can I have the source code so I can attempt to port it to Linux?

slavik262 07-03-2010 20:50

Re: Customizable Dashboard
 
I'll have a source release in a day or two after I comment it a little bit.

Robototes2412 07-03-2010 21:08

Re: Customizable Dashboard
 
ok, thanks

slavik262 07-03-2010 22:40

Re: Customizable Dashboard
 
I found some more bugs (they'll be fixed by the time you read this).
  • Changing stuff around in the Packet Data area didn't register as a change - as such these changes wouldn't be saved when you ran the dashboard.
  • Upon loading a dashboard file, names would get some bonus characters because I forgot the null terminator. :o
  • Deleting a control with data in the packet would not remove the control's data rectangle, causing the program to crash if you clicked on it.

I'm looking into the issues with different resolutions now. Also, for planned updates, I also plan on highlighting the data rectangle of selected controls in some way.

byteit101 08-03-2010 15:55

Re: Customizable Dashboard
 
Quote:

Originally Posted by slavik262 (Post 932954)
Byteit - I have no idea what could be causing FPS to drop so low. Could you give me more details as to what you were doing when it happened?

running it!
no controls, just running the exe, and looking at the FPS!

slavik262 09-03-2010 07:27

Re: Customizable Dashboard
 
Quote:

Originally Posted by byteit101 (Post 933768)
running it!
no controls, just running the exe, and looking at the FPS!

I'll keep an eye out for whatever could be causing this. Is anyone else experiencing that low of FPS?

slavik262 10-03-2010 07:32

Re: Customizable Dashboard
 
I'm working on the video control next, which will also come out as a stand-alone program (like TheDominis's C# one). I had a few issues with the networking, but thanks to TheDominis, things should be smoothed out now.

My team is playing at the Wisconsin regional this weekend and I'll just be working on the dashboard all competition, so expect some further progress by Sunday.

jhersh 15-03-2010 14:25

Re: Customizable Dashboard
 
Quote:

Originally Posted by slavik262 (Post 933156)
I'll have a source release in a day or two after I comment it a little bit.

You should definitely request a project on firstforge.wpi.edu for this. It would be a great place for everyone to look for file releases, source code, report bugs, etc. Way easier that using a forum for all of that.

-Joe


All times are GMT -5. The time now is 21:23.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi