Skip to content

Various fixes for issues flagged by the 'ruff check' linter. #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 44 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
ed3c144
Update tel engine alt fields based on new proto
achanana Jun 10, 2025
0834c80
Fix home altitude bug
achanana Jun 10, 2025
cef7e10
Fix alt proto field bug in object engine
achanana Jun 10, 2025
a92e4a0
Merge branch 'main' into dev
achanana Jun 10, 2025
cfb03c8
Detected images live in drones dir
achanana Jun 10, 2025
f25ec0e
Bugfix: Invalid deref when no current TM
HRhoadesCMU Jun 10, 2025
596fdd4
Erroneous file duplication in different directory
HRhoadesCMU Jun 11, 2025
054ef30
Add files via upload
HRhoadesCMU Jun 11, 2025
67bc989
Fixed EOL chars
HRhoadesCMU Jun 11, 2025
21abf7e
Merge pull request #92 from HRhoadesCMU/main
achanana Jun 11, 2025
6b9f9b0
Fix hsv image location in streamlit
achanana Jun 11, 2025
4baee99
Adding a data stub call in the mission code to send the current task …
teiszler Jun 11, 2025
b2dfcfe
Adjust bearing range to be 0,360 from -180,180
teiszler Jun 12, 2025
0b1f73e
Adding current task to div icon and replaced fix for negative bearing…
teiszler Jun 12, 2025
4a8047e
Adding refresh rate to monitoring page.
teiszler Jun 12, 2025
a639fef
Add current task status.
teiszler Jun 12, 2025
6bacf63
Fix mission task update and altitude bugs
achanana Jun 12, 2025
7fe2b66
Fix detected object link in obj engine
achanana Jun 12, 2025
2ae1f16
Fix symlink relative path
achanana Jun 12, 2025
cc07b71
Expire drone telemetry data after a day
achanana Jun 13, 2025
08bdd0a
Check return value when connecting to drone
achanana Jun 14, 2025
34959e5
Only iterate through the telemetry for drones that are connected. Red…
teiszler Jun 16, 2025
74d4705
Perform geospatial db garbage collection periodically
achanana Jun 16, 2025
5acd08a
Adding a page for supported platforms (drones, companions, etc).
teiszler Jun 18, 2025
15d011f
Fix default val in set gimble pose
achanana Jun 18, 2025
f3c01ac
Obj engine hsv filename fix
achanana Jun 18, 2025
389b9ad
Remove tel engine verbose logging for updating frame
achanana Jun 18, 2025
a472cf1
Change fix for streamlit drone name bug
achanana Jun 18, 2025
1efb1e8
Make compiler output dir if it doesn't exists
achanana Jun 18, 2025
e7ad680
Update steeleagle-dsl submodule
achanana Jun 20, 2025
403866a
Fix github actions file for vehicle
achanana Jun 20, 2025
c00db83
Simple fixes from `ruff check --fix`
jaharkes Jun 23, 2025
232a645
Reorder imports (isort/ruff check --select=I)
jaharkes Jun 23, 2025
8156c6b
Apply consistent codestyle formatting (black/ruff format)
jaharkes Jun 23, 2025
e819f6c
Remove any remaining references to cnc_pb2.
jaharkes Jun 23, 2025
c0e85bd
Raise exception when trying to call non-existent TimingObjectEngine
jaharkes Jun 23, 2025
ca7e74b
Use 'if not' instead of comparing to False.
jaharkes Jun 23, 2025
2addcdb
Use isinstance to check the type of a variable.
jaharkes Jun 23, 2025
aa4573e
Missing import av
jaharkes Jun 23, 2025
80d64e8
Fix heading/bearing confusion in parrot_olympe:set_heading.
jaharkes Jun 23, 2025
6b417d3
Ignore some common, but mostly harmless ruff check warnings.
jaharkes Jun 23, 2025
512569a
Enable pyupgrade checks to modernize the code for Python 3.10+
jaharkes Jun 23, 2025
71fd57c
Fix model selector in obstacle_avoidance load_model.
jaharkes Jun 23, 2025
773dc82
Remove duplicated test for position_enu.
jaharkes Jun 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build-vehicle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- '.github/workflows/build-vehicle.yml'
- '.github/workflows/deploy-docker-img.yml'
- 'backend/server/steeleagle-dsl/python/interface/**'
- 'backend/server/steeleagle-dsl'
- 'protocol/**'
- 'vehicle/**'

Expand Down
17 changes: 17 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
target-version = "py310"
exclude = ["*_pb2.py", "*_pb2.pyi"]

[lint]
select = [
"E4", # pycodestyle subset
"E7", # pycodestyle subset
"E9", # pycodestyle subset
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
]
ignore = [
"E722", # do not use bare except
"E741", # ambiguous variable name (seems to trigger on l, I, and such)
"F841", # unused local variable
]
9 changes: 4 additions & 5 deletions backend/server/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# ${FACE_THRESHOLD} and ${API_KEY} should
# reside in a .env file along side docker-compose.yaml

version: '2.3'
services:
gabriel-server:
image: cmusatyalab/gabriel-server
Expand All @@ -21,7 +20,7 @@ services:
- cnc-net

telemetry-engine:
image: cmusatyalab/steeleagle-telemetry-engine
image: cmusatyalab/steeleagle-telemetry-engine:${TAG}
container_name: telemetry-engine
restart: unless-stopped
privileged: true
Expand All @@ -37,7 +36,7 @@ services:
- PYTHONPATH=/protocol

swarm-controller:
image: cmusatyalab/steeleagle-swarm-controller
image: cmusatyalab/steeleagle-swarm-controller:${TAG}
container_name: swarm-controller
restart: unless-stopped
ports:
Expand Down Expand Up @@ -116,7 +115,7 @@ services:
# - WEBSERVER=${WEBSERVER_URL}:${HTTP_PORT}

obstacle-engine:
image: cmusatyalab/steeleagle-vision-engines
image: cmusatyalab/steeleagle-vision-engines:${TAG}
container_name: obstacle-engine
restart: unless-stopped
privileged: true
Expand Down Expand Up @@ -145,7 +144,7 @@ services:
# - CUDA_VISIBLE_DEVICES=1 #set this if you want to force CPU only

object-engine:
image: cmusatyalab/steeleagle-vision-engines
image: cmusatyalab/steeleagle-vision-engines:${TAG}
container_name: object-engine
restart: unless-stopped
privileged: true
Expand Down
67 changes: 48 additions & 19 deletions backend/server/engines/avoidance/depth.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,64 +18,87 @@
# limitations under the License.
#
#
from gabriel_server.network_engine import engine_runner
from obstacle_avoidance_engine import MidasAvoidanceEngine, Metric3DAvoidanceEngine
import logging
import argparse
import logging

from gabriel_server.network_engine import engine_runner
from obstacle_avoidance_engine import Metric3DAvoidanceEngine, MidasAvoidanceEngine
from util.utils import setup_logging

SOURCE = 'openscout'
SOURCE = "openscout"

logger = logging.getLogger(__name__)


def main():
setup_logging(logger)
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter
)

parser.add_argument(
"-p", "--port", type=int, default=9099, help="Set port number"
)
parser.add_argument("-p", "--port", type=int, default=9099, help="Set port number")

parser.add_argument(
"-m", "--model", default="DPT_Large", help="MiDaS model. Valid models are ['DPT_Large', 'DPT_Hybrid', 'MiDaS_small']"
"-m",
"--model",
default="DPT_Large",
help="MiDaS model. Valid models are ['DPT_Large', 'DPT_Hybrid', 'MiDaS_small']",
)

parser.add_argument(
"-r", "--threshold", type=int, default=190, help="Depth threshold for filtering."
"-r",
"--threshold",
type=int,
default=190,
help="Depth threshold for filtering.",
)

parser.add_argument(
"-s", "--store", action="store_true", default=False, help="Store images with heatmap"
"-s",
"--store",
action="store_true",
default=False,
help="Store images with heatmap",
)

parser.add_argument(
"-g", "--gabriel", default="tcp://gabriel-server:5555", help="Gabriel server endpoint."
"-g",
"--gabriel",
default="tcp://gabriel-server:5555",
help="Gabriel server endpoint.",
)

parser.add_argument(
"-src", "--source", default=SOURCE, help="Source for engine to register with."
"-src", "--source", default=SOURCE, help="Source for engine to register with."
)

parser.add_argument(
"-f", "--faux", action="store_true", default=False, help="Generate faux vectors using the file specfied instead of results from MiDaS."
"-f",
"--faux",
action="store_true",
default=False,
help="Generate faux vectors using the file specfied instead of results from MiDaS.",
)

parser.add_argument(
"-R", "--redis", type=int, default=6379, help="Set port number for redis connection [default: 6379]"
"-R",
"--redis",
type=int,
default=6379,
help="Set port number for redis connection [default: 6379]",
)

parser.add_argument(
"-a", "--auth", default="", help="Share key for redis user."
)
parser.add_argument("-a", "--auth", default="", help="Share key for redis user.")

parser.add_argument(
"-i", "--roi", type=int, default=190, help="Depth threshold for filtering."
)

parser.add_argument(
"--metric3d", action="store_true", default=False, help="Use Metric3D for avoidance"
"--metric3d",
action="store_true",
default=False,
help="Use Metric3D for avoidance",
)

args, _ = parser.parse_known_args()
Expand All @@ -87,7 +110,13 @@ def engine_setup():
engine = MidasAvoidanceEngine(args)
return engine

engine_runner.run(engine=engine_setup(), source_name=args.source, server_address=args.gabriel, all_responses_required=True)
engine_runner.run(
engine=engine_setup(),
source_name=args.source,
server_address=args.gabriel,
all_responses_required=True,
)


if __name__ == "__main__":
main()
Loading