I've noticed that in some of your code for teleop when looking on the forums that you bind motor vaules from -100 to 100. What is the point of this? The Motors can't go over 100 power anyway?

_________________Thanks!

Fri Feb 06, 2015 10:42 am

MHTS

Guru

Joined: Sun Nov 15, 2009 5:46 amPosts: 1523

Re: Question for MHTS

akash329dsouza wrote:

I've noticed that in some of your code for teleop when looking on the forums that you bind motor vaules from -100 to 100. What is the point of this? The Motors can't go over 100 power anyway?

You are correct that even if you assign motor power beyond the 100 range, RobotC will cap it. However, in our library, we have a lot of logic that will calculate PID and other feedback using the current motor power. So if they are not kept track of correctly, it could affect the calculation. Besides, our library tries to not make this kind of assumptions. What if RobotC decided to not cap the motor value in the next release, our library will still work in that case.

Sat Feb 07, 2015 3:58 am

akash329dsouza

Novice

Joined: Tue Dec 16, 2014 10:25 amPosts: 81

Re: Question for MHTS

Another thing, we have been experimenting with the IR PID control but we notice it is always veering slightly left. Once it gets closer to the beacon it corrects it's self but it time out of time so it skews a bit left. Is there any way to fix this?

_________________Thanks!

Fri Feb 20, 2015 12:20 am

MHTS

Guru

Joined: Sun Nov 15, 2009 5:46 amPosts: 1523

Re: Question for MHTS

Would you show me your code? And what is your arrangement of the IR seeker(s)?

Another thing, we have been experimenting with the IR PID control but we notice it is always veering slightly left. Once it gets closer to the beacon it corrects it's self but it time out of time so it skews a bit left. Is there any way to fix this?

Sorry, I have been busy with the aftermath of FRC bag and tag. In any case, that's a side effect of some IR seeker zones are wider angle than the others. For example, if you are far away, the two seekers will read 2 and 8 which are on the narrow zone. So it will approach the beacon very accurately. However, when you are close enough, the zones changed to 3 and 7 which are the wide zones. The assumption is that if you maintained course when you were on zones 2 and 8, you should still be right onto the IR beacon. But if for some reason the robot turned a little bit while in zones 3 and 7, because of the wider zones, it wouldn't know the misalignment until it exited zone 3 or 7, then it will correct itself and eventually entering zone 4 and 6. But at this point, you are already approaching the IR beacon at an angle. It still accurately reached the beacon but at an angle. Therefore, it is important to be tolerant to this angle. If your robot's design is sensitive to this misalignment, there are a few things you could do. First, you can adjust the two IR seekers so that the left one has zone 2 pointing right ahead but the right IR seeker should have zone 7 pointing ahead instead of zone 8 (so the sum of the ahead direction is 9 instead of 10). This will make the approach readings something like this: 2 and 7, 3 and 6, 4 and 5. What this does is to interleave a narrow zone with a wide zone as the robot approaches the target. It will sacrifice a little bit of the accuracy of two narrow zones and trade it with a more uniform approach. Another way to do it is to plan your route differently so that it will turn to the beacon when it's far away while it's on the narrow zones and then use the gyro to maintain course so when the IR seekers are on wide zones, it wouldn't accidentally turned without knowing because the gyro is keeping it straight.

Mon Feb 23, 2015 9:48 pm

akash329dsouza

Novice

Joined: Tue Dec 16, 2014 10:25 amPosts: 81

Re: Question for MHTS

Ok thanks for the tips, just a side note, did your team make it to Super Regionals?

_________________Thanks!

Fri Feb 27, 2015 8:37 pm

MHTS

Guru

Joined: Sun Nov 15, 2009 5:46 amPosts: 1523

Re: Question for MHTS

No ironically, our autonomous was malfunctioning during the entire competition, the scissor jack was not raising to the correct height. The problem comes and goes. When we tried to debug in the pit, it behaved correctly. When it's in competition, it misbehaved. We still managed to rank number 1 seed but lost in the final rounds. After the competition, we tried to investigate the cause but the problem never reproduced again. The code didn't really change between competitions, so it is a mystery why the problem appeared. On the bright side, I can now concentrate on FRC.What about your team? Did you guys advance to super regional?

Fri Feb 27, 2015 8:48 pm

akash329dsouza

Novice

Joined: Tue Dec 16, 2014 10:25 amPosts: 81

Re: Question for MHTS

Yes! We made it to super regionals in Iowa. We finished 9th place in robot runs. (We won 2nd place inspire!)

_________________Thanks!

Sat Feb 28, 2015 10:56 am

akash329dsouza

Novice

Joined: Tue Dec 16, 2014 10:25 amPosts: 81

Re: Question for MHTS

By the way, is there any way to reduce lag in teleop/make it more efficient? I want to try to get the least latency possible while making it neater.

_________________Thanks!

Sun Mar 01, 2015 12:04 am

MHTS

Guru

Joined: Sun Nov 15, 2009 5:46 amPosts: 1523

Re: Question for MHTS

akash329dsouza wrote:

Yes! We made it to super regionals in Iowa. We finished 9th place in robot runs. (We won 2nd place inspire!)

Congratulations! Wish you the best of luck.

Sun Mar 01, 2015 7:54 am

MHTS

Guru

Joined: Sun Nov 15, 2009 5:46 amPosts: 1523

Re: Question for MHTS

akash329dsouza wrote:

By the way, is there any way to reduce lag in teleop/make it more efficient? I want to try to get the least latency possible while making it neater.

What do you mean by "lag"? Would you describe in more details? Do you mean your robot is not very responsive to joystick control?

Sun Mar 01, 2015 7:55 am

akash329dsouza

Novice

Joined: Tue Dec 16, 2014 10:25 amPosts: 81

Re: Question for MHTS

Yes, we want to increase responsiveness in teleop to joystick control.

_________________Thanks!

Sun Mar 01, 2015 12:04 pm

MHTS

Guru

Joined: Sun Nov 15, 2009 5:46 amPosts: 1523

Re: Question for MHTS

Would you post your teleop code? I can look it over and make some suggestions.

/*This is our function library that holds all of our functions for Teleop.

*/#pragma systemFile

float IRGetACDir(tMUXSensor link, int line){ static float prevDir = 0.0; //Create variables float currDir; int acS[5]; int idx; idx = HTIRS2readACDir(link); //Read current zone and store in idx currDir = (float)idx; //Store current zone as a float instead of an integer if (idx == 0)// if HTIRS2readACDir returns 0, it means it lost the IR beacon. In that case we use the ACDir determined previously. { currDir = prevDir; } else if (HTIRS2readAllACStrength(link, acS[0], acS[1], acS[2], acS[3], acS[4])) //Read the strength values of all 5 sensors. { idx = (idx - 1)/2; //translate the zone value into the sensor number 0 to 4. For example, zone 4 yielded idx 1. if ((idx < 4) && (acS[idx] != 0) && (acS[idx + 1] != 0)) //if sensor number and sensor number + 1 are still within 0 through 4 and if sensor number and sensor number + 1 both have non-zero strength { // calculate the .x proportion value from the relative strength of the two adjacent sensors. The result could be a positive or a negative number smaller than 1.0. Then add this .x number to the original zone number from HTIRS2readACDir. currDir += (float)(acS[idx + 1] - acS[idx])/ max(acS[idx], acS[idx + 1]); } nxtDisplayTextLine(line, "Idx=%d,Dir=%5.1f", idx, currDir); } prevDir = currDir; // remember the current zone value in case the next time we lost the IR beacon.

Who is online

Users browsing this forum: No registered users and 2 guests

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