James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 1 | load("//aos/flatbuffers:generate.bzl", "static_flatbuffer") |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 2 | load("//tools/build_rules:gtk_dependent.bzl", "gtk_dependent_cc_binary") |
Adam Snaider | 13d48d9 | 2023-08-03 12:20:15 -0700 | [diff] [blame] | 3 | load("@rules_cc//cc:defs.bzl", "cc_proto_library") |
| 4 | load("@rules_proto//proto:defs.bzl", "proto_library") |
Parker Schuh | 4d2978f | 2017-02-25 11:13:06 -0800 | [diff] [blame] | 5 | |
| 6 | package(default_visibility = ["//visibility:public"]) |
| 7 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 8 | static_flatbuffer( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 9 | name = "vision_fbs", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 10 | srcs = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 11 | "vision.fbs", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 12 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 13 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 14 | visibility = ["//visibility:public"], |
Parker Schuh | 4d2978f | 2017-02-25 11:13:06 -0800 | [diff] [blame] | 15 | ) |
| 16 | |
Adam Snaider | 13d48d9 | 2023-08-03 12:20:15 -0700 | [diff] [blame] | 17 | proto_library( |
| 18 | name = "vision_result_proto", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 19 | srcs = ["vision_result.proto"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 20 | target_compatible_with = ["@platforms//os:linux"], |
Parker Schuh | d497ed6 | 2017-03-04 20:11:58 -0800 | [diff] [blame] | 21 | ) |
| 22 | |
Adam Snaider | 13d48d9 | 2023-08-03 12:20:15 -0700 | [diff] [blame] | 23 | proto_library( |
| 24 | name = "vision_config_proto", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 25 | srcs = ["vision_config.proto"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 26 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 27 | deps = [ |
Adam Snaider | 13d48d9 | 2023-08-03 12:20:15 -0700 | [diff] [blame] | 28 | "//aos/vision/image:camera_params_proto", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 29 | ], |
Parker Schuh | d497ed6 | 2017-03-04 20:11:58 -0800 | [diff] [blame] | 30 | ) |
| 31 | |
Adam Snaider | 13d48d9 | 2023-08-03 12:20:15 -0700 | [diff] [blame] | 32 | cc_proto_library( |
| 33 | name = "vision_result", |
| 34 | target_compatible_with = ["@platforms//os:linux"], |
| 35 | deps = ["vision_result_proto"], |
| 36 | ) |
| 37 | |
| 38 | cc_proto_library( |
| 39 | name = "vision_config", |
| 40 | target_compatible_with = ["@platforms//os:linux"], |
| 41 | deps = ["vision_config_proto"], |
| 42 | ) |
| 43 | |
Parker Schuh | d497ed6 | 2017-03-04 20:11:58 -0800 | [diff] [blame] | 44 | cc_binary( |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 45 | name = "target_sender", |
| 46 | srcs = [ |
| 47 | "target_sender.cc", |
| 48 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 49 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 50 | deps = [ |
| 51 | ":target_finder", |
| 52 | ":vision_config", |
| 53 | ":vision_result", |
| 54 | "//aos/logging", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 55 | "//aos/time", |
| 56 | "//aos/vision/blob:codec", |
| 57 | "//aos/vision/blob:find_blob", |
| 58 | "//aos/vision/blob:range_image", |
| 59 | "//aos/vision/blob:threshold", |
| 60 | "//aos/vision/events:epoll_events", |
| 61 | "//aos/vision/events:socket_types", |
| 62 | "//aos/vision/events:udp", |
| 63 | "//aos/vision/image:image_stream", |
| 64 | "//aos/vision/image:jpeg_routines", |
| 65 | "//aos/vision/image:reader", |
| 66 | ], |
Parker Schuh | 4d2978f | 2017-02-25 11:13:06 -0800 | [diff] [blame] | 67 | ) |
| 68 | |
| 69 | cc_binary( |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 70 | name = "target_receiver", |
| 71 | srcs = [ |
| 72 | "target_receiver.cc", |
| 73 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 74 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 75 | visibility = ["//visibility:public"], |
| 76 | deps = [ |
| 77 | ":target_finder", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 78 | ":vision_fbs", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 79 | ":vision_result", |
| 80 | "//aos:init", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 81 | "//aos/events:shm_event_loop", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 82 | "//aos/logging", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 83 | "//aos/time", |
| 84 | "//aos/vision/events:udp", |
| 85 | ], |
Parker Schuh | 4d2978f | 2017-02-25 11:13:06 -0800 | [diff] [blame] | 86 | ) |
Parker Schuh | f7481be | 2017-03-04 18:24:33 -0800 | [diff] [blame] | 87 | |
| 88 | cc_library( |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 89 | name = "target_finder", |
| 90 | srcs = ["target_finder.cc"], |
| 91 | hdrs = ["target_finder.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 92 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 93 | deps = [ |
| 94 | "//aos/vision/blob:threshold", |
| 95 | "//aos/vision/blob:transpose", |
| 96 | "//aos/vision/debug:overlay", |
| 97 | "//aos/vision/math:vector", |
| 98 | ], |
Parker Schuh | f7481be | 2017-03-04 18:24:33 -0800 | [diff] [blame] | 99 | ) |
Parker Schuh | 9ef6613 | 2017-03-05 16:18:36 -0800 | [diff] [blame] | 100 | |
| 101 | gtk_dependent_cc_binary( |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 102 | name = "debug_viewer", |
| 103 | srcs = ["debug_viewer.cc"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 104 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 105 | deps = [ |
| 106 | ":target_finder", |
| 107 | "//aos/vision/blob:move_scale", |
| 108 | "//aos/vision/blob:threshold", |
| 109 | "//aos/vision/blob:transpose", |
| 110 | "//aos/vision/debug:debug_framework", |
| 111 | "//aos/vision/math:vector", |
| 112 | ], |
Parker Schuh | 9ef6613 | 2017-03-05 16:18:36 -0800 | [diff] [blame] | 113 | ) |