Skip to content

Shared Autonomy Challenge

The goal of the shared autonomy challenge (see here, section 2) is ...

Setup

The autonomous robots have odd jersey numbers and the remote-controlled robots have even ones. At the beginning of each half, the remote-controlled robot must always have the greater jersey number, e.g. a pair such as (2, 3) is not allowed. Otherwise, the SetupPosesProvider will assign the wrong starting positions to the robots.

There are three scenarios related to this challenge. For a half in which the team is attacking, the scenario SharedAutonomyAttacker must be deployed. For a half in which the team is defending, SharedAutonomyDefender must be used instead. It is important to deploy the correct scenario, because the setup poses and the decision, whether the autonomous robot is allowed to score or not, depend on it. The third scenario SharedAutonomyRemote is never deployed to actual robots. It is only used in the simulator for the avatar that visualizes the information sent by the remote-controlled robot.

Setup for the shared autonomy challenge

At the beginning of a half, the robots are placed at the positions as shown in the image. For the attacking team (left), the remote controlled robot is placed inside the center circle, because it has to perform the kick-off. For the defending team (right), the autonomous robot must be the goalkeeper. It also has to wear a goalkeeper jersey.

SimRobot Scenes

There are a number of SimRobot scenes related to this challenge. They are all located in Config/Scenes/OtherScenes:

  • SharedAutonomyAttacker.ros2: Allows testing an attacking team in simulation. One robot of the black team is autonomous, the other one is remote-controlled. The opponents are just dummies. The user interface for the remote-controlled robot is found under the name remote.
  • SharedAutonomyDefender.ros2: Allows testing a defending team in simulation. The blue goalkeeper is autonomous. The red remote-controlled robot is the field player. Otherwise everything is the same as above.
  • SharedAutonomyGame.ros2: The scene contains both the attacking and the defending team. In this case, there are two user interfaces for the two remote-controlled robots, called remoteAttacker and remoteDefender.
  • SharedAutonomyRemote.ros2: This scene provides the user interface for controlling a physical robot. The control PC must be on the same network as the remote-controlled robot. In this scene, a robot of team number 5, i.e. B-Human, is controlled.
  • SharedAutonomyRemote2.ros2: The same as above, but in this scene, a robot of team number 70, i.e. B-Team, is controlled. With the two scenes, a complete half can be tested on a real field, using two remote PCs.
  • SharedAutonomyReplay.ros2: A scene for replaying logs recorded by the remote-controlled robot. The player number in the log file must match the rules for being the remote-controlled robot. Otherwise, the code might not initialize correctly.

2D View

3D View

The 3D view uses a standard feature of SimRobot, which allows to display individual objects from the scene graph in a separate view. The view has to be configured the first time it is used. SimRobot will then remember this configuration when the same scene file is opened again.

Setting up the View

These are the steps to setup the view:

  1. From the Scene Graph, open RoboCup.puppets.remote (or both RoboCup.puppets.remoteAttacker and RoboCup.puppets.remoteDefender in case of the scene SharedAutonomyGame.ros2).
  2. In the view that opens, select Origin|Object Position from the popup menu.
  3. Also select Drawings Rendering|Occlusion|Transparent from the popup menu.
  4. Use the mouse to place and zoom the robot similar to the screenshot shown below. You can drag around the scene, rotate it by pressing Shift while dragging, and use the mouse wheel, two-finger-dragging, or a pinch gesture to zoom.

3D view

Information Shown in the View

The robot shown in the view mimics the motion of the remote-controlled robot. Two rectangles show the camera images taken by the robot in the direction it is currently looking. The robot's estimated position on the field is shown by drawing the entire field relative to the robot. The robot's ball model is visualized as an transparent orange sphere. Other robots are shown as transparent cylinders in the jersey color of the player (if it was detected correctly).

Please note that the perspective of the camera images and the 3D drawings is not the same. Therefore, objects might appear in a different location in one of the images than in the 3D visualization.

The robot's feet are surrounded by a ring that indicates the directions to different objects on the field. The direction to the ball is shown in orange. The directions to other robots are depicted in their jersey colors. Just outside the ring, the directions to the two goals are shown, again marked by the team colors. The larger a ring segment is, the closer the object.

On the shoulders of the robot, the current score is depicted (left: goals scored; right: goals conceded; these are actually points instead of goals in simulation). At the top of the jersey, the remaining time in the half is shown. Below, either the current game state, the current set play, or the fact that the robot is penalized can be seen. During a set play and the first 10 seconds after a kick-off as well as when the robot is penalized, the remaining time is shown below. In case of a set play or a kick-off, an arrow next to the remaining time in the half indicates the attacking team (left: own team; right: opponent team).

Gamepad Control

The remote control with a gamepad is inactive by default. To activate it, the SharedAutonomyRequest must be provided by JoystickControl instead of the SharedAutonomyHandler. For the real robot, this requires editing the threads.cfg in both the SharedAutonomyAttacker and SharedAutonomyDefender scenarios. However in simulation, it is possible to switch the provider by pressing the kick mode button (see below) on the gamepad once.

The gamepad control is meant to be used in combination with the 3D view, i.e. from an egocentric perspective of the robot.

Control Modes

The gamepad control is split into four different control modes. The walk mode is the default and the other three ones can be activated by continuously pressing a specific button. The use of the different analog sticks and buttons is shown in the figure below.

Gamepad control scheme

  • In the walk mode, the left analog stick is used to walk forward and sideways with the robot. The further the stick is pressed, the faster the robot moves. The robot is turned by pressing the right stick left or right. Again, the turn speed is proportional to how far the stick is pressed. Please note that walking against the ball does not count as having intentionally played the ball, as required by the indirect kick rule.
  • In the pass mode, the robot tries to pass to the teammate.
  • In the dribble mode, the robot dribbles in the direction that is indicated with the left analog stick. The 3D view also shows this direction as an orange arrow originating from the position of the ball. If the analog stick is not moved, the robot keeps dribbling in (globally) the same direction.
  • In the kick mode, the robot tries to kick to a point that is indicated through the left analog stick. The target position is also indicated by an orange arrow. Again, if the analog stick is not moved after a target was picked, the target position stays the same.

In pass mode, dribble mode, and kick mode, the robot is automatically switching to a different action if the requested one cannot be executed. For instance, it might duel with an opponent for the ball.

Head Control

The head can be moved through the vertical axis of the right analog stick (tilt) and the analog triggers or the shoulder buttons of the gamepad. If the gamepad is equipped with analog triggers, they can be used to gradually set a pan direction for the head. With the digital shoulder buttons, only the maximum pan angle can be commanded. Since the head only pans with a certain speed, this still allows to shortly look into a certain direction and then release the button to turn back.

If neither the buttons nor the vertical axis of the right analog stick are pressed, the robot performs its default head motion.

Standing and Sitting Down

For convenience, it is also possible to let the robot stand or sit down. This is achieved with two buttons on the directional pad. Once the robot is standing, the stand button toggles between the normal stand and the high stand.

Both standing and sitting can be exited by starting to walk in walk mode.


Last update: May 17, 2024