Skip to content

Add UI for low battery state and series legged world configuration - #313

Merged
2194555 merged 4 commits into
rm-controls:masterfrom
WiseL00k:series_leg
Jul 19, 2026
Merged

Add UI for low battery state and series legged world configuration#313
2194555 merged 4 commits into
rm-controls:masterfrom
WiseL00k:series_leg

Conversation

@WiseL00k

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 12, 2026 12:49
@netlify

netlify Bot commented Jul 12, 2026

Copy link
Copy Markdown

Deploy Preview for rm-control ready!

Name Link
🔨 Latest commit fd2b7ac
🔍 Latest deploy log https://app.netlify.com/projects/rm-control/deploys/6a538db6321e2200076ad464
😎 Deploy Preview https://deploy-preview-313--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.

Copilot AI left a comment

Copy link
Copy Markdown

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 adds new referee UI elements for (1) a low-capacity/battery warning flash and (2) a legged chassis “leg theta” visualization, and introduces a new Gazebo world + launch file for a “series_legged” environment. It also changes the referee online/offline timeout behavior.

Changes:

  • Add LegThetaTimeChangeGroupUi to render a 2-link leg visualization driven by rm_msgs/LeggedChassisStatus, including new subscription plumbing in RefereeBase.
  • Add CapacityRunOutFlashUi driven by PowerManagementSampleAndStatusData, with hysteresis to reduce UI flicker.
  • Add series_legged.world and series_legged_world.launch for Gazebo simulation setup.

Reviewed changes

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

Show a summary per file
File Description
rm_referee/src/ui/time_change_ui.cpp Implements leg IK point calculation and graph updates for the new leg-theta UI group.
rm_referee/include/rm_referee/ui/time_change_ui.h Declares/configures the LegThetaTimeChangeGroupUi and its YAML-driven parameters.
rm_referee/src/ui/flash_ui.cpp Implements low-capacity flash UI update + display behavior.
rm_referee/include/rm_referee/ui/flash_ui.h Declares/configures CapacityRunOutFlashUi thresholds and state tracking.
rm_referee/src/referee.cpp Adjusts offline timeout used to mark referee data as online/offline.
rm_referee/src/referee_base.cpp Adds legged chassis status subscription and hooks it into UI update flow; wires new flash UI into capacity callback.
rm_referee/include/rm_referee/referee_base.h Adds new subscriber/callback and UI member pointers/containers.
rm_gazebo/worlds/series_legged.world Adds a new Gazebo SDF world model for the “series_legged” environment.
rm_gazebo/launch/series_legged_world.launch Adds a roslaunch entrypoint to bring up Gazebo with the new world and spawn the robot.

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

if (d < 1e-6)
{
// Avoid division by zero; place foot a tiny bit below the hip.
v = Eigen::Vector2d(0.0, 1e-3);
Comment on lines +395 to +397
const Eigen::Vector2d A(origin_point_[0], origin_point_[1]);
const Eigen::Vector2d B(foot_point_[0], foot_point_[1]);

Comment on lines +9 to +12
#include <rm_msgs/LeggedChassisStatus.h>

#include <algorithm>

}
else
{
ROS_WARN("LegThetaTimeChangeGroupUi config 's member 'data' not defined.");
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(find rm_gazebo)/worlds/series_legged.world"/>
<arg name="paused" value="false"/>
<arg name="use_sim_time" value="true"/>r
Comment on lines +31 to +34
<model name='series_legged_world'>
<static>1</static>
<static>1</static>
<link name='series_legged_world_link'>
Comment on lines +70 to +71
<static>1</static>
</model>
Comment on lines +53 to 54
if (ros::Time::now() - last_get_data_time_ > ros::Duration(5.0))
base_.referee_data_is_online_ = false;
Copilot AI review requested due to automatic review settings July 12, 2026 12:53

Copilot AI left a comment

Copy link
Copy Markdown

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 9 out of 10 changed files in this pull request and generated 7 comments.

if (d < 1e-6)
{
// Avoid division by zero; place foot a tiny bit below the hip.
v = Eigen::Vector2d(0.0, 1e-3);
Comment on lines +423 to +429
void LegThetaTimeChangeGroupUi::updateConfig()
{
const Eigen::Vector2d A(origin_point_[0], origin_point_[1]);
const Eigen::Vector2d B(foot_point_[0], foot_point_[1]);

for (auto& it : graph_vector_)
{
Comment on lines +478 to +486
// Virtual rod is rendered as multiple short segments (dash effect).
XmlRpc::XmlRpcValue virtual_rod_config = line_config;
if (rpc_value.hasMember("config") && rpc_value["config"].hasMember("virtual_rod_color"))
virtual_rod_config["color"] = rpc_value["config"]["virtual_rod_color"];
if (rpc_value.hasMember("config") && rpc_value["config"].hasMember("virtual_rod_width"))
virtual_rod_config["width"] = rpc_value["config"]["virtual_rod_width"];
else
virtual_rod_config["width"] = 1;

}
else
{
ROS_WARN("LegThetaTimeChangeGroupUi config 's member 'data' not defined.");
Comment on lines +31 to +36
<model name='series_legged_world'>
<static>1</static>
<static>1</static>
<link name='series_legged_world_link'>
<pose>-2 -0.6 0.0 0 0 0</pose>
<visual name='visual'>
Comment on lines +68 to +71
<gravity>1</gravity>
</link>
<static>1</static>
</model>
Comment on lines +21 to +25
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(find rm_gazebo)/worlds/series_legged.world"/>
<arg name="paused" value="false"/>
<arg name="use_sim_time" value="true"/>r
<arg name="gui" value="true"/>
@2194555
2194555 merged commit 963fb9d into rm-controls:master Jul 19, 2026
7 checks passed
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