aiwc / test_world

AI World Cup simulation environment
MIT License
7 stars 12 forks source link

Modify PROTO files to be compatible with Webots R2018b #34

Closed stefaniapedrazzi closed 6 years ago

stefaniapedrazzi commented 6 years ago

Modify PROTO files to be compatible with Webots R2018b:

chshong commented 6 years ago

Is it okay to add static tag to Placement.proto? It seems to be working with static tag but it uses math.random to randomly add spectator models to the stadium where the seed comes from os.time().

stefaniapedrazzi commented 6 years ago

With the static flag, the spectators are still added randomly in the stadium when the simulation is open or when the world is completely reloaded (desktop version only), i.e. when pressing this button

but the stadium is not regenerated when the simulation is reset from the web interface using this button:

So it is strongly suggested to use this flag also for Placement.proto because recreating the whole stadium could take long.

chshong commented 6 years ago

Ah, got it. Thank you.

Shall I put the static flag also to Banners.proto then? It includes some procedural parts.

stefaniapedrazzi commented 6 years ago

Yes, it would be good to add the static tag to all the procedural PROTO files.

chshong commented 6 years ago

Would it also be meaningful for adding the tag to the soccerrobot protos too? Would it not be meaningful since the same proto is used ten times with different field values to place ten robots?

stefaniapedrazzi commented 6 years ago

Yes these are the other PROTO files to which it would be good to add the static flag as well:

The static tag is not a problem for PROTO models used many times as soon as they doesn't contain any random functionality. This tag tells Webots that the PROTO model can be read and evaluated only once for all the instances. But it has not to be used if you want that all the instances use a different random functionality.