6. Control Policy Module

6.1. Launch RL model

Run the control_policy.py script to load the trained model and process the images.

RL module would receive images from perception module and output corresponding actions to the AGV controller.

First of all, launch ROS in the terminal:

roscore

Then, you need to activate the RL environment:

# Activate the RL Envrionment
source rlenv/bin/activate

After activation, use the following command to execute our code.

Argument
--port: Port that connect to the perception module.
If not specified, runs on default arguments.
Example Usage
# Run listener.py
(rlenv)$ python3 new_listener.py

6.2. Launch Goal-Receiver

Goal-Receiver will receive a success message when the AGV reaches the goal. After that, the message will be sent to the AGV controller immediately to stop the AGV.

Argument
--port: Port that connect to the planner module.
# If not specified, runs on default arguments.
Example Usage
(rlenv)$ python dummy.py

6.3. Launch AGV Controller

Run the controller.py script to launch the AGV controller.

(rlenv)$ python controller.py