To run this simulation scenario, we follow the standard approach of first launching a Gazebo environment—part of the cartpole_description package with the model of the robot—and, afterward, we will start the training process:
T1 $ roslaunch cartpole_description main.launch
The result in the Gazebo window should be similar to the following screenshot. Although this is a 3D environment, the model itself behaves like a 2D model, since the cart pole can only slide along the direction of the guide:
For the training process, we have the launch file in the other ROS package, that is, cartpole_v0_training:
T2 $ conda activate gym
T2 $ (gym) roslaunch cartpole_dqn start_training.launch
Be aware that before running the launch file, you have to activate the gym Python environment, which is where you installed OpenAI Gym.
You...