FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Image Processing

I am a mentor for our team and i'm helping the software group work through shooting. I have a little bit of experience developing autonomous robots as well as image processing and obsticle detection.

I can see how the robot could be setup at one extreeme to be fully autonomous and use imaging processing to find and pickup balls, to navigate the obstacles and detect and shoot for goals.

I can also see simpler solutions using image processing to aim shooting and driving manually.

I can also see the simplist solution being a fully manual robot.

What I was wonding is if anyone can give a few pointers on what is more commonly done. This is the first time our team has been involved in this event so I would like to start them off with a simple solution which has opportunities to involve more complicated capabilities.

Thanks in advance!

0 Kudos
Message 1 of 14
(8,716 Views)

Hey Matthew,

The best teams usually have a mix of autonomous and manual features. Lots of teams we saw this year had automatic tracking and shooting mechanisms. Closed loop control on the drive train is also pretty common. Anything you can do better with a computer than with a controller is usually done autonomously.

Kevin Fort
Principal Software Engineer
NI
Message 2 of 14
(4,454 Views)

FRC games are often able be performed fully manually, even in autonomous mode. For example, this year, it was possible to line up the the robot in the key with the basket at a known distance, and then you could shoot at a known speed. No vision processing required. In 2010 and 2011, it wasn't necessary to use vision processing, but it was necessary to be able to drive straight and drive known distances. I don't know of any team that used vision processing for things other then detecting the vision target.

I would start by doing timed movements with the drive train, the teach the students PID and try to drive known distances. Then add in detecting a vision target, determine distance and bearing and drive to it. If you can get your team to do that, you'll be in the top 5% of FRC teams.

0 Kudos
Message 3 of 14
(4,454 Views)

Kevin,

First time in Autonomous Mode programming so just the basics. I programmed the code shown below and the relay will stay energized but the motor only runs for a few seconds than shuts down. I saw some other examples using while loops. Again just basically want the relay and motor to run continuously in autonomous mode.

Thanks,

Fred130316 HHS JAY Shooter Relay LSDI AutoInd.jpg

0 Kudos
Message 4 of 14
(4,454 Views)

Hey Fred,

By default motors and relays have a safety config enabled where if the motor is not being written at a certain rate they are turned off until they are written again.  You can either disable this behavior using the appropriate safety config VI (next to the set motor output on the palette)  or write to the motors continuously using a while loop.

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 5 of 14
(4,454 Views)

Kevin,

Thanks. did the disable safety config and it works fine. Will experiment with the while loop option in a few days.

Again Thanks for the help!!!

Fred

0 Kudos
Message 6 of 14
(4,454 Views)

What is the default behavior of motors and relays? from the above I understand the safety config is enabled but with what timeout value?

0 Kudos
Message 7 of 14
(4,454 Views)

The default timeout is 100 ms.

0 Kudos
Message 8 of 14
(4,454 Views)

Kevin,

Last reply disabled safety config and got it to work. Good. This time around I used a while loop (see screen shot below) and I want a 2 sec delay after the shooter motor turns on before I turn on the spike relay (loader motor). The problem appears to be my use of the time delay on because when I replace the time delay on with a true constant to the case structure the spike relay (loader motor) comes on.

SDHS FAS LSDI Delay AutoInd 130323.jpg

Thanks,

Fred

0 Kudos
Message 9 of 14
(4,454 Views)

Hi Fred,

The delay VI you used is for delaying signals (delaying the raising edge by the time parameter).

One possible solution for your problem is

delay.jpg

If you need the while loop (for enabling the safety config) then another solution can be easily suggested

0 Kudos
Message 10 of 14
(4,454 Views)