Skip to content

Enhance UI and communication with recovery mode and debugging features#307

Merged
2194555 merged 15 commits intorm-controls:masterfrom
WiseL00k:series_leg
May 1, 2026
Merged

Enhance UI and communication with recovery mode and debugging features#307
2194555 merged 15 commits intorm-controls:masterfrom
WiseL00k:series_leg

Conversation

@WiseL00k
Copy link
Copy Markdown
Contributor

@WiseL00k WiseL00k commented May 1, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 1, 2026 04:17
@netlify
Copy link
Copy Markdown

netlify Bot commented May 1, 2026

Deploy Preview for rm-control ready!

Name Link
🔨 Latest commit 5834358
🔍 Latest deploy log https://app.netlify.com/projects/rm-control/deploys/69f460f0ee5fa0000724be03
😎 Deploy Preview https://deploy-preview-307--rm-control.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR appears to extend the RoboMaster stack with a new chassis recovery mode, add a generic debug-data message/publisher for runtime telemetry, and introduce a Gazebo “step_down” simulation scenario, alongside some control/limits tuning.

Changes:

  • Add RECOVERY mode to rm_msgs/ChassisCmd and display it in the referee UI.
  • Introduce rm_msgs/DebugData plus a C++ DebugDataPublisher helper to publish named debug variables.
  • Add step_down Gazebo world + launch file and adjust some decision/filter behaviors (Kalman filter init, power/heat limit logic, serial handling in rm_referee main).

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
rm_referee/src/ui/trigger_change_ui.cpp Maps chassis mode to UI strings; adds handling for RECOVERY.
rm_referee/src/main.cpp Wraps main loop in try/catch for serial exceptions (currently introduces compile/behavior issues).
rm_msgs/msg/DebugData.msg New message for publishing arrays of stamped named debug values.
rm_msgs/msg/ChassisCmd.msg Adds RECOVERY = 6 chassis mode constant.
rm_msgs/CMakeLists.txt Registers DebugData.msg for message generation.
rm_gazebo/worlds/step_down.world New Gazebo world for step-down scenario (includes saved <state> snapshot).
rm_gazebo/launch/step_down.launch New roslaunch entrypoint for the step-down world (currently invalid XML).
rm_common/include/rm_common/filters/kalman_filter.h Adds clear(x, P0) and changes clear(x) covariance initialization (currently introduces a regression).
rm_common/include/rm_common/decision/power_limit.h Extends “capacity online” window and adds a setter for burst power limit.
rm_common/include/rm_common/decision/heat_limit.h Adds an early offline return in getShootFrequency().
rm_common/include/rm_common/DebugDataPublisher.h New helper class to accumulate/publish rm_msgs/DebugData.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rm_common/include/rm_common/decision/power_limit.h
Comment thread rm_gazebo/launch/step_down.launch
Comment thread rm_gazebo/launch/step_down.launch
Comment thread rm_msgs/msg/DebugData.msg
Comment thread rm_gazebo/launch/step_down.launch
Comment thread rm_gazebo/worlds/step_down.world
Comment thread rm_referee/src/main.cpp Outdated
Comment thread rm_referee/src/main.cpp Outdated
Comment thread rm_common/include/rm_common/filters/kalman_filter.h
Comment thread rm_common/include/rm_common/decision/heat_limit.h Outdated
Copilot AI review requested due to automatic review settings May 1, 2026 08:00
Refactor main loop to simplify structure and remove exception handling.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rm_gazebo/worlds/step_down.world
Comment thread rm_common/include/rm_common/filters/kalman_filter.h
Comment thread rm_gazebo/worlds/step_down.world
Comment thread rm_common/include/rm_common/decision/heat_limit.h
Comment thread rm_common/include/rm_common/DebugDataPublisher.h
Comment thread rm_referee/src/ui/trigger_change_ui.cpp
Comment thread rm_msgs/msg/DebugData.msg
Comment thread rm_gazebo/worlds/step_down.world
@2194555 2194555 merged commit 2485af6 into rm-controls:master May 1, 2026
7 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 79 to 87
template <typename T1>
void clear(const Eigen::MatrixBase<T1>& x)
{
x_ = x;
inited = true;
K_ = DMat<T>::Zero(n_, m_);
P_ = DMat<T>::Zero(n_, m_);
P_new_ = DMat<T>::Zero(n_, n_);
P_.setIdentity();
P_new_.setIdentity();
}
Copy link

Copilot AI May 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clear(const Eigen::MatrixBase<T1>& x) now calls P_new_.setIdentity(), but P_new_ is never resized in the constructor (only P_ is). This leaves P_new_ as 0x0, and the next update() will hit Eigen dimension assertions / produce invalid math. Resize P_new_ to (n_, n_) in the ctor (or inside clear(x)) before setting it to identity.

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +16
/**
* @brief Debug data publisher. Supports adding/updating named variables and batch publishing.
*/
class DebugDataPublisher
{
public:
/**
Copy link

Copilot AI May 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This public header introduces DebugDataPublisher into the global namespace. To avoid collisions for downstream users (and to match the pattern used by other non-template utility classes here, e.g. rm_common::LinearInterp / rm_common::PowerLimit), consider wrapping the class in namespace rm_common.

Copilot uses AI. Check for mistakes.
</include>
23

<!-- push robot_description to factory an222322d spawn robot in gazebo -->
Copy link

Copilot AI May 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in the XML comment: an222322d looks accidental. Replace it with and (or remove it) so the comment reads coherently.

Suggested change
<!-- push robot_description to factory an222322d spawn robot in gazebo -->
<!-- push robot_description to factory and spawn robot in gazebo -->

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants