5 #include <parsernode/parser.h>
6 #include <pluginlib/class_loader.h>
14 #include "uav_system_handler_config.pb.h"
24 template <
class LogicStateMachineT,
class EventManagerT>
33 : nh_uav_(
"~uav"), nh_tracker_(
"~tracker"),
34 parser_loader_(
"parsernode",
"parsernode::Parser"),
36 parser_loader_.createUnmanagedInstance(config.uav_parser_type())),
38 config.uav_system_config()
39 .uav_vision_system_config()
40 .tracker_type() ==
"ROI"
44 uav_system_(*tracker_, *uav_hardware_, config.uav_system_config()),
45 common_handler_(config.base_config(), uav_system_),
46 uav_controller_timer_(
49 std::chrono::milliseconds(config.uav_controller_timer_duration())) {
51 uav_hardware_->initialize(nh_uav_);
55 uav_controller_timer_.
start();
68 parsernode::common::quaddata quad_data;
69 uav_hardware_->getquaddata(quad_data);
82 ros::NodeHandle nh_uav_;
83 ros::NodeHandle nh_tracker_;
84 pluginlib::ClassLoader<parsernode::Parser>
86 std::unique_ptr<parsernode::Parser> uav_hardware_;
87 std::unique_ptr<BaseTracker> tracker_;
Converts a ROI in image to vector in camera frame.
Definition: roi_to_position_converter.h:25
Interface for classes that provide a vector to a tracked target.
Definition: base_tracker.h:13
bool isConnected()
Forward common handler connected function for testing is GUI is connected to this node or not...
Definition: uav_vision_system_handler.h:79
void start()
Starts running the timer thread.
Definition: async_timer.cpp:16
void startTimers()
Start state machine internal event processing and status timer.
Definition: common_system_handler.h:70
Calls given function on a timer in its own thread.
Definition: async_timer.h:11
Owns all of the autonomous system components and is responsible for thread management. Also owns a common system handler object to handle creation of state machine and connecting it to GUI.
Definition: uav_vision_system_handler.h:25
bool isConnected()
Checks if internal ROS topics are connected.
Definition: common_system_handler.h:62
UAVVisionSystemHandler(UAVSystemHandlerConfig &config)
Constructor.
Definition: uav_vision_system_handler.h:32
Provides vector to a tracked object based on output from alvar.
Definition: alvar_tracker.h:13
UAV system with a camera and visual sevoing capabilities.
Definition: uav_vision_system.h:14
HardwareType
Type of hardware used by ControllerHardwareConnector. Enum ID must be contiguous. ...
Definition: base_controller_hardware_connector.h:11
parsernode::common::quaddata getUAVData()
Get UAV state.
Definition: uav_vision_system_handler.h:67