Skip to content

Shift Click can Now Move Robot#3411

Merged
Mr-Anyone merged 20 commits into
UBC-Thunderbots:masterfrom
Mr-Anyone:move_robot_click_pr
May 15, 2025
Merged

Shift Click can Now Move Robot#3411
Mr-Anyone merged 20 commits into
UBC-Thunderbots:masterfrom
Mr-Anyone:move_robot_click_pr

Conversation

@Mr-Anyone
Copy link
Copy Markdown
Contributor

Description

Shift click can now move robot. You have to enable a layer on the thunderscope called MovementFieldTestLayer.

Testing Done

Tested on a field.

Resolved Issues

None

Review Checklist

  • Function & Class comments: All function definitions (usually in the .h file) should have a javadoc style comment at the start of them. For examples, see the functions defined in thunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.
  • Remove all commented out code
  • Remove extra print statements: for example, those just used for testing
  • Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue

@Mr-Anyone
Copy link
Copy Markdown
Contributor Author

Fun fact, this also work with ai vs ai.

You can play around with it and see bang bang trajectory.

@itsarune itsarune requested review from a team, Andrewyx, annieisawesome2 and zuperzane and removed request for a team November 30, 2024 11:08
Comment thread src/software/thunderscope/gl/layers/gl_movement_field_test_layer.py Outdated
Comment thread src/software/thunderscope/gl/layers/gl_movement_field_test_layer.py Outdated
logger.warning("There are no friendly robots on the field.")
return

robot_id = self.friendly_robot_on_field[0]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe it should use the closest robot to the point?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

would we want to move specific robots to various points? maybe we could have a field / dropdown where we select the robot to move first, and then every shift-click after that moves that robot only

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Or you could implement as shift click to select, then click to move?

Copy link
Copy Markdown
Contributor

@itsarune itsarune left a comment

Choose a reason for hiding this comment

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

looks good! left some nits...

Comment thread src/software/thunderscope/gl/layers/gl_movement_field_test_layer.py Outdated
Comment thread src/software/thunderscope/gl/layers/gl_movement_field_test_layer.py Outdated
Comment thread src/software/thunderscope/gl/layers/gl_movement_field_test_layer.py Outdated
Comment thread src/software/thunderscope/widget_setup_functions.py Outdated
@Mr-Anyone
Copy link
Copy Markdown
Contributor Author

New Changes

  1. Shift+Alt+Control will select the robot you want to move
  2. Shift+Alt will move the selected robot to fix shift click conflict with ball.

Comment thread src/software/thunderscope/gl/layers/gl_movement_field_test_layer.py Outdated
Copy link
Copy Markdown
Contributor

@itsarune itsarune left a comment

Choose a reason for hiding this comment

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

very minor nit

…er.py

Co-authored-by: itsarune <42703774+itsarune@users.noreply.github.com>
itsarune
itsarune previously approved these changes Jan 3, 2025
Copy link
Copy Markdown
Contributor

@itsarune itsarune left a comment

Choose a reason for hiding this comment

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

Awesome!

itsarune
itsarune previously approved these changes Jan 6, 2025
Copy link
Copy Markdown
Contributor

@GrayHoang GrayHoang left a comment

Choose a reason for hiding this comment

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

Minor grammar and writing.

)

field_test_movement_layer = gl_movement_field_test_layer.GLMovementFieldTestLayer(
"Field Test Layer", full_system_proto_unix_io
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would it be better to say something like field movement layer?

Copy link
Copy Markdown
Contributor Author

@Mr-Anyone Mr-Anyone Jan 10, 2025

Choose a reason for hiding this comment

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

I am not quite sure what to do anymore. It was original called Movement FieldTest Layer, but @itsarune suggested that it be called Field Test Layer.

tbh, I do think Field Movement Layer makes more sense that Field Test Layer.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@potatoisagender's suggestion is good. "Field Movement Layer" is better

)
if closest_robot is None:
logger.warning(
"No robot founds. Are you sure there is friendly robot on field?"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
"No robot founds. Are you sure there is friendly robot on field?"
"No robots found. Are you sure there is friendly robot on field?"

@someone2060 someone2060 self-requested a review February 1, 2025 20:03
@itsarune
Copy link
Copy Markdown
Contributor

@Mr-Anyone status?

@Mr-Anyone
Copy link
Copy Markdown
Contributor Author

I did know realized I got a new round of review.

@Mr-Anyone Mr-Anyone requested a review from itsarune February 21, 2025 02:21
williamckha
williamckha previously approved these changes Mar 8, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2025

This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions Bot added the Stale Inactive pull requests label Apr 8, 2025
@itsarune itsarune removed the Stale Inactive pull requests label Apr 9, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2025

This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions Bot added the Stale Inactive pull requests label May 9, 2025
@GrayHoang GrayHoang removed the Stale Inactive pull requests label May 13, 2025
@williamckha williamckha requested a review from GrayHoang May 15, 2025 19:58
Copy link
Copy Markdown
Contributor

@GrayHoang GrayHoang left a comment

Choose a reason for hiding this comment

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

previous comment was addressed

@Mr-Anyone Mr-Anyone merged commit e945885 into UBC-Thunderbots:master May 15, 2025
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.

5 participants