ASCO Aerial Autonomy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
uav_arm_system.h
Go to the documentation of this file.
1 #pragma once
7 #include <chrono>
8 
12 class UAVArmSystem : public UAVVisionSystem, public ArmSystem {
13 public:
21  UAVArmSystem(BaseTracker &tracker, parsernode::Parser &drone_hardware,
22  ArmParser &arm_hardware, UAVSystemConfig config)
23  : UAVVisionSystem(tracker, drone_hardware, config),
24  ArmSystem(arm_hardware),
25  grip_timeout_(config_.uav_vision_system_config()
26  .uav_arm_system_config()
27  .grip_timeout()),
28  arm_goal_transforms_(
29  math::getTransformsFromVector(config_.uav_vision_system_config()
30  .uav_arm_system_config()
31  .arm_goal_transform())),
32  arm_transform_(
33  math::getTransformFromVector(config_.uav_vision_system_config()
34  .uav_arm_system_config()
35  .arm_transform())),
36  relative_pose_controller_(config_.uav_vision_system_config()
37  .uav_arm_system_config()
38  .position_controller_config()),
39  visual_servoing_arm_connector_(tracker, drone_hardware, arm_hardware,
40  relative_pose_controller_,
41  camera_transform_, arm_transform_) {
43  visual_servoing_arm_connector_);
44  }
45 
51  std::string getSystemStatus() const {
52  std::stringstream status;
53  status << UAVVisionSystem::getSystemStatus() << std::endl
55  return status.str();
56  }
57 
63  uint32_t gripTimeout() { return grip_timeout_; }
64 
71  tf::Transform armGoalTransform(int i) { return arm_goal_transforms_.at(i); }
72 
73 private:
77  uint32_t grip_timeout_;
81  std::vector<tf::Transform> arm_goal_transforms_;
85  tf::Transform arm_transform_;
89  RelativePoseController relative_pose_controller_;
93  VisualServoingControllerArmConnector visual_servoing_arm_connector_;
94 };
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
UAV vision system with an arm.
Definition: uav_arm_system.h:12
std::string getSystemStatus() const
Provide the current state of UAV system.
Definition: uav_arm_system.h:51
std::string getSystemStatus() const
Provide the current state of arm system.
Definition: arm_system.h:93
Interface for classes that provide a vector to a tracked target.
Definition: base_tracker.h:13
uint32_t gripTimeout()
getter for timeout used for gripping
Definition: uav_arm_system.h:63
tf::Transform camera_transform_
Camera transform in the frame of the UAV.
Definition: uav_vision_system.h:85
UAVArmSystem(BaseTracker &tracker, parsernode::Parser &drone_hardware, ArmParser &arm_hardware, UAVSystemConfig config)
Constructor.
Definition: uav_arm_system.h:21
tf::Transform getTransformFromVector(const T &input)
Generate a tf transform from a vector of xyzrpy.
Definition: math.h:41
tf::Transform armGoalTransform(int i)
getter for transfrom from arm to object
Definition: uav_arm_system.h:71
A pose controller that keeps a pose relative to some feedback pose.
Definition: relative_pose_controller.h:14
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
Owns, initializes, and facilitates communication between different hardware/software components...
Definition: arm_system.h:18
std::vector< tf::Transform > getTransformsFromVector(const T &input)
Generate a vector of tf transforms from a vector of xyzrpy.
Definition: math.h:68
void setObject(ObjectT &object)
Store the object with base class as GenericObjectT.
Definition: type_map.h:27
A visual servoing controller that uses a tracker output as feedback and moves the arm to a goal pose ...
Definition: visual_servoing_controller_arm_connector.h:16