robocup-at-work / atwork-commander

This repository hosts the completly new developed Refbox for the @Work RoboCup league.
MIT License
7 stars 6 forks source link

atwork-commander

pipeline status pipeline status

Complete reimplementation of the old Referee Box (Refbox) for the @Work-League of RoboCup.

This Refbox is a native ROS application. However, it aims to enable multiple communication backends through individual plugins. Additionally, a RViz GUI will be developed, which will provide enhanced visualization capabilities for referees and visitors / spectators. Generation of tasks conforming to the rule book are configurable using the ROS parameters in order to be easily adaptable for any future changes in rules.

HowTo

Starting the Refbox

  1. Start the core and com components:
    roslaunch atwork_commander atwork_commander.launch
  2. Generate a task using the CLI:
    roslaunch atwork_commander generate.launch task:=<task to generate>
  3. Wait for robots to register
  4. Start the task execution using the CLI:

    roslaunch atwork_commander start.launch

    For testing the Refbox without any robot a fake robot may be used using the example_robot: roslaunch atwork_commander example_robot.launch

    Configurations

    • All launch files share the refbox parameter to specify the Refbox to connect to. Multiple Refboxes can be started on the same PC using multiple namespaces.
    • When more information is needed, the verbose parameter can be enabled for more verbose logging.
    • If a task needs to be sent to only some registered robots, the robots can be specified in the start command using the robots parameter in the format "/"

    Runtime control

    • the forward launch file enables manual state change from PREPARATION to EXECUTION:
      roslaunch atwork_commander forward.launch
    • the stop launch file enables stopping of the currently running task:
      roslaunch atwork_commander stop.launch

Easy to use script

You can use the script "default_bringup" which automates the refbox startup. Its purpose is mainly for new teams so that they can create bagfiles for tasks more easilys You can also use it for normal refbox startup, however you will need to kill the nodes afterwards manually.. The cleanup is done automatically if you set the _immediate param to True

Use e.g. this command to start the script (replace the task for the one you want):

rosrun atwork_commander default_bringup _task:=BTT1 _immediate:=True _record_rosbag:=True

NOTE: This requires rosbash to be installed: sudo apt install ros-melodic-rosbash ros-melodic-rosbash-params

You can also modify the script to use other launchfiles than the default ones provided within this package. This is especially useful for your own arena configurations and robot descriptions.

Easy rosbag generation

There is a special launch file to generate rosbags for testing robots:

roslaunch atwork_commander generate_rosbag.launch task:=<BMT|BTT1|BTT2|ATT1|ATT2|FINAL>

Additional parameters to configure bag generation are:

The generated files are typically named <id>_<task>.bag. The default path for the bags is atwork_commander/common/bags/test_<task>.bag.

Documentation

Currently in the docu folder. Multiple '.graphml' files showing the design of the architecture and the future GUI (Viewable and editable with e.g. yEd Graph Editor) Source Code Reference

Issues, Milestones and Releases

Sub-Components

The following section will briefly summarize the individual components purpose. For further information, please have a look at the respective sub-components' README.md.

atwork_commander_core

State-Machine implementation, Pub/Sub and Service implementations to couple all sub-components.

atwork_commander_msgs

Contains ROS messages and service descriptions necessary to communicate within the Refbox.

atwork_commander_com

Will contain multiple communication plugins to enable flexible communication links to various types of robots.

atwork_commander_gui

Aims to enable visualization and control of multiple aspects of a Task before, during and after a run.

atwork_commander_gen

Enable dynamic task generation according to specified task types of the @Work RuleBook.

TODOs