Update use and size of channels on robot
Updates some values in our aos_config to properly run on the robot.
Signed-off-by: Maxwell Henderson <mxwhenderson@gmail.com>
Change-Id: I2cadd594eb30fe1ba857aebb2a6f1b1649bf9cce
diff --git a/y2024/BUILD b/y2024/BUILD
index 4aec7d2..8c26046 100644
--- a/y2024/BUILD
+++ b/y2024/BUILD
@@ -112,6 +112,7 @@
"//aos/network:message_bridge_client_fbs",
"//aos/network:message_bridge_server_fbs",
"//y2024/constants:constants_fbs",
+ "//frc971/control_loops/drivetrain/localization:localizer_output_fbs",
"//frc971/can_logger:can_logging_fbs",
"//aos/network:timestamp_fbs",
"//aos/network:remote_message_fbs",
@@ -132,6 +133,7 @@
"//aos/network:remote_message_fbs",
"//aos/network:message_bridge_client_fbs",
"//aos/network:message_bridge_server_fbs",
+ "//frc971/wpilib:pdp_values_fbs",
#y2019 stuff shouldn't be here (e.g. target selector)
"//y2024/constants:constants_fbs",
"//aos/network:timestamp_fbs",
diff --git a/y2024/wpilib_interface.cc b/y2024/wpilib_interface.cc
index bce5451..1a204a0 100644
--- a/y2024/wpilib_interface.cc
+++ b/y2024/wpilib_interface.cc
@@ -504,9 +504,7 @@
drivetrain_can_position_sender.MakeStaticBuilder();
auto drivetrain_falcon_vector =
- drivetrain_can_builder->add_talonfxs();
-
- CHECK(drivetrain_falcon_vector->reserve(drivetrain_talonfxs.size()));
+ CHECK_NOTNULL(drivetrain_can_builder->add_talonfxs());
for (auto talonfx : drivetrain_talonfxs) {
talonfx->SerializePosition(
diff --git a/y2024/y2024_imu.json b/y2024/y2024_imu.json
index f0e7561..7bb7aa8 100644
--- a/y2024/y2024_imu.json
+++ b/y2024/y2024_imu.json
@@ -150,6 +150,36 @@
}
]
},
+ {
+ "name": "/localizer",
+ "type": "frc971.controls.LocalizerOutput",
+ "source_node": "imu",
+ "frequency": 52,
+ "logger": "LOCAL_AND_REMOTE_LOGGER",
+ "logger_nodes": [
+ "roborio"
+ ],
+ "destination_nodes": [
+ {
+ "name": "roborio",
+ "priority": 5,
+ "time_to_live": 5000000,
+ "timestamp_logger": "LOCAL_AND_REMOTE_LOGGER",
+ "timestamp_logger_nodes": [
+ "imu"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "/imu/aos/remote_timestamps/roborio/localizer/frc971-controls-LocalizerOutput",
+ "type": "aos.message_bridge.RemoteMessage",
+ "source_node": "imu",
+ "logger": "NOT_LOGGED",
+ "frequency": 52,
+ "num_senders": 2,
+ "max_size": 200
+ },
{
"name": "/roborio/aos/remote_timestamps/imu/roborio/aos/aos-starter-StarterRpc",
"type": "aos.message_bridge.RemoteMessage",
diff --git a/y2024/y2024_roborio.json b/y2024/y2024_roborio.json
index 6af86f0..b78daef 100644
--- a/y2024/y2024_roborio.json
+++ b/y2024/y2024_roborio.json
@@ -19,6 +19,13 @@
},
{
"name": "/roborio/aos",
+ "type": "frc971.PDPValues",
+ "source_node": "roborio",
+ "frequency": 55,
+ "max_size": 368
+ },
+ {
+ "name": "/roborio/aos",
"type": "aos.RobotState",
"source_node": "roborio",
"frequency": 250
@@ -144,7 +151,7 @@
"source_node": "roborio",
"frequency": 220,
"num_senders": 2,
- "max_size": 400
+ "max_size": 608
},
{
"name": "/superstructure/rio",
@@ -152,7 +159,7 @@
"source_node": "roborio",
"frequency": 220,
"num_senders": 2,
- "max_size": 400
+ "max_size": 608
},
{
"name": "/can",
@@ -168,7 +175,7 @@
"source_node": "roborio",
"frequency": 220,
"num_senders": 2,
- "max_size": 400
+ "max_size": 424
},
{
"name": "/drivetrain",
@@ -213,7 +220,7 @@
"type": "frc971.control_loops.drivetrain.Position",
"source_node": "roborio",
"frequency": 400,
- "max_size": 112,
+ "max_size": 128,
"num_senders": 2
},
{