From ddbba1af6169b39f2fc5452e5807e698781a691e Mon Sep 17 00:00:00 2001 From: ll7 Date: Tue, 12 Mar 2024 12:55:53 +0100 Subject: [PATCH 1/5] feat: Update rotation frequency in dev_objects.json --- code/agent/config/dev_objects.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/agent/config/dev_objects.json b/code/agent/config/dev_objects.json index c1d5e69b..86a88ba3 100644 --- a/code/agent/config/dev_objects.json +++ b/code/agent/config/dev_objects.json @@ -112,7 +112,7 @@ "yaw": 0.0 }, "range": 50, - "rotation_frequency": 15, + "rotation_frequency": 10, "channels": 64, "upper_fov": 10, "lower_fov": -30, From 3bf10efedf2669d6830afd25dc4ab3c883c96505 Mon Sep 17 00:00:00 2001 From: ll7 Date: Tue, 12 Mar 2024 13:38:19 +0100 Subject: [PATCH 2/5] fix: Update LIDAR yaw angle to 90 degrees --- code/agent/src/agent/agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/agent/src/agent/agent.py b/code/agent/src/agent/agent.py index 22b053c7..2c2b6130 100755 --- a/code/agent/src/agent/agent.py +++ b/code/agent/src/agent/agent.py @@ -55,7 +55,7 @@ def sensors(self): 'type': 'sensor.lidar.ray_cast', 'id': 'LIDAR', 'x': 0.0, 'y': 0.0, 'z': 1.70, - 'roll': 0.0, 'pitch': 0.0, 'yaw': 0.0 + 'roll': 0.0, 'pitch': 0.0, 'yaw': math.radians(90.0) }, { 'type': 'sensor.other.radar', From 7b69cc580afae3aaa76196115892127c961cba1f Mon Sep 17 00:00:00 2001 From: ll7 Date: Tue, 12 Mar 2024 17:34:10 +0100 Subject: [PATCH 3/5] fix: Update control loop rate and fixed delta seconds to 0.1 [Bug]: Improve Lidar point cloud quality #214 should be fixed by this commit --- build/docker/agent/Dockerfile | 2 +- build/docker/agent/Dockerfile_Submission | 2 +- code/agent/launch/agent.launch | 2 +- code/agent/launch/dev.launch | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/docker/agent/Dockerfile b/build/docker/agent/Dockerfile index 2c6ce5ac..93b677b3 100644 --- a/build/docker/agent/Dockerfile +++ b/build/docker/agent/Dockerfile @@ -120,7 +120,7 @@ RUN echo 'pexpect' >> $SCENARIO_RUNNER_ROOT/requirements.txt && \ # install the leaderboard from GitHub leaderboard-2.0 branch ENV LEADERBOARD_ROOT=/opt/leaderboard RUN sudo mkdir $LEADERBOARD_ROOT && sudo chown $USERNAME:$USERNAME $LEADERBOARD_ROOT -RUN git clone -b leaderboard-2.0 --single-branch https://github.com/carla-simulator/leaderboard.git $LEADERBOARD_ROOT +RUN git clone -b leaderboard-2.0 --single-branch https://github.com/una-auxme/leaderboard $LEADERBOARD_ROOT RUN python -m pip install -r $LEADERBOARD_ROOT/requirements.txt RUN sudo mkdir /opt/leaderboard-py3 && sudo chown $USERNAME:$USERNAME /opt/leaderboard-py3 && \ ln -s $LEADERBOARD_ROOT/leaderboard /opt/leaderboard-py3/leaderboard && \ diff --git a/build/docker/agent/Dockerfile_Submission b/build/docker/agent/Dockerfile_Submission index 17fdcce6..bb6757d2 100644 --- a/build/docker/agent/Dockerfile_Submission +++ b/build/docker/agent/Dockerfile_Submission @@ -122,7 +122,7 @@ RUN echo 'pexpect' >> $SCENARIO_RUNNER_ROOT/requirements.txt && \ # install the leaderboard from GitHub leaderboard-2.0 branch ENV LEADERBOARD_ROOT=/opt/leaderboard RUN sudo mkdir $LEADERBOARD_ROOT && sudo chown $USERNAME:$USERNAME $LEADERBOARD_ROOT -RUN git clone -b leaderboard-2.0 --single-branch https://github.com/carla-simulator/leaderboard.git $LEADERBOARD_ROOT +RUN git clone -b leaderboard-2.0 --single-branch https://github.com/una-auxme/leaderboard $LEADERBOARD_ROOT RUN python -m pip install -r $LEADERBOARD_ROOT/requirements.txt RUN sudo mkdir /opt/leaderboard-py3 && sudo chown $USERNAME:$USERNAME /opt/leaderboard-py3 && \ ln -s $LEADERBOARD_ROOT/leaderboard /opt/leaderboard-py3/leaderboard && \ diff --git a/code/agent/launch/agent.launch b/code/agent/launch/agent.launch index 089c378a..3edf1f08 100644 --- a/code/agent/launch/agent.launch +++ b/code/agent/launch/agent.launch @@ -1,6 +1,6 @@ - + diff --git a/code/agent/launch/dev.launch b/code/agent/launch/dev.launch index cc1f148d..ddfae533 100644 --- a/code/agent/launch/dev.launch +++ b/code/agent/launch/dev.launch @@ -15,7 +15,7 @@ - + From d5ba47228951dcd4c5a65990e2f84adb2df94d7d Mon Sep 17 00:00:00 2001 From: ll7 Date: Tue, 12 Mar 2024 17:34:35 +0100 Subject: [PATCH 4/5] feat: add a b5 run_dev task --- build/Taskfile | 5 ++ build/docker-compose.dev.yaml | 90 +++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 build/docker-compose.dev.yaml diff --git a/build/Taskfile b/build/Taskfile index 9ad466af..b152bc75 100644 --- a/build/Taskfile +++ b/build/Taskfile @@ -11,6 +11,11 @@ task:run() { docker:compose up "$@" } +task:run_dev() { + xhost +local:docker + docker:compose -f docker-compose.dev.yaml up +} + task:restart() { container="$1" docker:compose restart "${container:-agent}" diff --git a/build/docker-compose.dev.yaml b/build/docker-compose.dev.yaml new file mode 100644 index 00000000..6ba17e3d --- /dev/null +++ b/build/docker-compose.dev.yaml @@ -0,0 +1,90 @@ +version: "3" + +services: + flake8: + image: alpine/flake8 + command: . + volumes: + - ../:/apps + + comlipy: + build: docker/comlipy + command: . + volumes: + - ../:/apps + + mdlint: + image: peterdavehello/markdownlint:0.32.2 + command: markdownlint . + volumes: + - ../:/md + + # based on https://github.com/ll7/paf21-1/blob/master/scenarios/docker-carla-sim-compose.yml + carla-simulator: + command: /bin/bash CarlaUE4.sh -quality-level=Epic -world-port=2000 -resx=800 -resy=600 -nosound -carla-settings="/home/carla/CarlaUE4/Config/CustomCarlaSettings.ini" + image: ghcr.io/una-auxme/paf23:leaderboard-2.0 + init: true + deploy: + resources: + limits: + memory: 16G + expose: + - 2000 + - 2001 + - 2002 + environment: + - XDG_RUNTIME_DIR=/tmp/runtime-carla + networks: + - carla + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix + - ./CustomCarlaSettings.ini:/home/carla/CarlaUE4/Config/CustomCarlaSettings.ini + + roscore: + image: ros:noetic + command: roscore + environment: + - ROS_MASTER_URI=http://roscore:11311 + - ROS_HOSTNAME=roscore + expose: + - 11311 + networks: + - ros + + agent: + build: + dockerfile: build/docker/agent/Dockerfile + args: + - USER_UID=${DOCKER_HOST_UNIX_UID:-1000} + - USER_GID=${DOCKER_HOST_UNIX_GID:-1000} + context: ../ + init: true + 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=paf23-carla-simulator-1 --track=MAP" + + logging: + driver: "local" + environment: + - DISPLAY + - ROS_MASTER_URI=http://roscore:11311 + - CARLA_SIM_HOST=carla-simulator + - ROS_HOSTNAME=agent + - XDG_RUNTIME_DIR=/tmp/runtime-carla + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix + # if you change the volume here also change the copy command + # in ``build/docker/build/Dockerfile + - ../:/workspace + # mount git config for dvc + - ../.gitconfig:/home/carla/.gitconfig + - ../:/workspace/ + networks: + - carla + - ros + +networks: + carla: + ros: From c852c22ccaafa34f27d2d34ce74a8f668d58b7d2 Mon Sep 17 00:00:00 2001 From: ll7 Date: Tue, 12 Mar 2024 17:41:42 +0100 Subject: [PATCH 5/5] fix: revert lidar rotation --- code/agent/src/agent/agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/agent/src/agent/agent.py b/code/agent/src/agent/agent.py index 2c2b6130..22b053c7 100755 --- a/code/agent/src/agent/agent.py +++ b/code/agent/src/agent/agent.py @@ -55,7 +55,7 @@ def sensors(self): 'type': 'sensor.lidar.ray_cast', 'id': 'LIDAR', 'x': 0.0, 'y': 0.0, 'z': 1.70, - 'roll': 0.0, 'pitch': 0.0, 'yaw': math.radians(90.0) + 'roll': 0.0, 'pitch': 0.0, 'yaw': 0.0 }, { 'type': 'sensor.other.radar',