Skip to content

slower head movement for defender #1876

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JackyBloxx
Copy link
Contributor

Why? What?

make the defender look around slower too reduce the wobble from the look around motion

Fixes #1730

ToDo / Known Issues

If this is a WIP describe which problems are to be fixed.

Ideas for Next Iterations (Not This PR)

If there are some improvements that could be done in a next iteration, describe them here.

How to Test

look if the defender look around slower than the other rolles

@schluis schluis self-assigned this Jun 13, 2025
Copy link
Contributor

@schluis schluis left a comment

Choose a reason for hiding this comment

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

Sorry for the delay. I forgot about this, please feel free to remind me next time.

Minor thing, otherwise 👍🏻

let maximum_movement = context.parameters.maximum_velocity
* context.cycle_time.last_cycle_duration.as_secs_f32();
let maximum_movement = match context.world_state.robot.role {
types::roles::Role::DefenderLeft | types::roles::Role::DefenderRight => {
Copy link
Contributor

Choose a reason for hiding this comment

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

please import roles::Role instead of qualifying it here

@JackyBloxx JackyBloxx enabled auto-merge July 4, 2025 09:18
@@ -36,6 +37,7 @@ pub struct CycleContext {
cycle_time: Input<CycleTime, "cycle_time">,
has_ground_contact: Input<bool, "has_ground_contact">,
motion_selection: Input<MotionSelection, "motion_selection">,
world_state: Input<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.

I don't like the practice of using the world state as an input outside of behavior, the interface is way too wide.
Currently only the look_at motion also does this, even though it only needs a ground to field.
You only need the role here, so use that directly.

In general, I think motion information should only be carried inside the MotionCommand, but that needs a larger refactor I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Request for Review
Development

Successfully merging this pull request may close these issues.

post-game task: make defenders look around slower
3 participants