7 #include "uav_system_config.pb.h"
23 UAVSystemConfig config)
26 config_.uav_vision_system_config().camera_transform())),
27 tracker_(tracker), constant_heading_depth_controller_(
28 config_.uav_vision_system_config()
29 .constant_heading_depth_controller_config()),
31 constant_heading_depth_controller_,
34 visual_servoing_drone_connector_);
51 std::stringstream status;
57 std::string tracking_valid =
59 std::string valid_color =
61 table_writer.
addCell(tracking_valid,
"Valid", valid_color);
63 table_writer.
addCell(
"Tracking Vectors: ");
64 std::unordered_map<uint32_t, Position> tracking_vectors;
66 for (
auto tv : tracking_vectors) {
67 tf::Vector3 tv_body_frame =
69 tf::Vector3(tv.second.x, tv.second.y, tv.second.z);
72 table_writer.
addCell(tv_body_frame.x());
73 table_writer.
addCell(tv_body_frame.y());
74 table_writer.
addCell(tv_body_frame.z());
static constexpr const char * green
Green color hex code.
Definition: html_utils.h:18
TypeMap< AbstractControllerHardwareConnector > controller_hardware_connector_container_
Container to store and retrieve controller-hardware-connectors.
Definition: base_robot_system.h:23
std::string getSystemStatus() const
Provide the current state of UAV system.
Definition: uav_vision_system.h:50
bool getTrackingVectorGlobalFrame(Position &tracking_vector)
Get the tracking vector of the RoiToPositionConverter in the global frame.
Definition: visual_servoing_controller_drone_connector.cpp:25
std::string getTableString()
Get the html table in string format.
Definition: html_utils.h:170
Interface for classes that provide a vector to a tracked target.
Definition: base_tracker.h:13
parsernode::Parser & drone_hardware_
Hardware.
Definition: uav_system.h:26
Owns, initializes, and facilitates communication between different hardware/software components...
Definition: uav_system.h:21
virtual bool initialize()
Initialze the tracker. Can simply return true if the subclass requires no additional initialization...
Definition: base_tracker.cpp:28
tf::Transform camera_transform_
Camera transform in the frame of the UAV.
Definition: uav_vision_system.h:85
virtual bool getTrackingVectors(std::unordered_map< uint32_t, Position > &pos)=0
Get the tracking vectors.
bool getTrackingVector(Position &pos)
Get the direction vector of the tracking target in the global frame.
Definition: uav_vision_system.h:44
UAVVisionSystem(BaseTracker &tracker, parsernode::Parser &drone_hardware, UAVSystemConfig config)
Constructor.
Definition: uav_vision_system.h:22
A visual servoing controller that uses a tracker output as feedback.
Definition: visual_servoing_controller_drone_connector.h:16
bool initializeTracker()
Definition: uav_vision_system.h:48
static constexpr const char * blue
Blue color hex code.
Definition: html_utils.h:22
A position controller that keeps a constant heading while attempting to keep a certain distance from ...
Definition: constant_heading_depth_controller.h:12
void addCell(const DataT &data, std::string header="", std::string bg_color=Colors::white, int colspan=1)
Add a cell to the table. Should be called after beginning a row. Otherwise will throw an exception...
Definition: html_utils.h:116
std::string getSystemStatus() const
Provide the current state of UAV system.
Definition: uav_system.h:137
tf::Transform getTransformFromVector(const T &input)
Generate a tf transform from a vector of xyzrpy.
Definition: math.h:41
void beginRow()
Begin a new row in the table.
Definition: html_utils.h:135
void addHeader(std::string header, std::string text_color=Colors::black, int colspan=1)
Add a table header. Should be called after beginning a row.
Definition: html_utils.h:152
virtual bool trackingIsValid()=0
Check whether tracking is valid.
UAV system with a camera and visual sevoing capabilities.
Definition: uav_vision_system.h:14
UAVSystemConfig config_
UAV configuration parameters.
Definition: uav_system.h:30
Store 3D position.
Definition: position.h:8
Helper class to write html tables to text format.
Definition: html_utils.h:91
void setObject(ObjectT &object)
Store the object with base class as GenericObjectT.
Definition: type_map.h:27
static constexpr const char * red
Red color hex code.
Definition: html_utils.h:14