Skip to content

Conversation

@jvogt23
Copy link
Contributor

@jvogt23 jvogt23 commented Nov 24, 2025

Description

Added Seeker coordinator to handle seekers and seeker points without requiring several robots to keep track of each other.
Single source of truth for current seeker points.

Associated / Resolved Issue

Resolves # or ClickUp card
Resolves Clickup Issue: 86b6ubv6c

Design Documents

Link

Steps to Test

Test Case 1

  1. Start the sim
  2. Hit play
  3. Seekers go brrrr

Expected result: Seekers go brrr and no weird Seeker requests and responses needed (except with the coordinator ofc)

Key Files to Review

Group 1

  • File 1: seeker_coordinator.hpp and .cpp
  • File 2: seeker_client.cpp and .hpp

Group 2

  • File 3: offense.cpp and .hpp
  • File 4: Seeker coordinator .msg files

Review Checklist

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

(Optional) Sub-issues (for drafts)

Note: if you find yourself breaking this PR into many smaller features, it may make sense to break up the PR into logical units based on these features.

  • Step 1
  • Step 2

@jvogt23 jvogt23 requested a review from petergarud January 9, 2026 18:59
Copy link
Contributor

@Squid5678 Squid5678 left a comment

Choose a reason for hiding this comment

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

some changes

rclcpp::Subscription<rj_msgs::msg::SeekingCoordinator>::SharedPtr subscription_;

bool am_i_member_{false};
rj_geometry::Point selected_target_{-1, -1};
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this initialized with -1?


std::string get_current_state() override;

void die() override;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: better name

SeekingCoordinator& operator=(SeekingCoordinator&&) = delete;

void service_callback(RequestPtr request, ResponsePtr response);
static rj_geometry::Point invalidPoint() { return rj_geometry::Point{-1, -1}; }
Copy link
Contributor

Choose a reason for hiding this comment

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

can we replace this invalidPoint() with just a null value once a robot leaves seeking?

client_ = node_->create_client<rj_msgs::srv::SeekingCoordinator>("seeking_coordinator_srv");
}

void SeekingClient::join_group(StatusCallback callback) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add a check for am_i_member_ prior to the callback to ensure that we aren't making repeated join_group() calls?

const FieldDimensions& field_dimensions) const {
return Seeker::calculate_open_point(3.0, .2, current_position, world_state, field_dimensions);
rj_geometry::Point SeekingCoordinator::get_open_point(
int robot_id, const WorldState world_state, rj_geometry::Point current_position,
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be const WorldState& world_state to avoid copying in the entire world state?

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