9 #include <glog/logging.h>
10 #include <parsernode/common.h>
17 template <
class LogicStateMachineT>
28 template <
class LogicStateMachineT>
32 LOG(WARNING) <<
"Aborting visual servoing controller";
42 template <
class LogicStateMachineT>
47 VLOG(1) <<
"Going home";
58 template <
class LogicStateMachineT>
71 template <
class LogicStateMachineT>
82 template <
class LogicStateMachineT>
87 LOG(WARNING) <<
"Could not initialize tracking.";
92 LOG(WARNING) <<
"Lost tracking while servoing.";
95 VLOG(1) <<
"Setting tracking vector";
97 .uav_vision_system_config()
98 .desired_visual_servoing_distance();
99 double tracking_vector_norm = tracking_vector.
norm();
100 if (tracking_vector_norm < 1e-6) {
101 LOG(WARNING) <<
"Tracking vector too small cannot initialize direction";
105 VLOG(1) <<
"Selecting home location";
108 tracking_vector * desired_distance / tracking_vector_norm);
119 template <
class LogicStateMachineT>
Logic to abort if controller status is critical.
Definition: hovering_functors.h:57
Guard for home transition.
Definition: visual_servoing_functors.h:59
void setHomeLocation()
save current location as home location
Definition: uav_system.h:197
Action to reach a pre designated point.
Definition: visual_servoing_functors.h:43
Base state for all states in logic state machine.
Definition: base_state.h:24
Empty for now.
Definition: visual_servoing_functors.h:18
void abortController(HardwareType hardware_type)
Remove active controller for given hardware type.
Definition: base_robot_system.h:126
bool isHomeLocationSpecified()
Check if home location is specified.
Definition: uav_system.h:211
void run(UAVVisionSystem &robot_system)
Override this run function for different sub classes. This function performs the logic checking for e...
Definition: visual_servoing_functors.h:20
Stores Position, yaw. PositionYaw is used as the goal for UAV systems.
Definition: position_yaw.h:10
Action functor that does not require the event triggering it.
Definition: base_functors.h:113
void setGoal(GoalT goal)
sets goal to the connector and swaps the active connector with the specified connector type...
Definition: base_robot_system.h:59
void run(UAVVisionSystem &robot_system)
Override this run function for different sub classes. This function performs the logic checking for e...
Definition: visual_servoing_functors.h:45
bool getTrackingVector(Position &pos)
Get the direction vector of the tracking target in the global frame.
Definition: uav_vision_system.h:44
void run(UAVVisionSystem &robot_system)
Override this run function for different sub classes. This function performs the logic checking for e...
Definition: visual_servoing_functors.h:31
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
Manages communication between a drone plugin and a position controller that outputs position commands...
Definition: position_controller_drone_connector.h:14
bool guard(UAVVisionSystem &robot_system)
Override this run function for different sub classes. This function performs the logic checking for e...
Definition: visual_servoing_functors.h:61
PositionYaw getHomeLocation()
Stored home location.
Definition: uav_system.h:218
Check tracking is valid before starting visual servoing.
Definition: visual_servoing_functors.h:83
bool guard(UAVVisionSystem &robot_system)
Override this run function for different sub classes. This function performs the logic checking for e...
Definition: visual_servoing_functors.h:85
Internal action when hovering.
Definition: hovering_functors.h:21
Definition: visual_servoing_functors.h:29
Guard functor that does not require the event triggering it.
Definition: base_functors.h:157
UAVSystemConfig getConfiguration()
Get system configuration.
Definition: uav_system.h:192
Action sequence that runs until one of the actions returns false.
Definition: shorting_action_sequence.h:46
UAV system with a camera and visual sevoing capabilities.
Definition: uav_vision_system.h:14
Store 3D position.
Definition: position.h:8
double norm() const
Returns the norm of the vector.
Definition: position.h:30