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

Add tracking wheel support #21

Closed
ssejrog opened this issue Nov 17, 2021 · 3 comments
Closed

Add tracking wheel support #21

ssejrog opened this issue Nov 17, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@ssejrog
Copy link
Member

ssejrog commented Nov 17, 2021

For now, just support trackers parallel to the drive wheels. Default parameter in drive constructor that can be set. Needs to support 3 wire expanders and different ticks per rotation.

@ssejrog ssejrog added the enhancement New feature or request label Nov 17, 2021
@ssejrog ssejrog self-assigned this Nov 17, 2021
ssejrog added a commit that referenced this issue Nov 20, 2021
tick_per_inch now changes how it calculates depending on if trakcing wheels are used or not.  there are 3 drive constructors, one for internal encoders, one for tracking wheels in brain, and one for tracking wheels in an expander. left_sensor and right_sensor output motor/tracking wheel depending on the constructor used.
@ssejrog
Copy link
Member Author

ssejrog commented Nov 20, 2021

Added two new constructors for tracking wheels (external encoders).

// Chassis constructor
drive chassis (
  // Left Chassis Ports (negative port will reverse it!)
  {-11, -5, -7}

  // Right Chassis Ports (negative port will reverse it!)
  ,{3, 2, 17}

  // IMU Port
  ,18

  // Wheel Diameter (Remember, 4" wheels are actually 4.125!)
  //    (or tracking wheel diameter)
  ,3.25

  // Cartridge RPM
  //   (pr tick per rotation if using tracking wheels)
  ,600

  // External Gear Ratio 
  //    (or gear ratio of tracking wheel)
  ,1.66666666667

  // Left Tracking Wheel Ports (negative port will reverse it!)
  ,{1, 2}

  // Right Tracking Wheel Ports (negative port will reverse it!)
  ,{3, 4}
);

and

// Chassis constructor
drive chassis (
  // Left Chassis Ports (negative port will reverse it!)
  {-11, -5, -7}

  // Right Chassis Ports (negative port will reverse it!)
  ,{3, 2, 17}

  // IMU Port
  ,18

  // Wheel Diameter (Remember, 4" wheels are actually 4.125!)
  //    (or tracking wheel diameter)
  ,3.25

  // Cartridge RPM
  //   (pr tick per rotation if using tracking wheels)
  ,600

  // External Gear Ratio 
  //    (or gear ratio of tracking wheel)
  ,1.66666666667

  // Left Tracking Wheel Ports (negative port will reverse it!)
  ,{1, 2}

  // Right Tracking Wheel Ports (negative port will reverse it!)
  ,{3, 4}

  // 3 Wire Port Expander Smart Port
  ,1
);

left_velocity() and right_velocity() don't return the velocity of the external encoders. This needs to be implemented.

@ssejrog
Copy link
Member Author

ssejrog commented Jan 3, 2022

#28 adds rotation sensors

@ssejrog
Copy link
Member Author

ssejrog commented Feb 11, 2022

as we decided odom is out of scope of this project, this issue is now complete with the remaining #47 still open.

@ssejrog ssejrog closed this as completed Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant