Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deposit Positioning #3

Open
gavinjalberghini opened this issue Jan 11, 2023 · 2 comments
Open

Deposit Positioning #3

gavinjalberghini opened this issue Jan 11, 2023 · 2 comments

Comments

@gavinjalberghini
Copy link
Contributor

gavinjalberghini commented Jan 11, 2023

Problem: Placing the bot in the correct position to place game pieces.

Possible Sensors:

  • Visualizations
    • USB Camera / Limelight
  • Orientation
    • Gyroscope
    • Rangefinder

Possible Solutions:

  • Utilize April Tags
  • Utilize Reflective Tapes (USB with Grip Pipeline/Limelight)
  • Utilize Rangefinder & Gyrometer
  • Overlay targeting over camera image
@NerdyDragon777
Copy link
Contributor

AI Written psuedocode. (May be correct or incorrect, it is just an outline of what to possibly expect)

float distance = 5.0; // distance to align robot from April tag in units

// detect April tag
TagData tagData = detectTag();

// determine position and orientation of April tag
float tagX = tagData.getX();
float tagY = tagData.getY();
float tagTheta = tagData.getTheta();

// calculate target position for robot
float targetX = tagX + distancecos(tagTheta);
float targetY = tagY + distance
sin(tagTheta);

// rotate robot to face target position
rotateTo(targetX, targetY);

// move robot to target position
moveTo(targetX, targetY);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants