diff --git a/test_pygame/test_ped_obstacle_forces.py b/test_pygame/test_ped_obstacle_forces.py index 603c4f8..9595984 100644 --- a/test_pygame/test_ped_obstacle_forces.py +++ b/test_pygame/test_ped_obstacle_forces.py @@ -5,12 +5,16 @@ from robot_sf.gym_env.robot_env_with_pedestrian_obstacle_forces import ( RobotEnvWithPedestrianObstacleForces, ) +from robot_sf.nav.svg_map_parser import convert_map from loguru import logger + def test_pedestrian_obstacle_avoidance(): - env = RobotEnvWithPedestrianObstacleForces( - map_def="maps/svg/map" - ) + logger.info("Testing Pedestrian and Obstacle forces") + map_def = convert_map("maps/svg_maps/example_map_with_obstacles.svg") + logger.debug(f"type map_def: {type(map_def)}") + env = RobotEnvWithPedestrianObstacleForces(map_def=map_def, debug=True) + logger.info("created envirnoment") env.reset() for _ in range(1000): rand_action = env.action_space.sample() @@ -20,6 +24,8 @@ def test_pedestrian_obstacle_avoidance(): env.reset() env.close() + if __name__ == "__main__": + logger.info("Testing Pedestrian and Obstacle forces") test_pedestrian_obstacle_avoidance() logger.info("All tests passed")