OCCRA
Go to Post To put it simply: An adult coach impacts a team for two minutes. An adult mentor impacts a team for a lifetime. - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-10-2017, 09:33 AM
Californiacoach Californiacoach is offline
Registered User
no team
 
Join Date: Jun 2017
Location: California
Posts: 10
Californiacoach is on a distinguished road
Programming Questions????

Is there a simple way to put a value on the FRC Driver Station to show that a limit switch is being pressed? Also, what is the easiest way to program and run vision with Java? We were looking to process vision on the RoboRio, unless there is another way to run it without an external cell phone or processing unit. Currently, we have a Microsoft Life Cam that we were planning on using, but we have a pixy camera on our robot that is just acting as a camera. Does anyone have any experience with an easy vision program and is there a program out there that might help us?
Reply With Quote
  #2   Spotlight this post!  
Unread 10-10-2017, 09:37 AM
noah.gleason's Avatar
noah.gleason noah.gleason is offline
Registered User
FRC #0449 (The Blair Robot Project)
Team Role: Programmer
 
Join Date: Mar 2017
Rookie Year: 2016
Location: Bethesda, MD
Posts: 53
noah.gleason is a glorious beacon of lightnoah.gleason is a glorious beacon of lightnoah.gleason is a glorious beacon of lightnoah.gleason is a glorious beacon of lightnoah.gleason is a glorious beacon of light
Re: Programming Questions????

Is the limit switch attached to a Talon or the RIO? You'll want to use SmartDashboard to display the values but where the switch is attached determines how you get the value. For vision, you should check out GRIP.
__________________


Last edited by noah.gleason : 10-10-2017 at 09:42 AM.
Reply With Quote
  #3   Spotlight this post!  
Unread 10-10-2017, 09:39 AM
Californiacoach Californiacoach is offline
Registered User
no team
 
Join Date: Jun 2017
Location: California
Posts: 10
Californiacoach is on a distinguished road
Re: Programming Questions????

Quote:
Originally Posted by noah.gleason View Post
Is the limit switch attached to a Talon or the RIO?
It is just connected to the RoboRio.
Reply With Quote
  #4   Spotlight this post!  
Unread 10-10-2017, 09:42 AM
noah.gleason's Avatar
noah.gleason noah.gleason is offline
Registered User
FRC #0449 (The Blair Robot Project)
Team Role: Programmer
 
Join Date: Mar 2017
Rookie Year: 2016
Location: Bethesda, MD
Posts: 53
noah.gleason is a glorious beacon of lightnoah.gleason is a glorious beacon of lightnoah.gleason is a glorious beacon of lightnoah.gleason is a glorious beacon of lightnoah.gleason is a glorious beacon of light
Re: Programming Questions????

Quote:
Originally Posted by Californiacoach View Post
It is just connected to the RoboRio.
In that case, take a look at this: https://wpilib.screenstepslive.com/s...ntrol-behavior
__________________

Reply With Quote
  #5   Spotlight this post!  
Unread 10-10-2017, 09:46 AM
Californiacoach Californiacoach is offline
Registered User
no team
 
Join Date: Jun 2017
Location: California
Posts: 10
Californiacoach is on a distinguished road
Re: Programming Questions????

Quote:
Originally Posted by noah.gleason View Post
Thank you, is there a way to program a Smart Driver Station so we can see if the limit switch values are pressed or not?
Reply With Quote
  #6   Spotlight this post!  
Unread 10-10-2017, 09:50 AM
noah.gleason's Avatar
noah.gleason noah.gleason is offline
Registered User
FRC #0449 (The Blair Robot Project)
Team Role: Programmer
 
Join Date: Mar 2017
Rookie Year: 2016
Location: Bethesda, MD
Posts: 53
noah.gleason is a glorious beacon of lightnoah.gleason is a glorious beacon of lightnoah.gleason is a glorious beacon of lightnoah.gleason is a glorious beacon of lightnoah.gleason is a glorious beacon of light
Re: Programming Questions????

Quote:
Originally Posted by Californiacoach View Post
Thank you, is there a way to program a Smart Driver Station so we can see if the limit switch values are pressed or not?
Code:
public void teleopPeriodic(){
    SmartDashboard.putBoolean("Limit Switch",limitSwitch.get());
    //Rest of your teleopPeriodic goes here
}
This assumes you instantiate a DigitalInput called limitSwitch, as shown in the ScreenSteps.
__________________

Reply With Quote
  #7   Spotlight this post!  
Unread 10-10-2017, 09:53 AM
Californiacoach Californiacoach is offline
Registered User
no team
 
Join Date: Jun 2017
Location: California
Posts: 10
Californiacoach is on a distinguished road
Re: Programming Questions????

Quote:
Originally Posted by noah.gleason View Post
Code:
public void teleopPeriodic(){
    SmartDashboard.putBoolean("Limit Switch",limitSwitch.get());
    //Rest of your teleopPeriodic goes here
}
This assumes you instantiate a DigitalInput called limitSwitch, as shown in the ScreenSteps.
Ok, that makes sense. Thanks
Reply With Quote
  #8   Spotlight this post!  
Unread 10-10-2017, 01:48 PM
firstrobotcoach firstrobotcoach is offline
Registered User
no team
 
Join Date: Jun 2017
Location: Sacramento
Posts: 19
firstrobotcoach is an unknown quantity at this point
Re: Programming Questions????

Quote:
Originally Posted by Californiacoach View Post
Is there a simple way to put a value on the FRC Driver Station to show that a limit switch is being pressed? Also, what is the easiest way to program and run vision with Java? We were looking to process vision on the RoboRio, unless there is another way to run it without an external cell phone or processing unit. Currently, we have a Microsoft Life Cam that we were planning on using, but we have a pixy camera on our robot that is just acting as a camera. Does anyone have any experience with an easy vision program and is there a program out there that might help us?
The processing speed is really slow for vision processing by using the Rio without any external processor. I would love to hear from teams who have successfully run vision on the Rio and their opinion on the matter though. I have heard of teams who have made a "copy and paste" vision program, but personally I have never played around with them.
Reply With Quote
  #9   Spotlight this post!  
Unread 10-10-2017, 02:24 PM
microbuns's Avatar
microbuns microbuns is offline
Software + Drive Coach
AKA: Sam Maier
FRC #4917 (Sir Lancerbot)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Elmira, ON
Posts: 146
microbuns is an unknown quantity at this point
Re: Programming Questions????

Quote:
Originally Posted by firstrobotcoach View Post
The processing speed is really slow for vision processing by using the Rio without any external processor. I would love to hear from teams who have successfully run vision on the Rio and their opinion on the matter though. I have heard of teams who have made a "copy and paste" vision program, but personally I have never played around with them.
You can't run extremely high resolution/FPS on the Rio, but you can run high enough to be very competitive. Our team did it with GRIP in 2016, and if I recall correctly, 2056 did onboard processing with a LifeCam in 2017, and they were extremely good.
Reply With Quote
  #10   Spotlight this post!  
Unread 10-10-2017, 02:49 PM
Californiacoach Californiacoach is offline
Registered User
no team
 
Join Date: Jun 2017
Location: California
Posts: 10
Californiacoach is on a distinguished road
Re: Programming Questions????

Quote:
Originally Posted by microbuns View Post
You can't run extremely high resolution/FPS on the Rio, but you can run high enough to be very competitive. Our team did it with GRIP in 2016, and if I recall correctly, 2056 did onboard processing with a LifeCam in 2017, and they were extremely good.
Ok, do you know of a simple way to implement vision into code?
Reply With Quote
  #11   Spotlight this post!  
Unread 10-10-2017, 03:01 PM
Brian Selle's Avatar
Brian Selle Brian Selle is offline
Software/Mechanical Mentor
FRC #3310 (Black Hawk Robotics)
Team Role: Engineer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Texas
Posts: 192
Brian Selle is a splendid one to beholdBrian Selle is a splendid one to beholdBrian Selle is a splendid one to beholdBrian Selle is a splendid one to beholdBrian Selle is a splendid one to beholdBrian Selle is a splendid one to beholdBrian Selle is a splendid one to behold
Re: Programming Questions????

Quote:
Originally Posted by Californiacoach View Post
Ok, do you know of a simple way to implement vision into code?
I would consider using GRIP. Once you have defined a pipeline to process the camera images and identify the target(s), there is an option to output the code in Java or C++. A good starting place is here.
__________________
http://www.team3310.com/
Reply With Quote
  #12   Spotlight this post!  
Unread 10-10-2017, 04:16 PM
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics Club)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 768
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Programming Questions????

Quote:
Originally Posted by Californiacoach View Post
Is there a simple way to put a value on the FRC Driver Station to show that a limit switch is being pressed? Also, what is the easiest way to program and run vision with Java? We were looking to process vision on the RoboRio, unless there is another way to run it without an external cell phone or processing unit. Currently, we have a Microsoft Life Cam that we were planning on using, but we have a pixy camera on our robot that is just acting as a camera. Does anyone have any experience with an easy vision program and is there a program out there that might help us?
Our last season's code can be found here. It has vision code using Pixy camera. It also has GRIP vision code although we decided to use Pixy, so the code is there but not in-use.
__________________
Reply With Quote
  #13   Spotlight this post!  
Unread 10-10-2017, 05:04 PM
gerthworm's Avatar
gerthworm gerthworm is offline
Making the 1's and 0's
FRC #1736 (Robot Casserole)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Peoria, IL
Posts: 191
gerthworm is a glorious beacon of lightgerthworm is a glorious beacon of lightgerthworm is a glorious beacon of lightgerthworm is a glorious beacon of lightgerthworm is a glorious beacon of lightgerthworm is a glorious beacon of light
Re: Programming Questions????

If for some reason smartDashboard fails you, and alternate suggestion (in java) is System.out.println() after every switch read.

It usually requires changing the print level of the driver station to print everything, instead of just warnings and errors (little gear above the console).

Would not recommend this for actual competition, as it easily hides errors and warnings, and takes up bandwidth. But it's a quick-n-dirty solution.

smartDashboard is definitely the better option.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 01:50 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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