View unanswered posts | View active topics It is currently Thu Jul 24, 2014 12:23 am






Reply to topic  [ 14 posts ] 
FTC Autonomous robot collision 
Author Message
Rookie

Joined: Fri Nov 29, 2013 12:12 pm
Posts: 14
Post FTC Autonomous robot collision
Hi,

I have a question about the autonomous period. I programmed my robot to swiftly get the block in the IR bin and get on to the ramp, but I am having trouble when I think about my team's alliance's robot. I probably don't have to worry about the opposing alliance because the will probably not get in the way of my robot. I obviously would not want the robots to bump into each other during autonomous, but it seems incredibly difficult to judge what the other team's robot will do. I have no idea who my alliance team will be until the day of the competition, so I will have no idea what their robot will do. I think I have to create multiple programs and use one of them based on what the other robot will do. However, there are so many variations and possibilities that their robot will do, so it seems impossible to code for every possibility. I don't know where they will place their robot, can their robot get the block into the bin, will they put the block into the lower goal, will their robot only get on to the bridge, from which side will their robot get on to the bridge, how long will their robot take to do these things, or will their robot just do nothing( I got that one covered :-) ). What should I do?


Fri Nov 29, 2013 1:19 pm
Profile
Professor
User avatar

Joined: Sat May 18, 2013 1:24 pm
Posts: 272
Location: Olympia, WA
Post Re: FTC Autonomous robot collision
One way to think about it is to make a strategy that will work as long as the other person does what you do. (Other than the obvious 15 second delay.) If you ran the same program as your alliance partner, would there be a conflict? (Game theory. :) )

_________________
FTC Team 6424, the 'Oly Cow - Chief programmer.
FRC Team 4450, Olympia Robotics Federation (ORF).

and also quadrotors. Quadrotors!


Fri Nov 29, 2013 1:33 pm
Profile
Rookie

Joined: Fri Nov 29, 2013 12:12 pm
Posts: 14
Post Re: FTC Autonomous robot collision
As long as one of the robots starts 3-4 seconds before the other robot there would be no conflict. But how does this help? I can't just hope the other person does the exact same thing that I do.


Fri Nov 29, 2013 1:41 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: FTC Autonomous robot collision
Our team has coded five different strategies. Each strategy has an optional delay. We talked to our alliance partner before the match to figure out what they will do so we can pick our strategy to be not in conflict with them. Depending on what strategy we picked, we have an elaborate menu system that will prompt for different parameters for each of the strategies. Because of the tree level menu system, we can code very complex strategy without going into millions of combinations.


Fri Nov 29, 2013 4:36 pm
Profile
Rookie

Joined: Fri Nov 29, 2013 12:12 pm
Posts: 14
Post Re: FTC Autonomous robot collision
What menu system do you mean?


Fri Nov 29, 2013 6:14 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: FTC Autonomous robot collision
The menu system is one of our library modules. It displays a "choice menu" on the LCD display. The user can then press the "left" and "right" buttons on the NXT to scroll the selection up and down. Then the user can press the orange button to "select" the option in the menu. Depending on the option choice, the main code may decide to pop up another choice menu. Once the user has made choices on different menus, they become the parameters to our autonomous strategy.


Fri Nov 29, 2013 8:52 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: FTC Autonomous robot collision
For example, one of the strategy choices is "IR scoring". If you pick that option, you will then be prompted with the delay menu which asks you the initial delay time that ranges from None to 8 seconds. Then it will prompt you with a menu if the robot will be started on the left side or the right side of the field. Then it prompts you the menu about whether it will park on the ramp after scoring the IR block. Finally, it will prompt you the option of parking the robot at the peak of the ramp to make sure we are completely on it or park at the slope so to allow the alliance partner to park on the other side at the same time. So after the user picked all the choices on various menus, we can call the IRScoring function like this:
Code:
void DoIRScore(SM &sm, long delay, int side, int park_option)

With the 3 parameters, the one function can behave appropriately according to the need of the alliance partner. So you don't have to program "millions of combinations".


Sat Nov 30, 2013 3:21 am
Profile
Rookie

Joined: Fri Nov 29, 2013 12:12 pm
Posts: 14
Post Re: FTC Autonomous robot collision
OMG That makes so much sense! Thank you so much! But one last thing haha. You said that one of your strategies is to score in the IR beacon. When would you not want to score in the IR beacon? You get an extra 20 points and there is definitely a way to do it no matter what the other robot happens to do. I can think of some reasons like not letting the opposing robots on the opposing alliance do something, but it doesn't really help more than the 20 points from the IR.


Sun Dec 01, 2013 11:22 am
Profile
Rookie

Joined: Fri Nov 29, 2013 12:12 pm
Posts: 14
Post Re: FTC Autonomous robot collision
Also, I have never been to an FTC competition, or even any FIRST competition before. When are you allowed to choose which program to use, and when are you allowed to toggle with the choices using the nxt?


Sun Dec 01, 2013 11:24 am
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: FTC Autonomous robot collision
kkpanu9 wrote:
OMG That makes so much sense! Thank you so much! But one last thing haha. You said that one of your strategies is to score in the IR beacon. When would you not want to score in the IR beacon? You get an extra 20 points and there is definitely a way to do it no matter what the other robot happens to do. I can think of some reasons like not letting the opposing robots on the opposing alliance do something, but it doesn't really help more than the 20 points from the IR.

There are a lot of reasons why you may not choose IR scoring. For example, if your alliance partner insists they will do IR scoring and they are not flexible enough to get out of your way so they are blocking you from doing IR scoring or you don't have enough time to do IR scoring for both you and your alliance so someone has to do something else and we are capable of doing something else. More importantly, during competition, a lot of unexpected things may happen including some subsystems malfunctioning which may cause scoring IR to fail. But if we have some other strategies, we rather score something else than sitting there doing nothing.


Sun Dec 01, 2013 2:55 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: FTC Autonomous robot collision
kkpanu9 wrote:
Also, I have never been to an FTC competition, or even any FIRST competition before. When are you allowed to choose which program to use, and when are you allowed to toggle with the choices using the nxt?

When you are setting up the robot on the field, you are told to "run" your autonomous program. The standard autonomous template is:
Code:
task main()
{
  initializeRobot();

  waitForStart(); // Wait for the beginning of autonomous phase.

  ///////////////////////////////////////////////////////////
  ///////////////////////////////////////////////////////////
  ////                                                   ////
  ////    Add your robot specific autonomous code here.  ////
  ////                                                   ////
  ///////////////////////////////////////////////////////////
  ///////////////////////////////////////////////////////////

  while (true)
  {}
}

So initializeRobot() will be run before competition starts. That's when we display our menu of choices for picking strategies and paraemters.


Sun Dec 01, 2013 3:00 pm
Profile
Rookie

Joined: Fri Nov 29, 2013 12:12 pm
Posts: 14
Post Re: FTC Autonomous robot collision
OK. Thanks so much!


Sun Dec 01, 2013 10:03 pm
Profile
Rookie

Joined: Wed Dec 04, 2013 9:04 pm
Posts: 2
Post Re: FTC Autonomous robot collision
Can you give an example of a simple autonomous task .

We are new to FTC and RobotC programming, so a simple task of pushing blocks by locating the IR beacon would be win for us.

Any ideas how to do it?

Thanks,
Raj


Wed Dec 04, 2013 10:11 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: FTC Autonomous robot collision
I posted a simple autonomous example in this thread.
viewtopic.php?f=52&t=7386&p=27579#p27579
Regarding on using the IR seeker to score the block, it is a little bit more involved and it also depends on the design of your robot. For example, some teams designed their robot using mecanum wheels so it will drive sideway parallel to the pendulum. Some teams mount their IR seeker on the side. So when the robot goes forward, it runs parallel to the pendulum but once it found the right basket, it has to turn to face the basket to score. Some teams may simply put their scoring mechanism on the side instead of the front. So the implementation could be very different depending on your robot design.


Thu Dec 05, 2013 7:10 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 14 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.