Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doubled wall spacing #2282

Closed
wants to merge 3 commits into from
Closed

doubled wall spacing #2282

wants to merge 3 commits into from

Conversation

piman51277
Copy link

Completes RC SW Tutorials.

@piman51277
Copy link
Author

image

@piman51277
Copy link
Author

Evidence of topic publish:
bananas
blueberries

@piman51277
Copy link
Author

Feedback:
I liked the tutorial, but it should have included the note about adding to cmake when we had to make a new position.

@jacksherling jacksherling changed the base branch from ros2 to position-assignment October 9, 2024 00:23
@jacksherling jacksherling changed the base branch from position-assignment to ros2 October 9, 2024 00:23
@jacksherling jacksherling force-pushed the aiden-lee/robocup-sw-tutorial branch from d149f07 to 17f1f1d Compare October 9, 2024 00:27
Copy link
Contributor

@jacksherling jacksherling left a comment

Choose a reason for hiding this comment

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

Great job overall!

Please review the comments and close this PR when you're finished (no need to actually make the changes for the tutorial)! Feel free to let me know if you have any questions.

std::string Runner::get_current_state() { return "Runner"; }

bool inPosition(rj_geometry::Point current, rj_geometry::Point target, double tolerance) {
return current.dist_to(target) < tolerance;
Copy link
Contributor

Choose a reason for hiding this comment

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

take a look at the check_is_done function. When the plan succeeds it returns true. This way thresholding for plans is abstracted away from strategy

return std::nullopt;
}

bool Runner::shot_on_goal_detected(WorldState* world_state) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like you left some extra stuff from another position here

IDLING, // doing nothing
BLOCKING, // blocking the ball from reaching the goal
CLEARING, // clearing the ball out of the goal box
PREPARING_SHOT, // pivot around ball in preparation for shot
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar to above, let's remove stuff not used for runner


team_fruit_pub_ = create_publisher<std_msgs::msg::String>("/team_fruit", rclcpp::QoS(10));

if (blue_team) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this work is already done in the subscription

referee::topics::kTeamColorTopic, rclcpp::QoS(1).transient_local(),
[this](rj_msgs::msg::TeamColor::SharedPtr color) { // NOLINT
team_fruit_pub_ =
create_publisher<std_msgs::msg::String>("/team_fruit", rclcpp::QoS(10));
Copy link
Contributor

Choose a reason for hiding this comment

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

why create a new publisher on every subscription callback?

rclcpp::TimerBase::SharedPtr tick_timer_;

// The position of each robot
std::array<strategy::Positions, kNumShells> positions_;
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove the unused variables here

@piman51277 piman51277 closed this Oct 9, 2024
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.

2 participants