Skip to content

rj_protos Cleanup - #2582

Open
sanatd33 wants to merge 21 commits into
mainfrom
sd/rj_protos
Open

sanatd33 wants to merge 21 commits into
mainfrom
sd/rj_protos

Conversation

@sanatd33

Copy link
Copy Markdown
Contributor

Description

Cleaning up rj_protos. Removes any unused protobuf files, and refactors the rest to come from git submodules to the source of truth repos (https://github.com/RoboCup-SSL/ssl-game-controller/ and https://github.com/RoboCup-SSL/ssl-simulation-protocol/)

Associated / Resolved Issue

Resolves ClickUp card

Steps to Test

  1. run colon build

Expected result: It builds

Key Files to Review

  • CMakeLists.txt

Review Checklist

  • [x ] Docstrings: All methods and classes should have the file appropriate docstrings which follow the guidelines in the "Contributing" page of our docs.
  • [x ] Remove extra print statements: Any print statements used for debugging should be removed
  • [x ] Tag reviewers: Tag some people for review and ping them on Slack

sanatd33 and others added 16 commits September 13, 2026 20:10
automated style fixes

Co-authored-by: sanatd33 <sanatd33@users.noreply.github.com>
automated style fixes

Co-authored-by: sanatd33 <sanatd33@users.noreply.github.com>
automated style fixes

Co-authored-by: sanatd33 <sanatd33@users.noreply.github.com>
@sanatd33
sanatd33 requested review from CameronLyon and N8BWert and removed request for N8BWert September 30, 2026 00:54
github-actions Bot and others added 5 commits September 29, 2026 20:55
automated style fixes

Co-authored-by: sanatd33 <sanatd33@users.noreply.github.com>

@N8BWert N8BWert left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes seem good to me. I ran this in sim and with the external referee and things seem to work as expected so PR looks good to me.

@CameronLyon CameronLyon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left some comments, but basically complete on the functionality of rj_protos. I'd say check out the "dubious ownership" issue and see if my other two comments need any changes, then merge when you feel ready.

Comment thread util/ubuntu-setup
Comment on lines +171 to +173
if ! $NO_SUBMODULES; then
make update-submodules
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This might fail under "dubious ownership in repository". You got something earlier:

Become root
if [ $UID -ne 0 ]; then
echo "-- Becoming root"
exec sudo $0 $@
fi

ubuntu-setup restarts itself with sudo, and the new git submodule update sits after that restart, so Git runs as root. Then in that root term, it then tries to use git commands within "make update-submodules":

update-submodules:
git submodule update --init --recursive

Unless we got some setting in our repo that says otherwise, this will cause github to refuse this request under the reasoning that this new user (root), is attempting to change a repo owned by someone else (the actual user of the repo). I think you have to switch it back to the user in order for this to work:

if ! $NO_SUBMODULES; then
if [ -n "${SUDO_USER:-}" ]; then
sudo -u "$SUDO_USER" -- make -C "$BASE" update-submodules
else
make -C "$BASE" update-submodules
fi
fi

Comment thread src/rj_protos/README.md
| **Current responsibilities** | _List the responsibilities currently owned by this package._ |
| **Out of scope** | _State what this package must not own or attempt to solve._ |
| **Plain-language purpose** | Contains protobuf files for SSL-owned interfaces such as game controller and vision processor. |
| **Current responsibilities** | Owns the protocol for recieving data from SSL-owned interfaces. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

*receiving


set(PROTO_SRCS)
set(PROTO_HDRS)
foreach(proto ${GC_PROTOS} ${SIM_PROTOS})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

SIM_PROTO_SRC is src/rj_protos/ssl-simulation-protocol/proto, set on line 12. file(READ) opens ssl_simulation_config.proto and the rest of SIM_PROTOS. If the submodule was never checked out, CMake stops with its own vague message, along the lines of file failed to open for reading plus that path. Nothing in that message says the submodule is missing or what command to run, so maybe add a check + a fatal error message indicating an easy fix for any user who encounters this:

if(NOT EXISTS ${proto_root})
message(FATAL_ERROR
"Proto submodule is missing at ${proto_root}. "
"From the repo root, run: make update-submodules")

This branch has not been deployed

No deployments
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.

4 participants