-
Notifications
You must be signed in to change notification settings - Fork 57
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
base: main
Are you sure you want to change the base?
Conversation
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.
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 => { |
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.
please import roles::Role
instead of qualifying it here
@@ -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">, |
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 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.
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