rescue junior simplus

Select Sidearea

Robocup Junior Rescue Simulation Platform

World Configuration

World Configuration

World Configuration

In Simplus platform, the scoring system is automated meaning the system will analyze robot actions and update the team score according to the rules. The Simplus team made the game’s rules flexible by defining 4 config files. These files will ease the Technical Committee’s work by letting them make changes & improvements in league rules each year without changing the server code.

To put it in a nutshell, you can define what action, where, and how it will affect the robot and the team score by just one of TEXT.

Action Config

Action configuration can be set using server/actionconfig.txt. This configuration will define the available actions in the server defining the overall game’s rule. You can define as many actions as you want. Each line will define a new action and each action will be defined using 6 characteristics.

  - Action1's name;List of Action1's models;List of number of Action1's model;Action1's range;Action1's multiplier; Action1's Positive score ;Action1's Negetive score
  - Action2's name;List of Action2's models;List of number of each Action2's model;Action2's range;Action2's multiplier; Action2's Positive score ;Action2's Negetive score
  • The first characteristic is the Action’s name, the action that the robot should call to start the processing.
  • The second characteristic is the list of model’s names that are involved in the Action (you can find models in the simulator scene hierarchy).
  • The third characteristic is the list of a number of each involved model respectively.
  • The fourth characteristic is the Action’s range which defines the maximum acceptable distance between the position that the team claimed for the Action and the real position of the nearest model defined in the action in meters.
  • The next characteristic is the multiplier confident; if you want to multiply the team score by a static number if the action was successfully done you can point the multiplier here.
  • The nest characteristic belongs to the positive score which the team will get if the action was done successfully
  • And the negative score is the score that will affect the team’s core if the distance was greater. It should be mentioned that the negative score can be set to zero.

Sample actionconfig.txt:

functionX;Cuboid,Cylinder;6,4;10;1;5;-1
finish_game;start_title;1;0.5;1.1;10;-10

The example above means:

  • we have 6 Cuboid, and if the robot calls functionX while the distance between the robot and one of the Cuboid is less than 10 meters, the team score will be multiplied by 1 and 5 points will be added to the score, and the same thing will happen if the action called functionX while in less than 10 meters away from one of the four Cylinders. Otherwise, if the robot calls functionX the team will get 1 minus point.
  • if the robot calls finish_game while is in 0.5 meters away from the only start_tile object the team score will be multiplied by 1.1 and 10 extra points will be added, however, if the robot calls the finish_game while the distance to the center of the start_tile is more than 0.5 meters the team will get 10 minus points.

trapconfig

Trap configuration can be set using server/trapconfig.txt. This configuration will define the actions that the server will automatically check each cycle of the game. Most of the time, these actions will be used to define some limitations in the game and punishing the teams if they did something forbidden. You can define as many traps as you want. Each line will define a new trap and each trap will be defined using 6 characteristics.

- Trap1's name;List of Trap1's models;List of numbers of the Trap1's models;Trap1's range;Trap1's offset ;Trap1's score
- Trap2's name;List of Trap2's models;List of numbers of the Trap2's models;Trap2's range;Trap2's offset ;Trap2's score
  • The first characteristic is the Traps’ name which will be used in the server log in order to show the final result’s calculation.
  • The second characteristic is the list of model’s names that are involved in the Trap (can be found in simulator Scene Hierarchy).
  • The third characteristic is the list of a number of each involved model respectively.
  • The next characteristic is the range in the meter will be combined with the trap’s offset and defines weather the robot failed in the trap or not. In other words, it’s the minimum distance between the robot’s position and the real position of the nearest model defined in the trap with offset consideration.
  • The Trap’s score is the score that the robot will receive if it’s position meats the aforementioned condition. It should be mentioned that although the config file is named as a “trap” by setting the score a positive number, it can also be used as a reward.

Sample trapconfig.txt:

trap1;Cuboid;6;2;0;-2

if the robot distance from one of the 6 Cuboids gets less than 2 meters the team will get 2 minus points.

Victim Config

Victim configuration can be set using server/victimconfig.txt. This configuration will define the victim detection procedure. Each line will define a new action and each action will be defined using 6 characteristics.

#actionName; List of victim Objects; number of victim objects; maxAcceptableRangeFromvictimObject; ScoreForSuccess; ScoreForFailure
  • actionName defines the function that the robot should call for finding or rescuing a victim
  • List of victim Objects defines the list of victim models corresponding the actionName
  • maxAcceptableRangeFromvictimObject defines the maximum acceptable distance between the center of the robot the victim while detecting a victim in meters
  • ScoreForSuccess, & ScoreForFailure as might sound will be the added or subtracted points respectively if the action is accepted or not.

Sample victimconfig.txt:

find_victim;Victim_H_small;5;0.5;10;-5

if the robot calls find_victim while the distance between the robot and one of the 5 Victim_H_small models is less than 0.5 meters the team will get 10 points.

Checkpoint Config

Checkpoints configuration can be set using server/checkointconfig.txt. This configuration will define the actions that the server will automatically check each cycle of the game. Most of the time, these actions will be used to define some bonuses and checkpoint locations if robot relocation is needed. You can define as many checkpoints as you want. Each line will define a new checkpoint and each checkpoint will be defined using 6 characteristics.

# checkpoint name ; name of object ; number of object ; size of checkpoint tile; success score; failure socre

Game manager

In order to add the “Game manager” to the world, you should drag & drop the game_manager.ttm in your Scene. It should be mention that game_manager.ttm could be found in the “Model Browser” section of CoppeliaSim and in the root of the “Simplus” directory. For setting the “game duration” in “minute” format:

  1. Open the “Scene Hierarchy” section of CoppeliaSim
  2. Find the “Game_manager” model
  3. Double click on the “script icon” near the “Game_manager”
  4. Search for “game_duration” variable(Its default value is 8 minutes)
  -- Set game duration here --
  game_duration=8;
  1. press the following key corresponds to your OS in order to save the script
    • ctrl+ s (Windows/Ubuntu)
    • command + s (mac)
  2. close the script

Share this story:

Write a comment