Decision Module
1.0
ICRA2020 AI Challenge Northwestern Polytechnical University Aoxiang Team Strategy Code
|
Public Member Functions | |
def | __init__ (self) |
def | render (self, mode='human') |
def | start_game (self) |
def | get_blue1_ground_truth (self) |
def | get_blue2_ground_truth (self) |
def | get_red1_ground_truth (self) |
def | get_red2_ground_truth (self) |
ShootInfo | get_red2_shoot_info (self) |
ShootInfo | get_red1_shoot_info (self) |
ShootInfo | get_blue1_shoot_info (self) |
ShootInfo | get_blue2_shoot_info (self) |
RobotStatus | get_blue1_robot_status (self) |
RobotStatus | get_blue2_robot_status (self) |
RobotStatus | get_red1_robot_status (self) |
RobotStatus | get_red2_robot_status (self) |
def | get_buff_zones_status (self) |
def | get_game_status (self) |
def | get_game_survivor (self) |
def | reinit_sensors (self) |
def | get_obs (self) |
def | is_roll_over (self) |
![]() | |
def | __init__ (self, robot_name_space, controllers_list, reset_controls, start_init_physics_parameters=True, reset_world_or_sim="SIMULATION") |
def | seed (self, seed=None) |
def | step (self, action) |
def | reset (self) |
def | close (self) |
Static Private Member Functions | |
def | _get_continuous_data_num (list data_list, finish=-1) |
Private Attributes | |
_robot_strategy_status | |
_my_color | |
_acion_id_pub | |
_robot_pose_pub | |
_reset_referee_pub | |
Superclass for all CubeSingleDisk environments.
def firefly_env.FireflyEnv.__init__ | ( | self | ) |
Initializes a new FireflyEnv environment. To check any topic we need to have the simulations running, we need to do two things: 1) Unpause the simulation: without that th stream of data doesnt flow. This is for simulations that are pause for whatever the reason 2) If the simulation was running already for some reason, we need to reset the controlers. This has to do with the fact that some plugins with tf, dont understand the reset of the simulation and need to be reseted to work properly. The Sensors: The sensors accesible are the ones considered usefull for AI learning. Args:
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Checks that all the sensors, publishers and other simulation systems are operational.
Reimplemented from robot_gazebo_env.RobotGazeboEnv.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Checks that all the publishers are working :return:
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Calculates the reward to give based on the observations given. 我方血量:+k1×血量/2000 敌方血量:-k1×血量/2000 敌方死:+MAX 我方死:-MAX 敌方子弹量:-k2×敌方子弹/100 我方子弹量:+k2×我方子弹/100 执行上一拍策略:2^(-x) 连续执行次数x
|
private |
Initial configuration of the environment. Can be used to configure initial state and extract information from the simulation.
Reimplemented from robot_gazebo_env.RobotGazeboEnv.
|
private |
|
private |
|
staticprivate |
获得从finish向前连续的数据个数 :param finish: 计数的开始位置(从后往前) :return: 连续的数据个数
|
private |
Returns the observation.
Reimplemented from robot_gazebo_env.RobotGazeboEnv.
|
private |
Inits variables needed to be initialised each time we reset at the start of an episode.
Reimplemented from robot_gazebo_env.RobotGazeboEnv.
|
private |
Checks if episode done based on observations given.
Reimplemented from robot_gazebo_env.RobotGazeboEnv.
|
private |
判断若我方两个机器人是否长时间静止 :return:
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Applies the given action to the simulation.
Reimplemented from robot_gazebo_env.RobotGazeboEnv.
|
private |
Sets the Robot in its init pose
Reimplemented from robot_gazebo_env.RobotGazeboEnv.
def firefly_env.FireflyEnv.get_blue1_ground_truth | ( | self | ) |
RobotStatus firefly_env.FireflyEnv.get_blue1_robot_status | ( | self | ) |
ShootInfo firefly_env.FireflyEnv.get_blue1_shoot_info | ( | self | ) |
def firefly_env.FireflyEnv.get_blue2_ground_truth | ( | self | ) |
RobotStatus firefly_env.FireflyEnv.get_blue2_robot_status | ( | self | ) |
ShootInfo firefly_env.FireflyEnv.get_blue2_shoot_info | ( | self | ) |
def firefly_env.FireflyEnv.get_buff_zones_status | ( | self | ) |
def firefly_env.FireflyEnv.get_game_status | ( | self | ) |
def firefly_env.FireflyEnv.get_game_survivor | ( | self | ) |
def firefly_env.FireflyEnv.get_obs | ( | self | ) |
def firefly_env.FireflyEnv.get_red1_ground_truth | ( | self | ) |
RobotStatus firefly_env.FireflyEnv.get_red1_robot_status | ( | self | ) |
ShootInfo firefly_env.FireflyEnv.get_red1_shoot_info | ( | self | ) |
def firefly_env.FireflyEnv.get_red2_ground_truth | ( | self | ) |
RobotStatus firefly_env.FireflyEnv.get_red2_robot_status | ( | self | ) |
ShootInfo firefly_env.FireflyEnv.get_red2_shoot_info | ( | self | ) |
def firefly_env.FireflyEnv.is_roll_over | ( | self | ) |
def firefly_env.FireflyEnv.reinit_sensors | ( | self | ) |
This method is for the tasks so that when reseting the episode the sensors values are forced to be updated with the real data and
def firefly_env.FireflyEnv.render | ( | self, | |
mode = 'human' |
|||
) |
def firefly_env.FireflyEnv.start_game | ( | self | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
firefly_env.FireflyEnv.blue1_ground_truth_pose |
firefly_env.FireflyEnv.blue1_robot_status |
firefly_env.FireflyEnv.blue1_shoot_info |
firefly_env.FireflyEnv.blue2_ground_truth_pose |
firefly_env.FireflyEnv.blue2_robot_status |
firefly_env.FireflyEnv.blue2_shoot_info |
firefly_env.FireflyEnv.buff_zone_status |
firefly_env.FireflyEnv.controllers_list |
firefly_env.FireflyEnv.game_status |
firefly_env.FireflyEnv.game_survivor |
firefly_env.FireflyEnv.my_robots_pose |
firefly_env.FireflyEnv.rate |
firefly_env.FireflyEnv.red1_ground_truth_pose |
firefly_env.FireflyEnv.red1_robot_status |
firefly_env.FireflyEnv.red1_shoot_info |
firefly_env.FireflyEnv.red2_ground_truth_pose |
firefly_env.FireflyEnv.red2_robot_status |
firefly_env.FireflyEnv.red2_shoot_info |
firefly_env.FireflyEnv.robot_name_space |