Robot Game  v1.0
Research Track part 1 - Assignment
rg_controller_py Namespace Reference

Functions

def get_new_target ()
 Ask the service for a new target to reach. More...
 
def rg_controller_callback (pose)
 The main callback of the node. More...
 
def controller_on_shutdown ()
 Called when shutdown signal is raised. More...
 

Variables

 sim_input = None
 Topic handler from the simulation environment (Subscriber) 'base_pose_ground_truth'. More...
 
 sim_output = None
 Topic handler to the simulation environment (Publisher) 'cmd_vel'. More...
 
 srv_check_target = None
 Service entry point for checking if the target is reached. More...
 
 srv_get_target = None
 Service entry point for requiring a nwe random target. More...
 
 srv_get_vel = None
 Service entry point for getting a linear planar twist. More...
 
 xt = None
 The actual target (geometry_msgs/Point) More...
 

Function Documentation

◆ controller_on_shutdown()

def rg_controller_py.controller_on_shutdown ( )

Called when shutdown signal is raised.

Definition at line 99 of file rg_controller_py.py.

◆ get_new_target()

def rg_controller_py.get_new_target ( )

Ask the service for a new target to reach.

Returns
rg_get_target_srvResponse the new target

Definition at line 51 of file rg_controller_py.py.

◆ rg_controller_callback()

def rg_controller_py.rg_controller_callback (   pose)

The main callback of the node.

Parameters
pose(nav_msgs/Odometry) the actual posture of the robot

This callback is called when a new position comes from the simulated environment via 'base_pose_ground_truth'.
It works in this way:

  1. get the actual pose from the received message
  2. check if the target was reached; if yes, ask for a new target
  3. generate the velocity to give the robot for approaching the goal
  4. publish the new velocity

Definition at line 78 of file rg_controller_py.py.

Variable Documentation

◆ sim_input

rg_controller_py.sim_input = None

Topic handler from the simulation environment (Subscriber) 'base_pose_ground_truth'.

Definition at line 29 of file rg_controller_py.py.

◆ sim_output

rg_controller_py.sim_output = None

Topic handler to the simulation environment (Publisher) 'cmd_vel'.

Definition at line 32 of file rg_controller_py.py.

◆ srv_check_target

rg_controller_py.srv_check_target = None

Service entry point for checking if the target is reached.

Definition at line 35 of file rg_controller_py.py.

◆ srv_get_target

rg_controller_py.srv_get_target = None

Service entry point for requiring a nwe random target.

Definition at line 38 of file rg_controller_py.py.

◆ srv_get_vel

rg_controller_py.srv_get_vel = None

Service entry point for getting a linear planar twist.

Definition at line 41 of file rg_controller_py.py.

◆ xt

def rg_controller_py.xt = None

The actual target (geometry_msgs/Point)

Definition at line 44 of file rg_controller_py.py.