Skip to content
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

Validate that we can make the arena dynamic and interactive #216

Closed
2 tasks
PeterJCLaw opened this issue Nov 15, 2020 · 5 comments
Closed
2 tasks

Validate that we can make the arena dynamic and interactive #216

PeterJCLaw opened this issue Nov 15, 2020 · 5 comments

Comments

@PeterJCLaw
Copy link
Member

For SR2021 it's looking like we're going to have a dynamic arena. We need to work out how we'd actually do that.

  • prove a mechanism for robots to communicate to the arena supervisor so they can get feedback about their actions
  • prove that we can move the walls around from a supervisor

There is some overlap here with #18 though I think we can approach them separately, at least for validating the things we need to work can work.

The outcome here might just be a proof-of-concept branch, though it would obviously be great to have a full PR implementing this.

I suggest that we probably want a separate Supervisor to handle the arena interactions, if Webots supports having more than one.

@PeterJCLaw PeterJCLaw added this to the SR2021 Kickstart milestone Nov 15, 2020
@PeterJCLaw PeterJCLaw mentioned this issue Nov 15, 2020
@PeterJCLaw
Copy link
Member Author

#197 (comment)

I'd only been looking into #18 to check how viable it is. I've also only been looking into the scoring feedback element rather than dynamic arena. Whilst I should be able to do it, i'd very much like not to, as there's enough on my plate already. (Happy to share the PoC information with someone, though).

@RealOrangeOne is that just notes? If so, could you add them to this issue? Or is it a branch? If so, perhaps you could push it and then link it from this issue?

@RealOrangeOne
Copy link
Member

It's not a branch, it's more fundamentals.

If territories are defined as a .proto file, and have a color key, then we can dynamically change that in webots.

supervisor.getFromId(123).getField("color").setSFColor([0.5, 0.5, 0.5])

We'd need to get the ids of each territory (easily done through supervisor.getSelected()), poll the location of a robot (robot.getPosition), check if the robot is in a territory (some maths), and then change the colour and log that it happened (as above).

In theory the same can also be done for moving walls, however there are physics issues around that, so i'd recommend just having the walls vanish (.remove()).

@PeterJCLaw
Copy link
Member Author

It looks like we're going to do tower claiming and knowledge via radio emitters and receivers. This allows them to also be used for location too 👍.
Each Robot will have both an emitter and a receiver, as will each tower. There will be a separate supervisor which looks after the arena stuff and logs out any changes. We have checked that multiple supervisors is supported.

We plan to put each robot's transmitter on a different frequency and the towers (together) on a third. The towers will listen for everything; the robots will only listen to the towers. Robots will be able to impersonate towers, but our rule around good sporting conduct covers not doing that.

Since location information can be extracted from the location towers, we'll drop the camera.

@WillB97
Copy link
Contributor

WillB97 commented Nov 21, 2020

This was done in #224

@WillB97 WillB97 closed this as completed Nov 21, 2020
@PeterJCLaw
Copy link
Member Author

Have we checked that we can interactively move objects?

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

No branches or pull requests

3 participants