From 0f665f2772b93ffb2a543c1788998fb272771fca Mon Sep 17 00:00:00 2001 From: Eric Katzfey Date: Thu, 11 Apr 2024 18:25:09 -0700 Subject: [PATCH] Added high rate esc_status logging to the high rate logging category along with actuator_outputs_debug. Both of these really help diagnosing odd flight behavior / crashes on VOXL2. Also changed the logger start commands in the VOXL2 standard and HITL startup scripts. --- boards/modalai/voxl2/target/voxl-px4-hitl-start | 10 +++------- boards/modalai/voxl2/target/voxl-px4-start | 15 ++++++++------- src/modules/logger/logged_topics.cpp | 2 ++ 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/boards/modalai/voxl2/target/voxl-px4-hitl-start b/boards/modalai/voxl2/target/voxl-px4-hitl-start index 45ef0b2ddf..9dcc4bb4f0 100755 --- a/boards/modalai/voxl2/target/voxl-px4-hitl-start +++ b/boards/modalai/voxl2/target/voxl-px4-hitl-start @@ -43,13 +43,6 @@ else param load fi -# Start logging and use timestamps for log files when possible. -# Add the "-e" option to start logging immediately. Default is -# to log only when armed. Caution must be used with the "-e" option -# because if power is removed without stopping the logger gracefully then -# the log file may be corrupted. -logger start -e -t -b 200 - /bin/sleep 1 # Start all of the processing modules on DSP @@ -97,6 +90,9 @@ mavlink stream -u 14556 -s GLOBAL_POSITION_INT -r 30 # start the slow normal mode for voxl-mavlink-server to forward to GCS mavlink start -x -u 14558 -o 14559 -r 100000 -n lo +# Start logging and use timestamps for log files when possible. +logger start -t -b 256 + /bin/sleep 1 mavlink boot_complete diff --git a/boards/modalai/voxl2/target/voxl-px4-start b/boards/modalai/voxl2/target/voxl-px4-start index ad9804451b..2c2821bfe4 100755 --- a/boards/modalai/voxl2/target/voxl-px4-start +++ b/boards/modalai/voxl2/target/voxl-px4-start @@ -62,13 +62,6 @@ param select /data/px4/param/parameters # Load in all of the parameters that have been saved in the file param load -# Start logging and use timestamps for log files when possible. -# Add the "-e" option to start logging immediately. Default is -# to log only when armed. Caution must be used with the "-e" option -# because if power is removed without stopping the logger gracefully then -# the log file may be corrupted. -logger start -t - # IMU (accelerometer / gyroscope) if [ "$PLATFORM" == "M0104" ]; then /bin/echo "Starting IMU driver with rotation 12" @@ -235,6 +228,14 @@ mavlink stream -u 14556 -s SCALED_PRESSURE -r 10 # start the slow normal mode for voxl-mavlink-server to forward to GCS mavlink start -x -u 14558 -o 14559 -r 100000 -n lo +# Start logging and use timestamps for log files when possible. +# Add the "-e" option to start logging immediately. Default is +# to log only when armed. Caution must be used with the "-e" option +# because if power is removed without stopping the logger gracefully then +# the log file may be corrupted. Rather than using "-e" option it's better +# to use the SDLOG_MODE to do that. +logger start -t -b 256 + mavlink boot_complete # Optional MSP OSD driver for DJI goggles diff --git a/src/modules/logger/logged_topics.cpp b/src/modules/logger/logged_topics.cpp index 1b0326234b..022f0b9068 100644 --- a/src/modules/logger/logged_topics.cpp +++ b/src/modules/logger/logged_topics.cpp @@ -316,7 +316,9 @@ void LoggedTopics::add_high_rate_topics() add_topic("vehicle_attitude_setpoint"); add_topic("vehicle_rates_setpoint"); + add_topic("esc_status", 5); add_topic("actuator_motors"); + add_topic("actuator_outputs_debug"); add_topic("actuator_servos"); add_topic_multi("vehicle_thrust_setpoint", 0, 2); add_topic_multi("vehicle_torque_setpoint", 0, 2);