Add some other parameters for static obstacles generation/ boundary dimension.
train.config
change the train_episodes to 1000 for reducing the time to train. (Default: 10000)
crowd_sim.py
Read the new parameters introduced in the .config file and add some new logging.Info to report the current parameter states.
Implement generate_random_obstacles(): This method aims to randomly generate the static obstacles in the given range that were specified as square_width in the env.config and make sure they don't block the goal position of the robot.
In the existing method generate_random_human_position, make sure we call the generate_random_obstacles() method first. Besides, the code in the elif rule == 'static': is only for testing my implementation.
In the method generate_square_crossing_human(), make sure to also include checking the static obstacle when trying to randomly generate humans.
Add method generate_robot_goal() to randomly generate robot goal position
In method reset(), make sure we can regenerate the same environment setup when using the same random seed
In method step(), add the observation from static obstacles into the variable ob and the environment needs to check if the robot hit the static obstacles as well. In addition, the environment needs also to check if the robot is out of the boundary.
Implemet generate_valid_goal() method and human_reset_goal() mehod
In method render(), plot the static obstacle with the same fashion (but with filled black color), and also draw the blue rectangle representing the boundary.
Scripts folder
These are all for testing if my implementation is correct.
env.config
train.config
train_episodes
to 1000 for reducing the time to train. (Default: 10000)crowd_sim.py
logging.Info
to report the current parameter states.generate_random_obstacles()
: This method aims to randomly generate the static obstacles in the given range that were specified assquare_width
in the env.config and make sure they don't block the goal position of the robot.generate_random_human_position
, make sure we call thegenerate_random_obstacles()
method first. Besides, the code in theelif rule == 'static':
is only for testing my implementation.generate_square_crossing_human()
, make sure to also include checking the static obstacle when trying to randomly generate humans.generate_robot_goal()
to randomly generate robot goal positionreset()
, make sure we can regenerate the same environment setup when using the same random seedstep()
, add the observation from static obstacles into the variableob
and the environment needs to check if the robot hit the static obstacles as well. In addition, the environment needs also to check if the robot is out of the boundary.human_reset_goal()
mehodrender()
, plot the static obstacle with the same fashion (but with filled black color), and also draw the blue rectangle representing the boundary.Scripts folder