Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Tips for first-year programmers (http://www.chiefdelphi.com/forums/showthread.php?t=107896)

ctccromer 20-08-2012 12:05

Tips for first-year programmers
 
Hey there. I was on my school's robotics team last year, but we had a more experienced programmer so I was one of the many "help out where you can" guys. Well, he graduated, and now I'm the chief programmer for my team.

I do have a pretty good basis on how to set up and use coding
I don't have almost any experience with LabVU, but I know it comes with some tutorials

I'd appreciate any tips that would be helpful, whether it be a link to certain LabVU tutorials that actually relate to the robot, comments on how to program for robots specifically, or anything I may not know. Thanks!

plnyyanks 20-08-2012 12:20

Re: Tips for first-year programmers
 
http://www.frcmastery.com/ - LabVIEW examples in a FRC context

http://ni.com/frc - NI's FRC Portal

http://zone.ni.com - NI Developer Zone: help with general LV topics; is a great resource for anything LV

A Post with some other great resources

Learn LabVIEW in 3 hours

Also, all of LabVIEW's example VIs (go Help->Find Examples) are extremely useful, and there's a whole section for common FRC tasks, as well

DominickC 20-08-2012 12:21

Re: Tips for first-year programmers
 
It's easy to get overwhelmed. Don't get overwhelmed, just keep working at things a little bit at a time. (Oh, and don't forget to have fun!)

BigJ 20-08-2012 14:28

Re: Tips for first-year programmers
 
Comments and Documentation: Use them! You would never believe how fast you will forget how something works, especially when things are flying at you so fast. Other/future programmers will understand what you did and why you did it.

Become Intimately Familiar: The more you know how your system works and how it should work, the more help you can be in diagnosing problems down the road.

Stay Open Minded: There will be times when everyone but you says "it's gotta be the code". You'll be 100% sure it isn't the code. Everyone else has to be wrong. Listen to them and give their theories a shot. It's probably the code.

ctccromer 20-08-2012 14:36

Re: Tips for first-year programmers
 
thanks for the links ^^ i'll check those out tonight

Quote:

Originally Posted by DominickC (Post 1182278)
It's easy to get overwhelmed. Don't get overwhelmed, just keep working at things a little bit at a time. (Oh, and don't forget to have fun!)

Oh definitely! I'm startin early -- gonna code for last year's robot while I get used to it, that way once the coming season starts I won't be overwhelmed :)

Also, I forgot to mention: The last 2 years (our first 2), we've used Joysticks. However, being a huge gamer, I'm switching to the xbox360-like controller. So any tips on how this is different will help too!

Alan Anderson 20-08-2012 15:29

Re: Tips for first-year programmers
 
Quote:

Originally Posted by ctccromer (Post 1182315)
Also, I forgot to mention: The last 2 years (our first 2), we've used Joysticks. However, being a huge gamer, I'm switching to the xbox360-like controller.

Are you doing this as a driver who prefers a handheld controller to joysticks for driving a robot, or are you doing it as a programmer who's imposing his preference on the drivers? Give proper consideration to the people who actually have to use what you come up with.

Quote:

So any tips on how this is different will help too!
Gamepad thumbsticks don't give a driver nearly the same amount of fine control that you can get from joysticks. If you can account for that in software, great. Otherwise, make sure the drivers are happy with what they get.

A gamepad puts more buttons within immediate reach of an operator's fingers than a joystick does. Some people find that useful. Others find it confusing, and prefer the more spread-out button layout of one of the USB joysticks from the Kit of Parts.

On the other hand, sometimes the most intuitive and effective control scheme is neither a joystick nor a gamepad, but instead a custom array of buttons and/or switches and/or knobs.

Jon Stratis 20-08-2012 16:50

Re: Tips for first-year programmers
 
Anytime I see a thread list this, I can't help but think about a session I attended at Java one a few years ago by the "Diabolical Developer", in which he suggested we should teach programming by sitting someone down at a unix prompt, typing "man man", hitting enter, and then leaving the room!

My top, number 1 suggestion for you: Reprogram last year's robot this fall. Start from scratch, and don't reuse any code from last year. Once you can get it up and running again with all of your own code, you'll know you're ready to tackle the new robot on day 1 of the build season.

ctccromer 20-08-2012 18:23

Re: Tips for first-year programmers
 
Quote:

Originally Posted by Alan Anderson (Post 1182335)
Are you doing this as a driver who prefers a handheld controller to joysticks for driving a robot, or are you doing it as a programmer who's imposing his preference on the drivers? Give proper consideration to the people who actually have to use what you come up with.

I will be one of the 4 main drivers. The controller is much easier for me and I asked the other 3 guys if they care one way or the other and they didn't seem to have any opinion. I don't see how y'all can stand the giant joysticks!

Quote:

Originally Posted by Jon Stratis (Post 1182347)
My top number 1 suggestion for you: Reprogram last year's robot this fall. Start from scratch, and don't reuse any code from last year. Once you can get it up and running again with all of your own code, you'll know you're ready to tackle the new robot on day 1 of the build season.

DEFINITELY! My teacher and I already decided on this last year, and I'm about to put LabVIEW on my new laptop and start learning it later this week or next week, so I wanted to post here FIRST to go ahead and get in the right mindset and make sure there isn't anything I simply forget :)

ctccromer 20-08-2012 18:28

Re: Tips for first-year programmers
 
Okay so my first REAL question question (for those of you that have used controllers before):
I'm looking for a controller as identical to an xbox 360 controller as possible.
1) I think I remember someone telling me you can use a normal x360 controller if you install a driver for it. Is this true? If so I'll just buy a cable to make my wireless controller wired, download the driver, and things'll be super easy!
2) If not, then is the controller on the right in the picture what I need to get? Is there something better? Any idea where I could buy this?
http://techgage.com/reviews/logitech...m_07_thumb.jpg

Once again, HUGE thanks to everyone for all the help!

MAldridge 20-08-2012 20:35

Re: Tips for first-year programmers
 
you can use a normal xbox controller with windows, but it can't be wireless. you have to actually have a wired only controller, as just connecting a cable won't route the data to the PC, for a wireless controller, you need the windows gaming adapter. If memory serves, that type of wireless network is not permitted on the field.

Ekcrbe 20-08-2012 21:07

Re: Tips for first-year programmers
 
Quote:

Originally Posted by ctccromer (Post 1182369)
Okay so my first REAL question question (for those of you that have used controllers before):
I'm looking for a controller as identical to an xbox 360 controller as possible.
1) I think I remember someone telling me you can use a normal x360 controller if you install a driver for it. Is this true? If so I'll just buy a cable to make my wireless controller wired, download the driver, and things'll be super easy!
2) If not, then is the controller on the right in the picture what I need to get? Is there something better? Any idea where I could buy this?
http://techgage.com/reviews/logitech...m_07_thumb.jpg

Once again, HUGE thanks to everyone for all the help!

I don't have any experience running a drivetrain off a gamepad, or what is applicable to use, but I imagine the offset joysticks from the XBox 360 could make driving a little funky. Logitech sells the F310, which I think would work well for an FRC Driver Station if you love the 360 layout, with the aligned sticks.

P.S. We used a Dual Action gamepad for our manipulator control this year, and I really like it, but it doesn't have analog triggers.

F22Rapture 20-08-2012 21:46

Re: Tips for first-year programmers
 
Quote:

Originally Posted by Ekcrbe (Post 1182385)
I don't have any experience running a drivetrain off a gamepad, or what is applicable to use, but I imagine the offset joysticks from the XBox 360 could make driving a little funky. Logitech sells the F310, which I think would work well for an FRC Driver Station if you love the 360 layout, with the aligned sticks.

P.S. We used a Dual Action gamepad for our manipulator control this year, and I really like it, but it doesn't have analog triggers.

I would suggest not using tank drive, but rather using a split-thumbstick arcade mode (with one thumbstick being forward movement and a separate one for turning) or one thumbstick for turning and the triggers for throttle. Tank drive is difficult to drive straight in the best of circumstances, but the implicit inaccuracy of the thumbsticks compared to joysticks makes it even more difficult.

Also keep in mind that the Xbox controller has a large deadzone in the middle of the stick that needs to be accounted for, otherwise it won't center properly. The logitech controllers and joysticks don't seem to have that issue so much.

We haven't tried an Xbox controller yet, due to money issues and lack of a workable testbed robot, but I have the code complete for one. Keep in mind I haven't tested it yet.
https://github.com/FRCTeam3737/2012-...aptors/OI.java

Ekcrbe 20-08-2012 21:55

Re: Tips for first-year programmers
 
Quote:

Originally Posted by F22Rapture (Post 1182406)
I would suggest not using tank drive, but rather using a split-thumbstick arcade mode (with one thumbstick being forward movement and a separate one for turning) or one thumbstick for turning and the triggers for throttle. Tank drive is difficult to drive straight in the best of circumstances, but the implicit inaccuracy of the thumbsticks compared to joysticks makes it even more difficult.

Also keep in mind that the Xbox controller has a large deadzone in the middle of the stick that needs to be accounted for, otherwise it won't center properly. The logitech controllers and joysticks don't seem to have that issue so much.

If that works better, that's fine. We used tank drive, so that was the first thought I had. I find that if most of your time is spent using the left stick and buttons, the XBox setup works better, but swapping the left stick and d-pad is more intuitive when both thumbs are on the joysticks. Just personal preference.

ctccromer 22-08-2012 12:10

Re: Tips for first-year programmers
 
I finally put LabVIEW on my laptop yesterday and I'm currently looking around the forums to decide which controller I want to use. I'm an xbox guy, not a playstation guy, meaning I like the dpad and the left joystick switched -- it's much more comfortable! However I've read a lot of people say that the joysticks on xbox controllers don't center at 0. I don't know if it's a huge issue or an easy fix, and I don't know if there's other issues as well.
I already know it has to be a 100% wired controller and I have to download a driver for it, but that's no big deal
1) Are there any other issues with xbox controllers besides the centering issue? How do you fix this?
2) If this IS an issue large enough to mean that I shouldn't get an xbox controller, that leaves me between the Logitech F310 and F510. As far as I know, the only differences are that the F510 costs $10 more, has a 4th button in the middle, and can vibrate. Does the vibration ever come in handy that much? I could imagine it being useful for a wide variety of things, but I could also easily see us not using the feature at all.

BigJ 22-08-2012 13:20

Re: Tips for first-year programmers
 
Quote:

Originally Posted by ctccromer (Post 1182694)
I finally put LabVIEW on my laptop yesterday and I'm currently looking around the forums to decide which controller I want to use. I'm an xbox guy, not a playstation guy, meaning I like the dpad and the left joystick switched -- it's much more comfortable! However I've read a lot of people say that the joysticks on xbox controllers don't center at 0. I don't know if it's a huge issue or an easy fix, and I don't know if there's other issues as well.
I already know it has to be a 100% wired controller and I have to download a driver for it, but that's no big deal
1) Are there any other issues with xbox controllers besides the centering issue? How do you fix this?
2) If this IS an issue large enough to mean that I shouldn't get an xbox controller, that leaves me between the Logitech F310 and F510. As far as I know, the only differences are that the F510 costs $10 more, has a 4th button in the middle, and can vibrate. Does the vibration ever come in handy that much? I could imagine it being useful for a wide variety of things, but I could also easily see us not using the feature at all.

Programming different controllers should be relatively similar (except for button mapping differences), so I would work with the driver(s) to see what they want to use. They might even prefer joysticks to pad.


All times are GMT -5. The time now is 03:54.

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