Skip to content

Fix calculations for robot status messages when estop is on #3780

Description

@nycrat

Description of the task

When launching thunderscope with ./tbots.py run thunderscope_main --run_blue --interface=... or with --run_diagnostics, there is a robot status view on the left panel. This displays RobotStatus messages which includes the NetworkStatus:

message NetworkStatus
{
    reserved 4;

    // Indicates the time elapsed since the last vision packet was received in ms
    double ms_since_last_vision_received = 1;

    // Indicates the time elapsed since the last primitive packet was received in ms
    double ms_since_last_primitive_received = 2;

    // Indicates the percentage of primitive packets lost during communication
    uint32 primitive_packet_loss_percentage = 3;
}

There are two issues that need to be resolved with the calculation of the RTT (round trip time) as well as proto loss rate.

  1. If the robot has just thunderloop and received no primitives yet, the RTT will be a huge number, since it has never received any primitives.
Image
  1. When the estop is stopped, the proto loss rate is not updated at all. Then when the estop going into playing mode, the proto loss rate jumps really high. There is probably a bug where the number of expected protos is steadily incrementing which shouldn't be happening.
Screen.Recording.2026-06-16.at.13.03.34.mov

Acceptance criteria

  • The RTT calculated when a robot hasn't received any primitives yet is displayed as N/A
  • The proto loss rate is updated when the estop is stopped (should approach 0% since we are sending no protos) and it doesn't jump up to 100% after estop is in play state again

Blocked By

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIssues that describe a bug and possibly a suggested solutionDifficulty - 7Well-defined tasks that require some understanding about the relevant system and tools

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions