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