-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feat/shooting while moving #91
base: dev
Are you sure you want to change the base?
Conversation
I am worried about trying to do this... I think that right way to do is to implement a Kalman Filter to guess what our speed is going to be in the near future, rather than using our current speed. In the past this was a big issue with trying to do shooting while moving. We were using the speed that was in the past, but the speed we use to calculate the aim is generally too laggy to be accurate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we are quite there yet. Even without the Kalman filter, you will need fix the way the current speeds are integrated into the flywheel. We need to consider vy.
@@ -90,7 +90,7 @@ class Scoring: | |||
|
|||
speaker_z = speaker_z_top #(speaker_z_top + speaker_z_bottom) / 2 | |||
|
|||
speaker_x = speaker_depth / 2.5 | |||
speaker_x = speaker_depth / 1.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this all about? What is speaker_depth?
rvx = self.get_drivetrain_speeds_field_origin().vx | ||
|
||
rvs = rvx * np.cos(self.get_rotation_to_speaker().radians()) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am sure that vy is relevant here.
robot_pose_2d = self.odometry.getPose() | ||
robot_pose_2d_w_speeds = robot_pose_2d + Transform2d(rvels.vx * t_total, rvels.vy * t_total, 0) | ||
robot_to_speaker = speaker_translation - robot_pose_2d_w_speeds.translation() | ||
return robot_to_speaker.angle() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what this is all about. Can you explain it to me? Again. I think that we need to be thinking about where we WILL need to be aiming, rather than should be aiming right now. So we may need to be thinking ahead with Kalman filter thing.
Yeah I figured as much. I forgot the vy, that's an easy change. This is definitely not something to complete before WNE |
its here...