-
Notifications
You must be signed in to change notification settings - Fork 16
Fix / Clean up look at handling #723
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
base: main
Are you sure you want to change the base?
Conversation
…bstacle avoidance there and it looks cooler
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.
Pull Request Overview
This PR renames SEARCH_BALL
to TRACK_BALL
in the head behavior system and refactors the head movement implementation to track the last known ball position instead of searching for it. The change improves ball tracking behavior by making it more direct and removes duplicated code between different head modes.
- Renamed
SEARCH_BALL
head mode toTRACK_BALL
throughout the codebase - Refactored head mover to track ball position using filter data instead of search patterns
- Updated behavior files to use new tracking mode and removed outdated actions
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
bitbots_msgs/msg/HeadMode.msg | Updated message definition to rename SEARCH_BALL to TRACK_BALL |
bitbots_motion/bitbots_head_mover/src/move_head.cpp | Added ball position tracking, refactored head mode handling, and fixed parameter references |
bitbots_motion/bitbots_head_mover/config/head_config.yml | Removed deprecated search_ball configuration parameters |
bitbots_misc/bitbots_teleop/scripts/teleop_keyboard.py | Updated teleop to use new TRACK_BALL mode |
bitbots_behavior/bitbots_body_behavior/bitbots_body_behavior/behavior_dsd/*.dsd | Updated behavior files to use TrackBall and LookAtFieldFeatures actions |
bitbots_behavior/bitbots_body_behavior/bitbots_body_behavior/behavior_dsd/actions/head_modes.py | Replaced LookAtBall and SearchBall with new LookAt and TrackBall actions |
bitbots_behavior/bitbots_blackboard/bitbots_blackboard/capsules/misc_capsule.py | Updated type alias to use TRACK_BALL |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
# Search for Ball and track it if found | ||
self.head_mode_msg.head_mode = HeadMode.SEARCH_BALL | ||
assert int(key) == HeadMode.SEARCH_BALL | ||
self.head_mode_msg.head_mode = HeadMode.TRACK_BALL |
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.
We should also rename this in the key-binding printout
Summary
Make
SearchBall
usable again and rename it toTrackBall
. So we have a head mode that tries to track the ball no matter what. If we want to search the ball or track the ball is decided by the user / the behavior to be consistent with the rest of the behavior. Duplication between theFieldFeatures
andSearchBall
is removed. A few small bugs in the head mover are closed.As no localization is performed during the demo behavior, we use the tracking head mode there, as it looks better and makes the demo a bit more dynamic. The normal behavior is also adapted to use the new tracking head mode instead of the action call during passes etc..
A generic
LookAt
action is added to the behavior and can be used to e.g. look a specific parts of the field.Checklist
colcon build