-
Notifications
You must be signed in to change notification settings - Fork 186
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
doubled wall spacing #2282
Conversation
Feedback: |
d149f07
to
17f1f1d
Compare
There was a problem hiding this 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; |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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_; |
There was a problem hiding this comment.
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
Completes RC SW Tutorials.