Our Drive Function

Many teams have a drive function like this:

// tank_drive.c

void tank_drive() {
  motor[DriveL] = joystick.joy1y1;
  motor[DriveR] = joystick.joy1y2;
}

And that drive function is good because it only takes up two lines of code, but it’s bad because it’s difficult to use.  It assigns the y-value of the left joystick to the left drive motor and the right drive motor to the y-value of the right joystick.  This makes turning very confusing.

The first priority in writing a drive function should always be make it convenient for the driver.  This is a drive function that we recommend:

// arcade_drive.c

void arcade_drive() {
  motor[DriveR] = joystick.joy1y1 - joystick.joy1x1;
  motor[DriveL] = joystick.joy1y1 + joystick.joy1x1;
}

This is an arcade drive function where the joystick makes the robot behave like a joystick in a video game.  If you push forward on the joystick, the robot goes forward; push the joystick down and to the left, the robot rotates to the left while moving backwards.

This method works very well for us, but even it can be improved. The Logitec controllers employed by FTC do not always center at (0, 0). Sometimes they’ll give some minute value like (2, -1). Although setting your drive motors to that much is unlikely to move your robot, it will try and move you motors to no avail. That’s bad because it puts stress on you motors, which can lead to smoking. Here’s our solution:

// arcade_drive.c

int J1Y1() { return joystick.joy1_y1; }
int J1X1() { return joystick.joy1_x1; }

void abs_tank_drive() {
  int y_pow = J1Y1();
  int x_pow = J1X1();

  if (abs(J1Y1()) < 10) {
    y_pow = 0;
  }

  if (abs(J1X1()) < 10) {
    x_pow = 0;
  }

  motor[DriveR] = y_pow - x_pow;
  motor[DriveL] = y_pow + x_pow;
}

This will be easiest for you drivers and easiest on your motors.

Here’s a video showing the function at work (ignore the trumpeting in the background):

Talking with Finding Blue Moose 5468

We recently contacted Finding Blue Moose FTC team 5468 in regards to how to run team meetings.  Here is what they said:

Hi Fletcher!
It’s great to hear from you. We’re happy to help you out in any way we can. Our team is a little bit different in that we are not affiliated with our high school and run our meetings out of team members basements, garages, and kitchens. (This results in many all nighter style meetings.) Making “To-Do” lists is pretty helpful. Having a list of chores/deadlines is something that usually helps us. We are procrastinators, so having some sort of set deadline can give us the motivation we need to get stuff done. Also, try and make as much progress as you can outside of meetings. (For example, if someone is struggling with programming, their homework is to look up as many videos and tutorials as they can before the next meeting. This will help you keep moving forward!) About how much time do you have a day to spend meeting? How did you rank in San Diego and what sorts of changes do you hope to make before the next event? Have you qualified for World before?
Something that has helped us during competitions is making sure to decorate our pit area as much as we can. It’s impossible to have too much team spirit! This season, because we have so many rookies, we also did a practice run of our judges interview. Some of the veteran members asked our newbies some sample questions we have had in the past to give them a feel for what the judges room would be like. Maybe doing some sort of prep like that can help your team.
Let me know if we can assist with anything else. I could talk about FTC all day!
Thanks,
Chase
Finding Blue Moose
5468
After answering their questions, they followed up with this:
Hi Fletcher,
Glad I could help! I talked with some of my other team mates and we came up with a few more tips for you:
Some things that we have seen teams do before is make a handout about your robot. At the Vermont Championship last weekend, there was a team that passed around pamphlets in the pit area that included notes and information on their design. It was a neat idea. This made it much easier for scouts during the alliance selections.
One thing that our team tried doing at our first two competitions was setting up a Help Station. (This will probably be easy to implement, seeing as your team is hosting.) We had a table set up with basic parts and supplies and a sign out sheet to keep track of it all. (We borrowed this idea from our friends Team 5454 “dent in the Universe.”) We received good feed back from it. Doing something like this can show the Judges your Gracious Professionalism!
Color coordinating your table is a great idea and your interactive video software sounds awesome! Balloons are also a pretty good way to fill up your pit space. Our team also made some backboards highlighting our team members, robot design, and community outreach. You may have seen this on our Facebook page, but we also have a wooden moose that we painted blue and set up in the pit area. We had other teams autograph it throughout the course of the day, which was pretty fun. I’m not sure if there is something simplier than that, that your team could try. But it’s a thought! We also cut our team number out of cardboard so we could hold it up during our matches. That’s a pretty quick and easy way to show spirit.
I didn’t realize this initially, but I have watched some of the videos on the Suit Bots website. Your weighted ring detection system is very cool. Best of luck this weekend.
Let us know if there is anything else we can do,
Chase
Finding Blue Moose
5468

2.25.13- Starting off the week with some safety and CAD

Attendance


  • Hunter
  • Evan
  • Fletcher

Journal


Tasks

  • De-lube tracks
  • Install fenders
  • Start the CAD adventure

Reflections

Evan, Hunter, and Fletcher went to Evan’s house today to work on installing some protective devices for the treads,

We designed this because of the problem of other robots snapping our tracks during a match and thus immobilizing is for the match. This happened way to many times at the San Diego regional championship. Also we saw some of the other teams using a lot of CAD in their notebook, notably team 4112 The Warriors from Rock Academy, who won the inspire award at the regional. This lead us to believe that we should give it a shot, so Hunter is in the process of converting all the drawings and physical aspects of the robot itself.

NXT mountBucketarm

This was a short meeting, in our week-long journey till the LA regional.

These are what the finished fenders look like.

WP_20130226_003 WP_20130226_005

We also slightly elevated the front compartment of our hand to give a better setup for putting rings on the goals.  The ring in this picture that is slightly higher is the one towards the front of the robot.

WP_20130226_004

Finally, we added a metal piece to secure the USB into the Samantha module because we have had trouble with the USB popping out of it again.  We also put the power switch on the front panel of the robot so it is in a more convenient location to turn the robot on and off.

2.19.13-Getting Ready for San Diego Regionals

Attendance


  • Mark
  • Fletcher
  • Evan
  • Dante

Journal


Tasks

  •  Go over everything we have to do
  • Finish up unfinished posts in notebook
  • Add receipts and business page to notebook

Reflections

We did a lot of planning and reviewing for absolutely everything we have to finish before Saturday.  We went over what was done from the earlier checklist on the twelfth and we have done just about everything.

  • All of the new pages are in the notebook including the business plan, receipts, and code.
  • The TeleOP and autonomous codes are finished with.
  • The display is finished and the fliers are designed and sent out to grade schools
  • We have made a sheet to overview the awards and highlight what we have done for each one

All we have left now is to reprint the notebook, put in all of the dividers, put in the arrow markers in the notebook pointing to highlights for each award, finish adjusting the drawer sliders on the robot, and get all of our consent forms to Mr. Porter.

Mark also worked on the notebook and now everything is up to date and we created spreadsheets for all of our costs and expenses and put it into the notebook.

 

2.14.13-Notebooking and the Field

Attendance


  •  Mark
  • Hunter
  • Evan
  • Fletcher

Journal


Tasks

  • Work on Journal
  • Put field together
  • Driver Practice

Reflections

Today was a day to do some work but also put the field back together so it was functional for the LA FTC Regionals.  This involved scraping off the hot glue on all of the black linings on the walls and fixing the parts of the goals that were broken and putting everything together.

Mark was working on the notebook the entire time because there was a lot of work that needed to be done.  He added a lot to the Our Robot page as well as updated a few of the posts that needed to be updated.  Dealing with the field took everyone else’s time so the notebook was the main and only point of progress today.