The little robot that could

So on the VEXCast in the past I have talked about how to build a 2 motor robot that could qualify in HS through skills. This is the global skills rankings to be clear, it would be even easier to qualify through some regions skills competitions. I decided to attempt the robot, gave myself a couple movies to watch and expected an all nighter. Took roughly 5 hours to construct and because I was in a hurry I used 4 motors. So I call it “the little robot that could”. Capable of 320 programming skills. Averaging roughly 1.5 bps and driving perfectly straight across the field to line up.

Videos and code to be included in later posts.

Edit: This robot was very heavily inspired by 8059 's skills robot.

4 Likes

So this robot didn’t see a field until the competition so I had to practice loading with a handful of balls and no net.

Also the robot kept internal track of balls shot and counted out loud to the loader so he could focus on loading.

1 Like

Because this robot was designed as a demonstration, I’m open to any and all questions. I will also give additional pictures of the close up mechanisms if asked.

1 Like

When you will post the code for the little robot that could? Just want to see if you have any fancy little tricks you use when you program.

I’d really like to see the shooting mechanism closer up in pictures. Please post :slight_smile:

1 Like

1 Like
#pragma config(Sensor, dgtl1,  ball_present,   sensorTouch)
#pragma config(Sensor, dgtl2,  puncher_ready,  sensorTouch)
#pragma config(Sensor, dgtl3,  backButton,     sensorTouch)
#pragma config(Sensor, dgtl4,  frontButton,    sensorTouch)
#pragma config(Motor,  port1,           front,         tmotorVex393HighSpeed_HBridge, openLoop, reversed, driveLeft)
#pragma config(Motor,  port8,           kicker,        tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port9,           puncher,       tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor,  port10,          back,          tmotorVex393_HBridge, openLoop, reversed, driveRight)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#pragma platform(VEX)

//Competition Control and Duration Settings
#pragma competitionControl(Competition)
#pragma autonomousDuration(20)
#pragma userControlDuration(120)

#include "Vex_Competition_Includes.c"


#define ball SensorValue[ball_present]
#define ready SensorValue[puncher_ready]
bool puncherOn = true;
int balls_shot=0;

void inspirational_speaking(){
	string buffer;
	if(balls_shot<=16)
		sprintf(buffer,"%i.wav",balls_shot);
	else
		sprintf(buffer,"%i.wav",32-balls_shot);
	clearSounds();
	playSoundFile(buffer);
}


bool current_ball=false;
bool last_ball=false;
bool new_ball=false;
int current_time=0;
int smallest_time=10000;
task punchControl(){

	while(true){
		current_time=time1[T1];
		last_ball=current_ball;
		current_ball=SensorValue[ball_present];
		if(current_ball && !new_ball){//gets ball
			new_ball = true;
			clearTimer(T1);
			if(current_time < smallest_time)
				smallest_time = current_time;
		}
		if(!current_ball && last_ball && new_ball && current_time>100){//loses ball
			new_ball = false;
			balls_shot++;
			inspirational_speaking();
		}

			if(!ready){
			motor[puncher]=127;
			motor[kicker]=127;
			}else if(new_ball && current_time>200 && puncherOn && current_ball){
			motor[puncher]=127;
			motor[kicker]=127;
			} else{
			motor[puncher]=15;
			motor[kicker]=15;
		}
		wait1Msec(20);
	}
}



task auton(){
	while(balls_shot<32){
		motor[front]=motor[back]=20;
		wait1Msec(20);
	}
	playSoundFile("Done.wav");
	puncherOn=false;
	balls_shot=0;
	clearTimer(T1);
	while(!SensorValue[frontButton]||!SensorValue[backButton]){
		motor[front]=motor[back]=-127;
		if(time1[T1]>7000)
			break;
		wait1Msec(20);
	}
	puncherOn= true;
	while(balls_shot<32){
		motor[front]=motor[back]=-20;
		wait1Msec(20);
	}
	playSoundFile("Done.wav");
}

void pre_auton()
{
  // Set bStopTasksBetweenModes to false if you want to keep user created tasks running between
  // Autonomous and Tele-Op modes. You will need to manage all user created tasks if set to false.
  bStopTasksBetweenModes = true;

	// All activities that occur before the competition starts
	// Example: clearing encoders, setting servo positions, ...
}

task autonomous()
{
 	startTask(punchControl);
	startTask(auton);
	while(true){
		wait1Msec(50);
	}
}

/////////////////////////////////////////////////////////////////////////////////////////
//
//                                 User Control Task
//
// This task is used to control your robot during the user control phase of a VEX Competition.
// You must modify the code to add your own robot specific commands here.
//
/////////////////////////////////////////////////////////////////////////////////////////

task usercontrol()
{
	startTask(punchControl);
	startTask(auton);
	while(true){
		wait1Msec(50);
	}
}

1 Like

Are those black #32 rubber bands? How many did you use? How far did you pull back.
I’ve been playing with a puncher just to demonstrate the concept to the team, but getting the bands and pull back length correct is tricky for me. Maybe it has a lot to do with build quality?

So in the end I used 1 size 64 rubber band on each side. This should be similar ish to 2 size 32 on each side. The build quality is pretty important for making the slide have low friction but in all honesty it isnt that difficult. I would suggest ignoring everything like gearing it and just set up the structure and pull back manually and see where the ball goes. I had a few instances of shooting the puncher before I put a stop on the front while doing this. (Still apologizing for hitting my girlfriend in the face with the puncher when it went flying.)

1 Like

How did you mount the rack gear over the screws for the linear slider trucks? Did you have to notch the bottom of the rack gears? Or did you use spacers to raise it over?

So I used only 1 truck and had the screws go up the bottom of the truck into the rack gear.

1 Like

Oh, that makes sense, I did not realize you could clear a 6-32 screw head upside down inside the linear slider channels.

So did this ever actually compete? Did GOAT use it at HZR?

Also, glad to see that you made another talking robot. Always finding useful applications for the VEX speaker :slight_smile:

Ya GOAT competed with it at a recent competition. 1 robot on the field and 4 motors. Only ever did like 271. The robot could do 320 but loading fast and accurate is hard. A few of our runs a ball would miss on the close side, bounce off the net knocking over a stack into our path for driving across the field. This then made it not line up correctly on the other end. Life happens sorta stuff. Anyone who was there would agree that it could have done 320 perfect given a few more runs.

1 Like

5 hours, 271 points => 1 scored point per 1.10701107 minutes of the build time.

That sets the bar pretty high!

2 Likes

The other funny stat I have been saying was the robot could score 80 points per motor. Which means discobots would need to score 12*80 or 960 points to get on my level.

2 Likes

Can Confirm, if given a couple more chances, 4 motor “Little robot that could” could certainly have scored 320.

1 Like

So it’s the Little Robot that Could have scored 320, but that Didn’t. :slight_smile:

I’m just kidding. No that’s actually really impressive and does support an interesting point about how easy it was to score high in skills this year with a dedicated skills robot. Yet such a robot would not be very good for a match. Then you have hybrid robots and others that are good at both but require a lot more work.

It seems in past years the robots that were good at skills were also the best in a match. Is this perhaps the first year that this was not the case, or am I generalizing?

That’s not exactly true actually.

Every season, there will be specialised skills robots.

Eg. Last year, one of my teams had a robot that couldn’t move but parked right at the starting tile. But it was good enough to build 7 skyrise sections and 1 cube.
Good enough to make it to world with that. But it will be thrashed at world.

This year, obviously we had a team that built a specialised skills robot too. But with a bit of modifications and addition (which they did), think they will do pretty well for World :slight_smile:

1 Like