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