Class DroneSwarm

Class Documentation

class DroneSwarm

Public Functions

DroneSwarm(as2::Node *node_ptr, std::string drone_id, geometry_msgs::msg::Pose init_pose, rclcpp::CallbackGroup::SharedPtr cbk_group)
inline ~DroneSwarm()
std::shared_ptr<rclcpp_action::ClientGoalHandle<as2_msgs::action::FollowReference>> initFollowReference()

Initialize the follow refrence.

Returns:

std::shared_ptr<rclcpp_action::ClientGoalHandle<as2_msgs::action::FollowReference>> Future of the FollowReference behavior

bool stopFollowReference()

Send request to stop following the refernce in the swarm.

Returns:

bool Response of the service

bool checkPosition()

Check if the drones are in their reference position.

Returns:

bool Return true if the drones are less than 0.3 meters from the reference

bool updateStaticTf(geometry_msgs::msg::Pose pose)

Update the static tf of the drones.

Parameters:

pose – The new reference pose

Public Members

std::string drone_id_
geometry_msgs::msg::Pose init_pose_
geometry_msgs::msg::PoseStamped drone_pose_
geometry_msgs::msg::TransformStamped transform_