Autonomous Racing  1
f1tenth Project Group of Technical University Dortmund, Germany
train_policy_gradient.PolicyGradientTrainingNode Class Reference
Inheritance diagram for train_policy_gradient.PolicyGradientTrainingNode:
Collaboration diagram for train_policy_gradient.PolicyGradientTrainingNode:

Public Member Functions

def __init__ (self)
 
def update_policy (self)
 
def select_action (self, state)
 
def get_reward (self)
 
def on_complete_episode (self)
 
def on_complete_step (self, state, action, reward, next_state)
 
- Public Member Functions inherited from training_node.TrainingNode
def __init__ (self, policy, actions, laser_sample_count, max_episode_length, learn_rate)
 
def on_crash (self, _)
 
def get_episode_summary (self)
 
def on_complete_episode (self)
 
def on_receive_laser_scan (self, message)
 
def on_complete_step (self, state, action, reward, next_state)
 
def check_car_orientation (self)
 
def on_model_state_callback (self, message)
 
- Public Member Functions inherited from reinforcement_learning_node.ReinforcementLearningNode
def __init__ (self, actions, laser_sample_count)
 
def perform_action (self, action_index)
 
def convert_laser_message_to_tensor (self, message, use_device=True)
 
def on_receive_laser_scan (self, message)
 

Public Attributes

 policy_history
 
 current_episode_rewards
 
- Public Attributes inherited from training_node.TrainingNode
 policy
 
 max_episode_length
 
 episode_count
 
 episode_length
 
 total_step_count
 
 cumulative_reward
 
 is_terminal_step
 
 net_output_debug_string
 
 episode_length_history
 
 cumulative_reward_history
 
 state
 
 action
 
 car_position
 
 car_orientation
 
 drive_forward
 
 steps_with_wrong_orientation
 
 episode_start_time_real
 
 episode_start_time_sim
 
 optimizer
 
 episode_result_publisher
 
- Public Attributes inherited from reinforcement_learning_node.ReinforcementLearningNode
 scan_indices
 
 laser_sample_count
 
 actions
 
 drive_parameters_publisher
 

Detailed Description

ROS node to train the Policy Gradient model

Definition at line 20 of file train_policy_gradient.py.

Constructor & Destructor Documentation

def train_policy_gradient.PolicyGradientTrainingNode.__init__ (   self)

Definition at line 24 of file train_policy_gradient.py.

Member Function Documentation

def train_policy_gradient.PolicyGradientTrainingNode.get_reward (   self)

Definition at line 79 of file train_policy_gradient.py.

Here is the caller graph for this function:

def train_policy_gradient.PolicyGradientTrainingNode.on_complete_episode (   self)

Definition at line 101 of file train_policy_gradient.py.

Here is the call graph for this function:

Here is the caller graph for this function:

def train_policy_gradient.PolicyGradientTrainingNode.on_complete_step (   self,
  state,
  action,
  reward,
  next_state 
)

Definition at line 105 of file train_policy_gradient.py.

Here is the caller graph for this function:

def train_policy_gradient.PolicyGradientTrainingNode.select_action (   self,
  state 
)

Definition at line 67 of file train_policy_gradient.py.

Here is the caller graph for this function:

def train_policy_gradient.PolicyGradientTrainingNode.update_policy (   self)

Definition at line 40 of file train_policy_gradient.py.

Here is the caller graph for this function:

Member Data Documentation

train_policy_gradient.PolicyGradientTrainingNode.current_episode_rewards

Definition at line 38 of file train_policy_gradient.py.

train_policy_gradient.PolicyGradientTrainingNode.policy_history

Definition at line 37 of file train_policy_gradient.py.


The documentation for this class was generated from the following file: