Add RMU 2.0.0 support#312
Merged
Merged
Conversation
✅ Deploy Preview for rm-control ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR updates the referee protocol/data-model to support RMU 2.0.0 by extending several protocol structs and their corresponding ROS messages, and wiring the new fields through the Referee::unpack() decoding path.
Changes:
- Extend
GameRobotHp,GameRobotStatus,RadarMarkData,SentryInfo, andRadarWirelessEnemyRobotBuffprotocol definitions for RMU 2.0.0. - Publish newly added protocol fields into updated
rm_msgs/msg/referee/*message definitions. - Update
referee.cppunpack logic to populate and publish the new fields.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| rm_referee/src/referee.cpp | Decodes and publishes newly added RMU 2.0.0 fields (HP/status/radar/sentry/buff). |
| rm_referee/include/rm_referee/common/protocol.h | Updates packed protocol structs/bitfields to match RMU 2.0.0 wire format. |
| rm_msgs/msg/referee/SentryInfo.msg | Adds enhanced posture + remaining-time fields for sentry info. |
| rm_msgs/msg/referee/RadarWirelessEnemyRobotBuff.msg | Adds “main status” fields for enemy robots. |
| rm_msgs/msg/referee/RadarMarkData.msg | Adds additional radar marking/countermeasure flags. |
| rm_msgs/msg/referee/GameRobotStatus.msg | Adds bullet_speed_limit. |
| rm_msgs/msg/referee/GameRobotHp.msg | Adds damage_difference and enemy outpost/base HP. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| game_robot_status_data.shooter_cooling_limit = game_robot_status_ref.shooter_cooling_limit; | ||
| game_robot_status_data.shooter_cooling_rate = game_robot_status_ref.shooter_cooling_rate; | ||
| game_robot_status_data.chassis_power_limit = game_robot_status_ref.chassis_power_limit; | ||
| game_robot_status_data.bullet_speed_limit = game_robot_status_ref.bullet_speed_limit; |
| memcpy(&sentry_info_ref, rx_data + 7, sizeof(rm_referee::SentryInfo)); | ||
| const uint32_t sentry_info_bits = sentry_info_ref.sentry_info; | ||
| const uint16_t sentry_info_2_bits = sentry_info_ref.sentry_info_2; | ||
| const uint64_t sentry_info_3_bits = sentry_info_ref.sentry_info_3; |
Comment on lines
325
to
+331
| typedef struct | ||
| { | ||
| uint8_t dart_remaining_time; | ||
| uint8_t dart_last_aim_state : 3; | ||
| uint8_t enemy_total_hit_received : 3; | ||
| uint8_t dart_current_target : 2; | ||
| uint8_t reserved; | ||
| uint16_t dart_last_aim_state : 3; | ||
| uint16_t enemy_total_hit_received : 3; | ||
| uint16_t dart_current_target : 3; | ||
| uint16_t reserved : 7; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
常规更新新的裁判系统协议