Bringup progress
Here's how far I got bringing the robot up. Turret needs to be
re-calibrated again, it keeps slipping.
Change-Id: Idf8cb73973434cf9c64fd737852f1b3092b79c75
Signed-off-by: milind-u <milind.upadhyay@gmail.com>
diff --git a/y2022/control_loops/python/catapult.py b/y2022/control_loops/python/catapult.py
index ce7496a..ad0e25a 100755
--- a/y2022/control_loops/python/catapult.py
+++ b/y2022/control_loops/python/catapult.py
@@ -41,8 +41,8 @@
J_cup = M_cup * lever**2.0 + M_cup * (ball_diameter / 2.)**2.0
-J = (J_ball + J_bar + J_cup * 1.5)
-JEmpty = (J_bar + J_cup * 1.5)
+J = (0.6 * J_ball + J_bar + J_cup * 0.0)
+JEmpty = (J_bar + J_cup * 0.0)
kCatapultWithBall = catapult_lib.CatapultParams(
name='Catapult',
@@ -52,14 +52,14 @@
radius=lever,
q_pos=2.8,
q_vel=20.0,
- kalman_q_pos=0.12,
+ kalman_q_pos=0.01,
kalman_q_vel=1.0,
kalman_q_voltage=1.5,
- kalman_r_position=0.05)
+ kalman_r_position=0.001)
kCatapultEmpty = catapult_lib.CatapultParams(
name='Catapult',
- motor=AddResistance(control_loop.NMotor(control_loop.Falcon(), 2), 0.03),
+ motor=AddResistance(control_loop.NMotor(control_loop.Falcon(), 2), 0.02),
G=G,
J=JEmpty,
radius=lever,
diff --git a/y2022/control_loops/superstructure/catapult/catapult.cc b/y2022/control_loops/superstructure/catapult/catapult.cc
index adc13c7..b99f59b 100644
--- a/y2022/control_loops/superstructure/catapult/catapult.cc
+++ b/y2022/control_loops/superstructure/catapult/catapult.cc
@@ -392,7 +392,7 @@
case CatapultState::RESETTING:
if (catapult_.controller().R(1, 0) > 0.0) {
- catapult_.AdjustProfile(7.0, 500.0);
+ catapult_.AdjustProfile(7.0, 1000.0);
} else {
catapult_state_ = CatapultState::PROFILE;
}
diff --git a/y2022/control_loops/superstructure/superstructure.cc b/y2022/control_loops/superstructure/superstructure.cc
index b9e0698..c93165d 100644
--- a/y2022/control_loops/superstructure/superstructure.cc
+++ b/y2022/control_loops/superstructure/superstructure.cc
@@ -253,8 +253,9 @@
const double flipper_open_position =
(flippers_open_ ? constants::Values::kReseatFlipperPosition()
: constants::Values::kFlipperOpenPosition());
+
+ // TODO(milind): add left arm back once it's fixed
flippers_open_ =
- position->flipper_arm_left()->encoder() >= flipper_open_position &&
position->flipper_arm_right()->encoder() >= flipper_open_position;
if (flippers_open_) {
diff --git a/y2022/control_loops/superstructure/superstructure_lib_test.cc b/y2022/control_loops/superstructure/superstructure_lib_test.cc
index cd5929b..c5eb110 100644
--- a/y2022/control_loops/superstructure/superstructure_lib_test.cc
+++ b/y2022/control_loops/superstructure/superstructure_lib_test.cc
@@ -818,7 +818,7 @@
EXPECT_EQ(superstructure_output_fetcher_->roller_voltage_front(), 0.0);
EXPECT_EQ(superstructure_output_fetcher_->roller_voltage_back(), 0.0);
- RunFor(chrono::seconds(1));
+ RunFor(chrono::seconds(2));
// Make sure that we are still transferring and the front transfer rollers
// still have a ball. The turret should now be at the loading position and the
@@ -1179,8 +1179,7 @@
goal_builder.add_auto_aim(true);
- ASSERT_EQ(builder.Send(goal_builder.Finish()),
- aos::RawSender::Error::kOk);
+ ASSERT_EQ(builder.Send(goal_builder.Finish()), aos::RawSender::Error::kOk);
}
// Give it time to stabilize.