From 6ceee1850379fcd469886838813ebbfe422d117e Mon Sep 17 00:00:00 2001 From: robertik10 Date: Mon, 4 Dec 2023 14:02:55 +0100 Subject: [PATCH] fix: pr comments --- build/docker-compose.yml | 4 ++-- code/agent/config/rviz_config.rviz | 2 +- code/perception/src/dataset_generator.py | 17 ++++++++++++----- code/perception/src/sensor_filter_debug.py | 1 - code/requirements.txt | 1 - doc/06_perception/11_kalman_filter.md | 1 - 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/build/docker-compose.yml b/build/docker-compose.yml index 1545f945..a68e97c4 100644 --- a/build/docker-compose.yml +++ b/build/docker-compose.yml @@ -57,8 +57,8 @@ services: tty: true shm_size: 2gb #command: bash -c "sleep 10 && python3 /opt/leaderboard/leaderboard/leaderboard_evaluator.py --debug=0 --routes=/opt/leaderboard/data/routes_devtest.xml --agent=/opt/leaderboard/leaderboard/autoagents/npc_agent.py --host=carla-simulator --track=SENSORS" - command: bash -c "sleep 10 && roslaunch agent/launch/dev.launch" - #command: bash -c "sleep 10 && sudo chown -R carla:carla ../code/ && sudo chmod -R a+w ../code/ && python3 /opt/leaderboard/leaderboard/leaderboard_evaluator.py --debug=0 --routes=/opt/leaderboard/data/routes_devtest.xml --agent=/workspace/code/agent/src/agent/agent.py --host=carla-simulator --track=MAP" + #command: bash -c "sleep 10 && roslaunch agent/launch/dev.launch" + command: bash -c "sleep 10 && sudo chown -R carla:carla ../code/ && sudo chmod -R a+w ../code/ && python3 /opt/leaderboard/leaderboard/leaderboard_evaluator.py --debug=0 --routes=/opt/leaderboard/data/routes_devtest.xml --agent=/workspace/code/agent/src/agent/agent.py --host=carla-simulator --track=MAP" logging: driver: "local" environment: diff --git a/code/agent/config/rviz_config.rviz b/code/agent/config/rviz_config.rviz index 0d43d6b1..7064cc88 100644 --- a/code/agent/config/rviz_config.rviz +++ b/code/agent/config/rviz_config.rviz @@ -166,7 +166,7 @@ Visualization Manager: Offset: X: 0 Y: 0 - Z: 0 #39 + Z: 39 Pose Color: 255; 85; 255 Pose Style: None Queue Size: 10 diff --git a/code/perception/src/dataset_generator.py b/code/perception/src/dataset_generator.py index 58f5d4b4..fd849d11 100755 --- a/code/perception/src/dataset_generator.py +++ b/code/perception/src/dataset_generator.py @@ -246,15 +246,21 @@ def create_argparse(): help='set up an empty world and spawn ego vehicle', default=False ) + argparser.add_argument( + '--town', + metavar='T', + default='Town12', + help='town to load' + ) return argparser if __name__ == '__main__': - towns = ["Town01", "Town02", "Town03", "Town04", "Town05", "Town06", - "Town07", "Town10", "Town11", "Town12"] - town = towns[2] + towns = {"Town01", "Town02", "Town03", "Town04", "Town05", "Town06", + "Town07", "Town10", "Town11", "Town12"} argparser = create_argparse() args = argparser.parse_args() + town = args.town output_dir = args.output_dir host = args.host port = args.port @@ -262,10 +268,11 @@ def create_argparse(): client = carla.Client(host, port) client.set_timeout(30) - world = client.load_world(town) + world = client.load_world(town) if use_empty_world else client.get_world() world.wait_for_tick() - output_dir = os.path.join(output_dir, town[-2:]) + output_dir = os.path.join(output_dir, world.get_map().name[-2:]) + print("Saving images to {}".format(output_dir)) if use_empty_world: ego_vehicle = setup_empty_world(client) diff --git a/code/perception/src/sensor_filter_debug.py b/code/perception/src/sensor_filter_debug.py index caba249a..6ea53e7a 100755 --- a/code/perception/src/sensor_filter_debug.py +++ b/code/perception/src/sensor_filter_debug.py @@ -17,7 +17,6 @@ from xml.etree import ElementTree as eTree # import carl____a remove ___ to use # import rospy -# from carla_msgs.msg import CarlaLo GPS_RUNNING_AVG_ARGS: int = 10 diff --git a/code/requirements.txt b/code/requirements.txt index 228a7204..c15e4287 100644 --- a/code/requirements.txt +++ b/code/requirements.txt @@ -11,4 +11,3 @@ scipy==1.10.0 xmltodict==0.13.0 py-trees==2.1.6 numpy==1.23.5 -pymap3d==3.0.0 diff --git a/doc/06_perception/11_kalman_filter.md b/doc/06_perception/11_kalman_filter.md index 1efc34a1..8eadb14b 100644 --- a/doc/06_perception/11_kalman_filter.md +++ b/doc/06_perception/11_kalman_filter.md @@ -81,7 +81,6 @@ The measurement matrix H is defined as: [0, 0, 0, 0, 0, 1] The process covariance matrix Q is defined as: Q = np.diag([0.005, 0.005, 0.001, 0.0001]) - ``` Then 3 Steps are run in the frequency of the `control_loop_rate`: