今回は、前回作ったDNNにより推論を実行するモジュールをラジコンの制御に組み込む。 「Jetson Nanoで自律走行ラジコンを作る」シリーズのまとめ記事は以下。 kimitok.hateblo.jp Gitリポジトリは以下。 github.com ラジコンの制御に推論モジュールを組み込むにあたり、以下のようなクラス*1を作成した。 struct DriveParameter { float steering; float throttle; }; class DriveDetector { public: DriveDetector(const std::string &model_file_path); ~DriveDetector(); DriveParameter detect(const cv::Mat &image); //... }; クラスのインターフェースとしては、コンス