y2019 robot code starts!
We are now deploying the config, and all the missing locations are now
available. Some channels got renamed to be more user friendly.
Change-Id: Idc771998b24a769994ec80f3aee292b0d1ac6240
diff --git a/aos/input/BUILD b/aos/input/BUILD
index b4ceea6..24e6381 100644
--- a/aos/input/BUILD
+++ b/aos/input/BUILD
@@ -61,6 +61,7 @@
"//aos/input:joystick_input",
"//aos/logging",
"//frc971/autonomous:auto_fbs",
+ "//frc971/autonomous:auto_mode_fbs",
"//frc971/autonomous:base_autonomous_actor",
],
)
diff --git a/aos/input/action_joystick_input.cc b/aos/input/action_joystick_input.cc
index 376009b..02e6c51 100644
--- a/aos/input/action_joystick_input.cc
+++ b/aos/input/action_joystick_input.cc
@@ -2,6 +2,7 @@
#include "aos/input/driver_station_data.h"
#include "frc971/autonomous/auto_generated.h"
+#include "frc971/autonomous/auto_mode_generated.h"
#include "frc971/autonomous/base_autonomous_actor.h"
using ::aos::input::driver_station::ControlBit;
diff --git a/aos/input/action_joystick_input.h b/aos/input/action_joystick_input.h
index 781e224..562d41a 100644
--- a/aos/input/action_joystick_input.h
+++ b/aos/input/action_joystick_input.h
@@ -5,6 +5,7 @@
#include "aos/input/drivetrain_input.h"
#include "aos/input/joystick_input.h"
#include "frc971/autonomous/auto_generated.h"
+#include "frc971/autonomous/auto_mode_generated.h"
#include "frc971/autonomous/base_autonomous_actor.h"
namespace aos {
@@ -40,7 +41,7 @@
::frc971::autonomous::BaseAutonomousActor::MakeFactory(event_loop)),
autonomous_mode_fetcher_(
event_loop->MakeFetcher<::frc971::autonomous::AutonomousMode>(
- ".frc971.autonomous.auto_mode")) {}
+ "/autonomous")) {}
virtual ~ActionJoystickInput() {}
diff --git a/aos/input/joystick_input.h b/aos/input/joystick_input.h
index 5e8bf5a..7a6e8c3 100644
--- a/aos/input/joystick_input.h
+++ b/aos/input/joystick_input.h
@@ -19,8 +19,7 @@
explicit JoystickInput(::aos::EventLoop *event_loop)
: event_loop_(event_loop) {
event_loop_->MakeWatcher(
- ".aos.joystick_state",
- [this](const ::aos::JoystickState &joystick_state) {
+ "/aos", [this](const ::aos::JoystickState &joystick_state) {
this->HandleData(&joystick_state);
});
event_loop->SetRuntimeRealtimePriority(29);
diff --git a/frc971/autonomous/BUILD b/frc971/autonomous/BUILD
index 2eb4be0..12698a9 100644
--- a/frc971/autonomous/BUILD
+++ b/frc971/autonomous/BUILD
@@ -1,10 +1,19 @@
package(default_visibility = ["//visibility:public"])
+load("//aos:config.bzl", "aos_config")
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
flatbuffer_cc_library(
name = "auto_fbs",
srcs = ["auto.fbs"],
+ gen_reflections = 1,
+ visibility = ["//visibility:public"],
+)
+
+flatbuffer_cc_library(
+ name = "auto_mode_fbs",
+ srcs = ["auto_mode.fbs"],
+ gen_reflections = 1,
visibility = ["//visibility:public"],
)
@@ -29,3 +38,14 @@
"//y2019/control_loops/drivetrain:target_selector_fbs",
],
)
+
+aos_config(
+ name = "config",
+ src = "autonomous_config.json",
+ flatbuffers = [
+ "//aos/actions:actions_fbs",
+ ":auto_fbs",
+ ":auto_mode_fbs",
+ ],
+ visibility = ["//visibility:public"],
+)
diff --git a/frc971/autonomous/auto.fbs b/frc971/autonomous/auto.fbs
index 92ca532..ef8e915 100644
--- a/frc971/autonomous/auto.fbs
+++ b/frc971/autonomous/auto.fbs
@@ -1,11 +1,5 @@
namespace frc971.autonomous;
-// Published on ".frc971.autonomous.auto_mode"
-table AutonomousMode {
- // Mode read from the mode setting sensors.
- mode:int;
-}
-
table AutonomousActionParams {
// The mode from the sensors when auto starts.
mode:int;
@@ -15,3 +9,5 @@
run:uint;
params:AutonomousActionParams;
}
+
+root_type Goal;
diff --git a/frc971/autonomous/auto_mode.fbs b/frc971/autonomous/auto_mode.fbs
new file mode 100644
index 0000000..412cd17
--- /dev/null
+++ b/frc971/autonomous/auto_mode.fbs
@@ -0,0 +1,8 @@
+namespace frc971.autonomous;
+
+table AutonomousMode {
+ // Mode read from the mode setting sensors.
+ mode:int;
+}
+
+root_type AutonomousMode;
diff --git a/frc971/autonomous/autonomous_config.json b/frc971/autonomous/autonomous_config.json
new file mode 100644
index 0000000..5320325
--- /dev/null
+++ b/frc971/autonomous/autonomous_config.json
@@ -0,0 +1,17 @@
+{
+ "channels":
+ [
+ {
+ "name": "/autonomous",
+ "type": "aos.common.actions.Status"
+ },
+ {
+ "name": "/autonomous",
+ "type": "frc971.autonomous.Goal"
+ },
+ {
+ "name": "/autonomous",
+ "type": "frc971.autonomous.AutonomousMode"
+ }
+ ]
+}
diff --git a/frc971/autonomous/base_autonomous_actor.h b/frc971/autonomous/base_autonomous_actor.h
index 6035551..09d9a0e 100644
--- a/frc971/autonomous/base_autonomous_actor.h
+++ b/frc971/autonomous/base_autonomous_actor.h
@@ -25,7 +25,7 @@
const control_loops::drivetrain::DrivetrainConfig<double> &dt_config);
static Factory MakeFactory(::aos::EventLoop *event_loop) {
- return Factory(event_loop, ".frc971.autonomous.autonomous_action");
+ return Factory(event_loop, "/autonomous");
}
protected:
diff --git a/frc971/downloader.bzl b/frc971/downloader.bzl
index 842398f58..aff3420 100644
--- a/frc971/downloader.bzl
+++ b/frc971/downloader.bzl
@@ -1,7 +1,7 @@
load("//frc971/downloader:downloader.bzl", "aos_downloader")
load("//tools/build_rules:label.bzl", "expand_label")
-def robot_downloader(start_binaries, binaries = [], dirs = None, default_target = None):
+def robot_downloader(start_binaries, binaries = [], data = [], dirs = None, default_target = None):
"""Sets up the standard robot download targets.
Attrs:
@@ -17,7 +17,7 @@
] + start_binaries,
srcs = [
"//aos:prime_binaries",
- ] + binaries,
+ ] + binaries + data,
dirs = dirs,
default_target = default_target,
restricted_to = ["//tools:roborio"],
@@ -30,7 +30,7 @@
] + [expand_label(binary) + ".stripped" for binary in start_binaries],
srcs = [
"//aos:prime_binaries_stripped",
- ] + [expand_label(binary) + ".stripped" for binary in binaries],
+ ] + [expand_label(binary) + ".stripped" for binary in binaries] + data,
dirs = dirs,
default_target = default_target,
restricted_to = ["//tools:roborio"],
diff --git a/frc971/wpilib/BUILD b/frc971/wpilib/BUILD
index 8d0982a..c2cdb51 100644
--- a/frc971/wpilib/BUILD
+++ b/frc971/wpilib/BUILD
@@ -8,6 +8,7 @@
srcs = [
"logging.fbs",
],
+ gen_reflections = 1,
)
cc_library(
@@ -127,6 +128,15 @@
)
aos_config(
+ name = "config",
+ src = "wpilib_config.json",
+ flatbuffers = [
+ ":pdp_values_fbs",
+ ":logging_fbs",
+ ],
+)
+
+aos_config(
name = "loop_output_handler_test_config",
src = "loop_output_handler_test_config_source.json",
flatbuffers = [
@@ -208,10 +218,11 @@
)
flatbuffer_cc_library(
- name = "pdp_values",
+ name = "pdp_values_fbs",
srcs = [
"pdp_values.fbs",
],
+ gen_reflections = 1,
)
cc_library(
@@ -224,7 +235,7 @@
],
restricted_to = ["//tools:roborio"],
deps = [
- ":pdp_values",
+ ":pdp_values_fbs",
"//aos:init",
"//aos/events:event_loop",
"//aos/util:phased_loop",
diff --git a/frc971/wpilib/logging.fbs b/frc971/wpilib/logging.fbs
index 473526f..fcb4235 100644
--- a/frc971/wpilib/logging.fbs
+++ b/frc971/wpilib/logging.fbs
@@ -5,3 +5,5 @@
compressor_on:bool;
read_solenoids:ubyte;
}
+
+root_type PneumaticsToLog;
diff --git a/frc971/wpilib/sensor_reader.cc b/frc971/wpilib/sensor_reader.cc
index 8610105..d4ea66e 100644
--- a/frc971/wpilib/sensor_reader.cc
+++ b/frc971/wpilib/sensor_reader.cc
@@ -18,7 +18,7 @@
SensorReader::SensorReader(::aos::EventLoop *event_loop)
: event_loop_(event_loop),
robot_state_sender_(
- event_loop_->MakeSender<::aos::RobotState>(".aos.robot_state")),
+ event_loop_->MakeSender<::aos::RobotState>("/aos")),
my_pid_(getpid()) {
// Set some defaults. We don't tend to exceed these, so old robots should
// just work with them.
diff --git a/frc971/wpilib/wpilib_config.json b/frc971/wpilib/wpilib_config.json
new file mode 100644
index 0000000..eb9a716
--- /dev/null
+++ b/frc971/wpilib/wpilib_config.json
@@ -0,0 +1,13 @@
+{
+ "channels":
+ [
+ {
+ "name": "/aos",
+ "type": "frc971.PDPValues"
+ },
+ {
+ "name": "/aos",
+ "type": "frc971.wpilib.PneumaticsToLog"
+ }
+ ]
+}
diff --git a/y2016/BUILD b/y2016/BUILD
index f3887b5..520dd4b 100644
--- a/y2016/BUILD
+++ b/y2016/BUILD
@@ -11,7 +11,6 @@
],
visibility = ["//visibility:public"],
deps = [
- "@com_google_absl//absl/base",
"//aos/logging",
"//aos/mutex",
"//aos/network:team_number",
@@ -19,6 +18,7 @@
"//frc971:shifter_hall_effect",
"//frc971/control_loops:state_feedback_loop",
"//y2016/control_loops/drivetrain:polydrivetrain_plants",
+ "@com_google_absl//absl/base",
],
)
@@ -110,6 +110,7 @@
"//aos/util:phased_loop",
"//aos/util:wrapping_counter",
"//frc971/autonomous:auto_fbs",
+ "//frc971/autonomous:auto_mode_fbs",
"//frc971/control_loops:control_loops_fbs",
"//frc971/control_loops/drivetrain:drivetrain_output_fbs",
"//frc971/control_loops/drivetrain:drivetrain_position_fbs",
diff --git a/y2016/dashboard/BUILD b/y2016/dashboard/BUILD
index dbc6214..9e8198a 100644
--- a/y2016/dashboard/BUILD
+++ b/y2016/dashboard/BUILD
@@ -34,7 +34,7 @@
"//aos/seasocks:seasocks_logger",
"//aos/time",
"//aos/util:phased_loop",
- "//frc971/autonomous:auto_fbs",
+ "//frc971/autonomous:auto_mode_fbs",
"//frc971/control_loops:control_loops_fbs",
"//third_party/seasocks",
"//y2016/control_loops/superstructure:superstructure_status_fbs",
diff --git a/y2016/dashboard/dashboard.cc b/y2016/dashboard/dashboard.cc
index 7f13fbe..8aec0de 100644
--- a/y2016/dashboard/dashboard.cc
+++ b/y2016/dashboard/dashboard.cc
@@ -19,7 +19,7 @@
#include "aos/seasocks/seasocks_logger.h"
#include "aos/time/time.h"
#include "aos/util/phased_loop.h"
-#include "frc971/autonomous/auto_generated.h"
+#include "frc971/autonomous/auto_mode_generated.h"
#include "y2016/control_loops/superstructure/superstructure_status_generated.h"
#include "y2016/queues/ball_detector_generated.h"
#include "y2016/vision/vision_generated.h"
diff --git a/y2016/dashboard/dashboard.h b/y2016/dashboard/dashboard.h
index f019ec7..cc51a8b 100644
--- a/y2016/dashboard/dashboard.h
+++ b/y2016/dashboard/dashboard.h
@@ -17,7 +17,7 @@
#include "aos/events/event_loop.h"
#include "aos/mutex/mutex.h"
#include "aos/time/time.h"
-#include "frc971/autonomous/auto_generated.h"
+#include "frc971/autonomous/auto_mode_generated.h"
#include "y2016/control_loops/superstructure/superstructure_status_generated.h"
#include "y2016/queues/ball_detector_generated.h"
#include "y2016/vision/vision_generated.h"
diff --git a/y2016/wpilib_interface.cc b/y2016/wpilib_interface.cc
index c36bab1..e238493 100644
--- a/y2016/wpilib_interface.cc
+++ b/y2016/wpilib_interface.cc
@@ -29,7 +29,7 @@
#include "aos/util/log_interval.h"
#include "aos/util/wrapping_counter.h"
#include "frc971/autonomous/auto_generated.h"
-//#include "frc971/control_loops/control_loops.q.h"
+#include "frc971/autonomous/auto_mode_generated.h"
#include "frc971/control_loops/drivetrain/drivetrain_output_generated.h"
#include "frc971/control_loops/drivetrain/drivetrain_position_generated.h"
#include "frc971/wpilib/ADIS16448.h"
diff --git a/y2017/BUILD b/y2017/BUILD
index 96b2d92..ca3e221 100644
--- a/y2017/BUILD
+++ b/y2017/BUILD
@@ -13,7 +13,6 @@
deps = [
"//aos/logging",
"//aos/mutex",
- "@com_google_absl//absl/base",
"//aos/network:team_number",
"//frc971:constants",
"//frc971/shooter_interpolation:interpolation",
@@ -22,6 +21,7 @@
"//y2017/control_loops/superstructure/hood:hood_plants",
"//y2017/control_loops/superstructure/intake:intake_plants",
"//y2017/control_loops/superstructure/shooter:shooter_plants",
+ "@com_google_absl//absl/base",
],
)
@@ -83,6 +83,7 @@
"//aos/util:phased_loop",
"//aos/util:wrapping_counter",
"//frc971/autonomous:auto_fbs",
+ "//frc971/autonomous:auto_mode_fbs",
"//frc971/control_loops:control_loops_fbs",
"//frc971/control_loops/drivetrain:drivetrain_output_fbs",
"//frc971/control_loops/drivetrain:drivetrain_position_fbs",
diff --git a/y2017/wpilib_interface.cc b/y2017/wpilib_interface.cc
index d08909f..62743b9 100644
--- a/y2017/wpilib_interface.cc
+++ b/y2017/wpilib_interface.cc
@@ -34,6 +34,7 @@
#include "aos/util/phased_loop.h"
#include "aos/util/wrapping_counter.h"
#include "frc971/autonomous/auto_generated.h"
+#include "frc971/autonomous/auto_mode_generated.h"
#include "frc971/control_loops/control_loops_generated.h"
#include "frc971/control_loops/drivetrain/drivetrain_output_generated.h"
#include "frc971/control_loops/drivetrain/drivetrain_position_generated.h"
diff --git a/y2019/BUILD b/y2019/BUILD
index 5c9a3a6..d9cd4fd 100644
--- a/y2019/BUILD
+++ b/y2019/BUILD
@@ -4,6 +4,9 @@
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
robot_downloader(
+ data = [
+ ":config.json",
+ ],
dirs = [
"//y2019/vision/server:www_files",
],
@@ -27,7 +30,6 @@
],
visibility = ["//visibility:public"],
deps = [
- "@com_google_absl//absl/base",
"//aos/logging",
"//aos/mutex",
"//aos/network:team_number",
@@ -41,6 +43,7 @@
"//y2019/control_loops/superstructure/stilts:stilts_plants",
"//y2019/control_loops/superstructure/wrist:wrist_plants",
"//y2019/vision:constants",
+ "@com_google_absl//absl/base",
],
)
@@ -51,8 +54,9 @@
],
restricted_to = ["//tools:roborio"],
deps = [
+ ":camera_log_fbs",
":constants",
- ":status_light",
+ ":status_light_fbs",
"//aos:init",
"//aos:make_unique",
"//aos:math",
@@ -65,7 +69,7 @@
"//aos/util:log_interval",
"//aos/util:phased_loop",
"//aos/util:wrapping_counter",
- "//frc971/autonomous:auto_fbs",
+ "//frc971/autonomous:auto_mode_fbs",
"//frc971/control_loops:control_loops_fbs",
"//frc971/control_loops/drivetrain:drivetrain_position_fbs",
"//frc971/wpilib:ADIS16448",
@@ -120,7 +124,7 @@
":joystick_reader.cc",
],
deps = [
- ":status_light",
+ ":camera_log_fbs",
":vision_proto",
"//aos:init",
"//aos/actions:action_lib",
@@ -147,7 +151,16 @@
)
flatbuffer_cc_library(
- name = "status_light",
+ name = "camera_log_fbs",
+ srcs = [
+ "camera_log.fbs",
+ ],
+ gen_reflections = 1,
+ visibility = ["//visibility:public"],
+)
+
+flatbuffer_cc_library(
+ name = "status_light_fbs",
srcs = [
"status_light.fbs",
],
@@ -159,18 +172,21 @@
name = "config",
src = "y2019.json",
flatbuffers = [
- ":status_light",
+ ":status_light_fbs",
"//y2019/control_loops/drivetrain:camera_fbs",
"//y2019/control_loops/drivetrain:target_selector_fbs",
"//y2019/control_loops/superstructure:superstructure_goal_fbs",
"//y2019/control_loops/superstructure:superstructure_output_fbs",
"//y2019/control_loops/superstructure:superstructure_position_fbs",
"//y2019/control_loops/superstructure:superstructure_status_fbs",
+ ":camera_log_fbs",
],
visibility = ["//visibility:public"],
deps = [
"//aos/robot_state:config",
+ "//frc971/autonomous:config",
"//frc971/control_loops/drivetrain:config",
+ "//frc971/wpilib:config",
],
)
diff --git a/y2019/camera_log.fbs b/y2019/camera_log.fbs
new file mode 100644
index 0000000..0ef7c04
--- /dev/null
+++ b/y2019/camera_log.fbs
@@ -0,0 +1,7 @@
+namespace y2019;
+
+table CameraLog {
+ log:bool;
+}
+
+root_type CameraLog;
diff --git a/y2019/control_loops/drivetrain/event_loop_localizer.cc b/y2019/control_loops/drivetrain/event_loop_localizer.cc
index a372df4..c436232 100644
--- a/y2019/control_loops/drivetrain/event_loop_localizer.cc
+++ b/y2019/control_loops/drivetrain/event_loop_localizer.cc
@@ -45,7 +45,7 @@
localizer_.ResetInitialState(monotonic_now, localizer_.X_hat(),
localizer_.P());
});
- frame_fetcher_ = event_loop_->MakeFetcher<CameraFrame>("/drivetrain");
+ frame_fetcher_ = event_loop_->MakeFetcher<CameraFrame>("/camera");
}
void EventLoopLocalizer::Reset(::aos::monotonic_clock::time_point now,
diff --git a/y2019/control_loops/drivetrain/localized_drivetrain_test.cc b/y2019/control_loops/drivetrain/localized_drivetrain_test.cc
index b8674bc..3a6bec7 100644
--- a/y2019/control_loops/drivetrain/localized_drivetrain_test.cc
+++ b/y2019/control_loops/drivetrain/localized_drivetrain_test.cc
@@ -57,7 +57,7 @@
drivetrain_event_loop_(MakeEventLoop("drivetrain")),
dt_config_(GetTest2019DrivetrainConfig()),
camera_sender_(
- test_event_loop_->MakeSender<CameraFrame>("/drivetrain")),
+ test_event_loop_->MakeSender<CameraFrame>("/camera")),
localizer_(drivetrain_event_loop_.get(), dt_config_),
drivetrain_(dt_config_, drivetrain_event_loop_.get(), &localizer_),
drivetrain_plant_event_loop_(MakeEventLoop("plant")),
diff --git a/y2019/control_loops/superstructure/BUILD b/y2019/control_loops/superstructure/BUILD
index 7cbb202..ed0c916 100644
--- a/y2019/control_loops/superstructure/BUILD
+++ b/y2019/control_loops/superstructure/BUILD
@@ -65,7 +65,7 @@
"//aos/events:event_loop",
"//frc971/control_loops/drivetrain:drivetrain_status_fbs",
"//y2019:constants",
- "//y2019:status_light",
+ "//y2019:status_light_fbs",
],
)
@@ -91,7 +91,7 @@
"//frc971/control_loops:position_sensor_sim",
"//frc971/control_loops:team_number_test_environment",
"//frc971/control_loops/drivetrain:drivetrain_status_fbs",
- "//y2019:status_light",
+ "//y2019:status_light_fbs",
"//y2019/control_loops/superstructure/intake:intake_plants",
],
)
diff --git a/y2019/joystick_reader.cc b/y2019/joystick_reader.cc
index da43495..9fd0d31 100644
--- a/y2019/joystick_reader.cc
+++ b/y2019/joystick_reader.cc
@@ -18,12 +18,12 @@
#include "frc971/autonomous/base_autonomous_actor.h"
#include "frc971/control_loops/drivetrain/localizer_generated.h"
+#include "y2019/camera_log_generated.h"
#include "y2019/control_loops/drivetrain/drivetrain_base.h"
#include "y2019/control_loops/drivetrain/target_selector_generated.h"
#include "y2019/control_loops/superstructure/superstructure_goal_generated.h"
#include "y2019/control_loops/superstructure/superstructure_position_generated.h"
#include "y2019/control_loops/superstructure/superstructure_status_generated.h"
-#include "y2019/status_light_generated.h"
#include "y2019/vision.pb.h"
using aos::events::ProtoTXUdpSocket;
diff --git a/y2019/status_light.fbs b/y2019/status_light.fbs
index 633b030..665b3f8 100644
--- a/y2019/status_light.fbs
+++ b/y2019/status_light.fbs
@@ -7,9 +7,4 @@
blue:float;
}
-table CameraLog {
- log:bool;
-}
-
-root_type CameraLog;
root_type StatusLight;
diff --git a/y2019/vision/server/server.cc b/y2019/vision/server/server.cc
index 91dc61a..99a3727 100644
--- a/y2019/vision/server/server.cc
+++ b/y2019/vision/server/server.cc
@@ -158,12 +158,11 @@
::aos::RingBuffer<DrivetrainPosition, 200> drivetrain_log;
event_loop.MakeWatcher(
- "/drivetrain",
- [websocket_handler, server, &latest_frames, &last_target_time,
- &drivetrain_status_fetcher, &superstructure_status_fetcher,
- &last_send_time, &drivetrain_log,
- &debug_data](const ::y2019::control_loops::drivetrain::CameraFrame
- &camera_frames) {
+ "/camera", [websocket_handler, server, &latest_frames, &last_target_time,
+ &drivetrain_status_fetcher, &superstructure_status_fetcher,
+ &last_send_time, &drivetrain_log, &debug_data](
+ const ::y2019::control_loops::drivetrain::CameraFrame
+ &camera_frames) {
while (drivetrain_status_fetcher.FetchNext()) {
DrivetrainPosition drivetrain_position{
drivetrain_status_fetcher.context().monotonic_sent_time,
diff --git a/y2019/wpilib_interface.cc b/y2019/wpilib_interface.cc
index 227d3ca..8517c57 100644
--- a/y2019/wpilib_interface.cc
+++ b/y2019/wpilib_interface.cc
@@ -32,7 +32,7 @@
#include "aos/util/phased_loop.h"
#include "aos/util/wrapping_counter.h"
#include "ctre/phoenix/motorcontrol/can/TalonSRX.h"
-#include "frc971/autonomous/auto_generated.h"
+#include "frc971/autonomous/auto_mode_generated.h"
#include "frc971/control_loops/drivetrain/drivetrain_position_generated.h"
#include "frc971/wpilib/ADIS16448.h"
#include "frc971/wpilib/buffered_pcm.h"
@@ -46,6 +46,7 @@
#include "frc971/wpilib/pdp_fetcher.h"
#include "frc971/wpilib/sensor_reader.h"
#include "frc971/wpilib/wpilib_robot_base.h"
+#include "y2019/camera_log_generated.h"
#include "y2019/constants.h"
#include "y2019/control_loops/drivetrain/camera_generated.h"
#include "y2019/control_loops/superstructure/superstructure_output_generated.h"
@@ -134,7 +135,7 @@
: ::frc971::wpilib::SensorReader(event_loop),
auto_mode_sender_(
event_loop->MakeSender<::frc971::autonomous::AutonomousMode>(
- "/aos")),
+ "/autonomous")),
superstructure_position_sender_(
event_loop->MakeSender<superstructure::Position>(
"/superstructure")),
@@ -354,9 +355,9 @@
: camera_frame_sender_(
event_loop
->MakeSender<::y2019::control_loops::drivetrain::CameraFrame>(
- ".y2019.control_loops.drivetrain.camera_frames")),
+ "/camera")),
camera_log_fetcher_(
- event_loop->MakeFetcher<::y2019::CameraLog>(".y2019.camera_log")) {}
+ event_loop->MakeFetcher<::y2019::CameraLog>("/camera")) {}
CameraReader(const CameraReader &) = delete;
CameraReader &operator=(const CameraReader &) = delete;
diff --git a/y2019/y2019.json b/y2019/y2019.json
index c32db3f..cbff0a5 100644
--- a/y2019/y2019.json
+++ b/y2019/y2019.json
@@ -32,9 +32,13 @@
"frequency": 200
},
{
- "name": "/drivetrain",
+ "name": "/camera",
"type": "y2019.control_loops.drivetrain.CameraFrame",
"frequency": 200
+ },
+ {
+ "name": "/camera",
+ "type": "y2019.CameraLog"
}
],
"applications": [
@@ -44,6 +48,8 @@
],
"imports": [
"../aos/robot_state/robot_state_config.json",
- "../frc971/control_loops/drivetrain/drivetrain_config.json"
+ "../frc971/control_loops/drivetrain/drivetrain_config.json",
+ "../frc971/autonomous/autonomous_config.json",
+ "../frc971/wpilib/wpilib_config.json"
]
}