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. |
mbardoe
left a comment
There was a problem hiding this comment.
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.
| 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.
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.
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.
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...