From c53205eadbe197cd684e566260bbeb330ef0c825 Mon Sep 17 00:00:00 2001 From: Burak Ozter Date: Mon, 4 Nov 2024 11:47:21 -0400 Subject: [PATCH] https://git.spirirobotics.com/Spiri/spiri-sdk/pulls/6#issuecomment-823 and https://git.spirirobotics.com/Spiri/spiri-sdk/pulls/6#issuecomment-824 --- .env | 33 ++++++++++++--------------------- docker-compose.yml | 17 ++++++++--------- 2 files changed, 20 insertions(+), 30 deletions(-) diff --git a/.env b/.env index 546f8cd..695498e 100644 --- a/.env +++ b/.env @@ -1,28 +1,19 @@ -#Manual edit not needed unless desired set of DRONE_SYS_ID's are different. -DRONE_SYS_ID=1 #sim_drone.py increments this env variable. -#this is used for multi-vehicle sim. first/single vehicle would have these. +DRONE_SYS_ID=1 TRACKER_INSTANCE=0 SERIAL0_PORT=5760 SITL_PORT=5501 MAVROS2_PORT=14560 MAVROS1_PORT=14561 -#This is the vehicle ardupilot will use. Default value is for SITL + Gazebo -#E.g. "-v copter" , "-v rover" -ARDUPILOT_VEHICLE="-v ArduCopter -f gazebo-iris --model=JSON" - -#these below are used in spawn_drones.sh to create the world with the correct entities. -#Number of drones to be spawned in the gazebo world. -SIM_DRONE_COUNT=2 -#This is not needed to be modified. FDM_PORT_IN=9002 -#The world file you want to use. -WORLD_FILE_NAME="citadel_hill_world.sdf" -#World name in your world file. Not the same as world file name necessarily. -#Important for spawning entities in the correct world. -WORLD_NAME="citadel_hill" -#Vehicle model folder name where model.config and model.xacro.sdf are present. -DRONE_MODEL="spiri_mu" -#Gstreamer UDP Port for each drone GSTREAMER_UDP_PORT=5600 -#ros 1 -ROS_MASTER_URI=http://0.0.0.0:11311 \ No newline at end of file +ROS_MASTER_URI=http://0.0.0.0:11311 + + +ARDUPILOT_VEHICLE="-v ArduCopter -f gazebo-iris --model=JSON" +WORLD_FILE_NAME="citadel_hill_world.sdf" +WORLD_NAME="citadel_hill" +DRONE_MODEL="spiri_mu" + + +SIM_DRONE_COUNT=1 +GCS_PORT=14550 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 613aa63..37d83e6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,6 @@ version: "3.8" services: gui-tools: - runtime: nvidia env_file: - .env build: @@ -36,13 +35,13 @@ services: # restart: unless-stopped # command: /bin/bash -c "source /opt/ros/foxy/setup.bash && rvis2" # Replace with the actual command to run Gazebo Ignition profiles: [ui] - # deploy: - # resources: - # reservations: - # devices: - # - driver: cdi - # device_ids: - # - nvidia.com/gpu=all + deploy: + resources: + reservations: + devices: + - driver: cdi + device_ids: + - nvidia.com/gpu=all ardupilot: env_file: @@ -70,7 +69,7 @@ services: --out udpout:0.0.0.0:$MAVROS2_PORT --out udpout:0.0.0.0:$MAVROS1_PORT --sitl 127.0.0.1:$SITL_PORT - --out udp:0.0.0.0:14550 + --out udp:0.0.0.0:$GCS_PORT profiles: - uav-sim ipc: host