7#include <opencv2/opencv.hpp>
8#include <networktables/NetworkTable.h>
10#include "cpp-tools/src/types.h"
23 inline static const std::shared_ptr<nt::NetworkTable>&
ntable() {
24 static std::shared_ptr<nt::NetworkTable> targets{
VisionServer::ntable()->GetSubTable(
"Targets")};
44 inline const std::string&
getName()
const {
return this->
name; }
47 inline void setPos(
double x,
double y,
double z) {
48 this->
table->PutNumber(
"x", x);
49 this->
table->PutNumber(
"y", y);
50 this->
table->PutNumber(
"z", z);
53 this->
table->PutNumber(
"up-down", ud);
54 this->
table->PutNumber(
"left-right", lr);
57 this->
table->PutNumber(
"distance", d);
68 const std::shared_ptr<nt::NetworkTable>
table;
75template<
class derived_t =
void>
void setPos(double x, double y, double z)
static const std::shared_ptr< nt::NetworkTable > & ntable()
void setAngle(double ud, double lr)
Target(const std::string &n)
Target(Target &&)=default
Target(const Target &)=default
const std::string & getName() const
const std::shared_ptr< nt::NetworkTable > table
void setPos(double x, double y, double z)
UniqueTarget(const UniqueTarget &)=default
UniqueTarget(const std::string &n)
UniqueTarget(UniqueTarget &&)=default
UniqueTarget(std::string &&n)
void setAngle(double ud, double lr)
static const std::shared_ptr< nt::NetworkTable > & ntable()