aerostack2

struct Acro_command

Public Members

Eigen::Vector3d PQR = Eigen::Vector3d::Zero()
double thrust = 0.0
class AerialPlatform : public as2::Node

Base class for all Aerial platforms. It provides the basic functionality for the platform. It is responsible for handling the platform state machine and the platform status. It also handles the command subscriptions and the basic platform services.

Subclassed by as2_platform_multirotor_simulator::MultirotorSimulatorPlatform, gazebo_platform::GazeboPlatform

Public Functions

explicit AerialPlatform(const rclcpp::NodeOptions &options = rclcpp::NodeOptions())

Construct a new Aerial Platform object, with default parameters.

AerialPlatform(const std::string &ns, const rclcpp::NodeOptions &options = rclcpp::NodeOptions())

Construct a new Aerial Platform object, with default parameters.

inline ~AerialPlatform()
virtual void configureSensors() = 0

Configures the platform sensors.

virtual bool ownSendCommand() = 0

Handles how a command must be sended in the concrete platform.

Returns:

true command is sended successfully.

Returns:

false command is not sended.

virtual bool ownSetArmingState(bool state) = 0

Handles how arming state has to be settled in the concrete platform.

Parameters:

state – true for arming the platform, false to disarm.

Returns:

true Arming state is settled successfully.

Returns:

false Arming state is not settled.

virtual bool ownSetOffboardControl(bool offboard) = 0

Handles how offboard mode has to be settled in the concrete platform.

Parameters:

offboard – true if offboard mode is enabled.

Returns:

true Offboard mode is settled successfully.

Returns:

false Offboard mode is not settled.

virtual bool ownSetPlatformControlMode(const as2_msgs::msg::ControlMode &msg) = 0

Handles how the control mode has to be settled in the concrete platform.

Parameters:

control_mode – as2_msgs::msg::PlatformControlMode with the new control mode.

Returns:

true Control mode is settled successfully.

Returns:

false Control mode is not settled.

inline virtual bool ownTakeoff()

Handles the platform takeoff command.

Returns:

true Takeoff command is sended successfully.

Returns:

false Takeoff command is not sended.

inline virtual bool ownLand()

Handles the platform landing command.

Returns:

true Landing command is sended successfully.

Returns:

false Landing command is not sended.

virtual void ownKillSwitch() = 0

Handles the platform emergency kill switch command. This means stop the motors inmediately, this cannot be reversed. USE WITH CAUTION.

virtual void ownStopPlatform() = 0

Handles the platform emergency stop command. STOP means to hover as best as possible. This hover is different from the hover in the platform control mode. And when it is activated the platform will stop hearing commands from AS2. USE WITH CAUTION.

inline bool handleStateMachineEvent(const as2_msgs::msg::PlatformStateMachineEvent &event)

Set the State Machine Event object.

Parameters:

event – Event to

Returns:

true

Returns:

false

inline bool handleStateMachineEvent(const int8_t &event)
inline bool getArmingState() const

Get whether the platform is armed or not.

Returns:

true Armed

Returns:

false Disarmed

inline bool getConnectedStatus() const

Get wheter the connection is established or not.

Returns:

true Connection active

Returns:

false Connection not active

inline bool getOffboardMode() const

Get whether offboard mode is active or not.

Returns:

true Offboard mode enabled

Returns:

false Offboard mode disabled

inline as2_msgs::msg::ControlMode &getControlMode()

Get current platform control mode.

Returns:

as2_msgs::msg::PlatformControlMode current platform control mode

inline bool isControlModeSettled() const

Get whether a control mode is active or not.

Returns:

true Control mode set and valid

Returns:

false Control mode unset

Protected Functions

bool setArmingState(bool state)

Set the arm state of the platform.

Parameters:

state – True to arm the platform, false to disarm it.

Returns:

true Armimg state setted successfully.

Returns:

false Armimg state not setted successfully.

bool setOffboardControl(bool offboard)

Set the offboard control mode.

Parameters:

offboard – True if the offboard control mode is enabled.

Returns:

true if the offboard control mode is setted properly

Returns:

false if the offboard control mode could not be setted.

bool setPlatformControlMode(const as2_msgs::msg::ControlMode &msg)

Set the control mode of the platform.

Parameters:

msg – as2_msgs::msg::ControlMode message with the new control mode desired.

Returns:

true If the control mode is set properly.

Returns:

false If the control mode could not be set properly.

bool takeoff()

Handles the platform takeoff command.

Returns:

true Takeoff command is sended successfully.

Returns:

false Takeoff command is not sended.

bool land()

Handles the platform landing command.

Returns:

true Landing command is sended successfully.

Returns:

false Landing command is not sended.

void alertEvent(const as2_msgs::msg::AlertEvent &msg)

Handles the platform emergency event.

Parameters:

msg – as2_msgs::msg::AlertEvent message with the emergency event.

virtual void sendCommand()

Send command to the platform.

Protected Attributes

float cmd_freq_
float info_freq_
as2_msgs::msg::TrajectoryPoint command_trajectory_msg_
geometry_msgs::msg::PoseStamped command_pose_msg_
geometry_msgs::msg::TwistStamped command_twist_msg_
as2_msgs::msg::Thrust command_thrust_msg_
as2_msgs::msg::PlatformInfo platform_info_msg_
bool has_new_references_ = false

Private Functions

void initialize()
void loadControlModes(const std::string &filename)
inline void publishPlatformInfo()

Publishes the platform info message.

void alertEventCallback(const as2_msgs::msg::AlertEvent::SharedPtr msg)
void setPlatformControlModeSrvCall(const std::shared_ptr<as2_msgs::srv::SetControlMode::Request> request, std::shared_ptr<as2_msgs::srv::SetControlMode::Response> response)

Set Aircraft Control Mode Service Callback.

Parameters:
  • request

  • response

void setArmingStateSrvCall(const std::shared_ptr<std_srvs::srv::SetBool::Request> request, std::shared_ptr<std_srvs::srv::SetBool::Response> response)

Set Aircraft Arming State Service Callback.

Parameters:
  • request

  • response

void setOffboardModeSrvCall(const std::shared_ptr<std_srvs::srv::SetBool::Request> request, std::shared_ptr<std_srvs::srv::SetBool::Response> response)

Set Aircraft Offboard Mode Service Callback.

Parameters:
  • request

  • response

void platformTakeoffSrvCall(const std::shared_ptr<std_srvs::srv::SetBool::Request> request, std::shared_ptr<std_srvs::srv::SetBool::Response> response)

Takeoff Service Callback.

Parameters:
  • request

  • response

void platformLandSrvCall(const std::shared_ptr<std_srvs::srv::SetBool::Request> request, std::shared_ptr<std_srvs::srv::SetBool::Response> response)

Land Service Callback.

Parameters:
  • request

  • response

void listControlModesSrvCall(const std::shared_ptr<as2_msgs::srv::ListControlModes::Request> request, std::shared_ptr<as2_msgs::srv::ListControlModes::Response> response)

get list of available Control Modes Service Callback

Parameters:
  • request

  • response

Private Members

bool sending_commands_ = false
rclcpp::TimerBase::SharedPtr platform_cmd_timer_
rclcpp::TimerBase::SharedPtr platform_info_timer_
as2::PlatformStateMachine state_machine_
std::vector<uint8_t> available_control_modes_
rclcpp::Publisher<as2_msgs::msg::PlatformInfo>::SharedPtr platform_info_pub_
rclcpp::Subscription<as2_msgs::msg::TrajectoryPoint>::SharedPtr trajectory_command_sub_
rclcpp::Subscription<geometry_msgs::msg::PoseStamped>::SharedPtr pose_command_sub_
rclcpp::Subscription<geometry_msgs::msg::TwistStamped>::SharedPtr twist_command_sub_
rclcpp::Subscription<as2_msgs::msg::Thrust>::SharedPtr thrust_command_sub_
rclcpp::Subscription<as2_msgs::msg::AlertEvent>::SharedPtr alert_event_sub_
rclcpp::Service<as2_msgs::srv::SetControlMode>::SharedPtr set_platform_mode_srv_
rclcpp::Service<std_srvs::srv::SetBool>::SharedPtr set_arming_state_srv_
rclcpp::Service<std_srvs::srv::SetBool>::SharedPtr set_offboard_mode_srv_
rclcpp::Service<std_srvs::srv::SetBool>::SharedPtr platform_takeoff_srv_
rclcpp::Service<std_srvs::srv::SetBool>::SharedPtr platform_land_srv_
rclcpp::Service<as2_msgs::srv::ListControlModes>::SharedPtr list_control_modes_srv_
class AlphanumericViewer : public as2::Node

Public Types

using CallbackReturn = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn

Public Functions

AlphanumericViewer()
void run()
void setupNode()
void printSummaryMenu()
void printSensorMenu()
void printNavigationMenu()
void printPlatformMenu()
void printStream(double var, bool aux)
void printStream3(float var, bool aux)
void printStream(float var, bool aux)
void printSummaryValues()
void printNavigationValues()
void printSensorValues()
void printPlatformValues()
void printBattery()
void printQuadrotorState()
void printControlModeInYaw()
void printControlModeInControl()
void printControlModeInFrame()
void printControlModeOutYaw()
void printControlModeOutControl()
void printControlModeOutFrame()
void printPlatformStatus(int line)
void clearValues()
virtual CallbackReturn on_configure(const rclcpp_lifecycle::State&) override

Callback for the configure state.

Parameters:

state

Returns:

CallbackReturn

virtual CallbackReturn on_deactivate(const rclcpp_lifecycle::State&) override

Callback for the deactivate state.

Parameters:

state

Returns:

CallbackReturn

virtual CallbackReturn on_shutdown(const rclcpp_lifecycle::State&) override

Callback for the shutdown state.

Parameters:

state

Returns:

CallbackReturn

Private Functions

void poseCallback(const geometry_msgs::msg::PoseStamped::SharedPtr _msg)
void twistCallback(const geometry_msgs::msg::TwistStamped::SharedPtr _msg)
void batteryCallback(const sensor_msgs::msg::BatteryState::SharedPtr _msg)
void imuCallback(const sensor_msgs::msg::Imu::SharedPtr _msg)
void platformCallback(const as2_msgs::msg::PlatformInfo::SharedPtr _msg)
void actuatorPoseCallback(const geometry_msgs::msg::PoseStamped::SharedPtr _msg)
void actuatorThrustCallback(const as2_msgs::msg::Thrust::SharedPtr _msg)
void actuatorSpeedCallback(const geometry_msgs::msg::TwistStamped::SharedPtr _msg)
void controllerCallback(const as2_msgs::msg::ControllerInfo::SharedPtr _msg)
void poseReferenceCallback(const geometry_msgs::msg::PoseStamped::SharedPtr _msg)
void speedReferenceCallback(const geometry_msgs::msg::TwistStamped::SharedPtr _msg)
void gpsCallback(const sensor_msgs::msg::NavSatFix::SharedPtr _msg)

Private Members

rclcpp::Subscription<geometry_msgs::msg::PoseStamped>::SharedPtr self_localization_pose_sub_
rclcpp::Subscription<geometry_msgs::msg::TwistStamped>::SharedPtr self_localization_speed_sub_
rclcpp::Subscription<sensor_msgs::msg::BatteryState>::SharedPtr battery_sub_
rclcpp::Subscription<sensor_msgs::msg::Imu>::SharedPtr imu_sub_
rclcpp::Subscription<sensor_msgs::msg::Temperature>::SharedPtr temperature_sub_
rclcpp::Subscription<as2_msgs::msg::PlatformInfo>::SharedPtr status_sub_
rclcpp::Subscription<geometry_msgs::msg::PoseStamped>::SharedPtr actuator_command_pose_sub_
rclcpp::Subscription<as2_msgs::msg::Thrust>::SharedPtr actuator_command_thrust_sub_
rclcpp::Subscription<geometry_msgs::msg::TwistStamped>::SharedPtr actuator_command_twist_sub_
rclcpp::Subscription<as2_msgs::msg::ControllerInfo>::SharedPtr controller_info_sub_
rclcpp::Subscription<geometry_msgs::msg::PoseStamped>::SharedPtr position_reference_sub_
rclcpp::Subscription<geometry_msgs::msg::TwistStamped>::SharedPtr speed_reference_sub_
rclcpp::Subscription<sensor_msgs::msg::NavSatFix>::SharedPtr gps_sub_
rclcpp::Subscription<as2_msgs::msg::ControlMode>::SharedPtr control_mode_sub_
geometry_msgs::msg::PoseStamped self_localization_pose_
geometry_msgs::msg::TwistStamped self_localization_twist_
sensor_msgs::msg::BatteryState battery_status_
sensor_msgs::msg::Imu imu_
as2_msgs::msg::PlatformInfo platform_info_
geometry_msgs::msg::PoseStamped actuator_pose_
as2_msgs::msg::Thrust actuator_thrust_
geometry_msgs::msg::TwistStamped actuator_twist_
as2_msgs::msg::ControllerInfo controller_info_
geometry_msgs::msg::PoseStamped reference_pose_
geometry_msgs::msg::TwistStamped reference_twist_
sensor_msgs::msg::NavSatFix gps_
std::stringstream interface_printout_stream
std::stringstream pinterface_printout_stream
bool battery_aux = false
bool altitude_aux = false
bool altitude_sea_level_aux = false
bool ground_speed_aux = false
bool imu_aux = false
bool temperature_aux = false
bool platform_info_aux = false
bool current_speed_reference_aux = false
bool current_pose_reference_aux = false
bool current_trajectory_reference_aux = false
bool actuator_command_pose_aux = false
bool actuator_command_twist_aux = false
bool actuator_command_thrust_aux = false
bool current_pose_aux = false
bool current_speed_aux = false
bool controller_info_aux = false
bool gps_aux = false
bool thrust_aux = false
int last_received_yaw_mode
int last_received_control_mode
int last_received_reference_frame
char command = 0
int window = 0
class ArmService : public nav2_behavior_tree::BtServiceNode<std_srvs::srv::SetBool>

Public Functions

ArmService(const std::string &xml_tag_name, const BT::NodeConfiguration &conf)
virtual void on_tick() override

Function to perform some user-defined operation on tick Fill in service request with information if necessary.

BT::NodeStatus on_completion(std::shared_ptr<std_srvs::srv::SetBool::Response> response)
class AzimuthBridge : public rclcpp::Node

Public Functions

inline AzimuthBridge()

Private Members

std::shared_ptr<gz::transport::Node> ign_node_ptr_
std::string model_name_

Private Static Functions

static inline void ignitionGroundTruthCallback(const gz::msgs::Odometry &ign_msg, const gz::transport::MessageInfo &msg_info)
static inline float toEulerYaw(Quaternion q)
static inline float toAzimuth(float yaw)

Private Static Attributes

static rclcpp::Publisher<std_msgs::msg::Float32>::SharedPtr ps_pub_ = nullptr
template<class MessageT>
class BasicBehavior : public as2::Node, public as2::Node

Public Types

using GoalHandleAction = rclcpp_action::ServerGoalHandle<MessageT>
using GoalHandleAction = rclcpp_action::ServerGoalHandle<MessageT>

Public Functions

inline BasicBehavior(const std::string &name)
virtual rclcpp_action::GoalResponse onAccepted(const std::shared_ptr<const typename MessageT::Goal> goal) = 0
virtual rclcpp_action::CancelResponse onCancel(const std::shared_ptr<GoalHandleAction> goal_handle) = 0
virtual void onExecute(const std::shared_ptr<GoalHandleAction> goal_handle) = 0
inline explicit BasicBehavior(const std::string &name)
virtual rclcpp_action::GoalResponse onAccepted(const std::shared_ptr<const typename MessageT::Goal> goal) = 0
virtual rclcpp_action::CancelResponse onCancel(const std::shared_ptr<GoalHandleAction> goal_handle) = 0
virtual void onExecute(const std::shared_ptr<GoalHandleAction> goal_handle) = 0

Private Functions

inline rclcpp_action::GoalResponse handleGoal(const rclcpp_action::GoalUUID &uuid, std::shared_ptr<const typename MessageT::Goal> goal)
inline rclcpp_action::CancelResponse handleCancel(const std::shared_ptr<GoalHandleAction> goal_handle)
inline void handleAccepted(const std::shared_ptr<GoalHandleAction> goal_handle)
inline rclcpp_action::GoalResponse handleGoal(const rclcpp_action::GoalUUID &uuid, std::shared_ptr<const typename MessageT::Goal> goal)
inline rclcpp_action::CancelResponse handleCancel(const std::shared_ptr<GoalHandleAction> goal_handle)
inline void handleAccepted(const std::shared_ptr<GoalHandleAction> goal_handle)

Private Members

std::thread execution_thread_
rclcpp_action::Server<MessageT>::SharedPtr action_server_
class BasicMotionReferenceHandler

Subclassed by as2::motionReferenceHandlers::HoverMotion, as2::motionReferenceHandlers::PositionMotion, as2::motionReferenceHandlers::SpeedInAPlaneMotion, as2::motionReferenceHandlers::SpeedMotion, as2::motionReferenceHandlers::TrajectoryMotion

Public Functions

BasicMotionReferenceHandler(as2::Node *as2_ptr, const std::string &ns = "")
~BasicMotionReferenceHandler()

Protected Functions

bool sendPoseCommand()
bool sendTwistCommand()
bool sendTrajectoryCommand()
bool checkMode()

Protected Attributes

as2::Node *node_ptr_
std::string namespace_
as2_msgs::msg::TrajectoryPoint command_trajectory_msg_
geometry_msgs::msg::PoseStamped command_pose_msg_
geometry_msgs::msg::TwistStamped command_twist_msg_
as2_msgs::msg::ControlMode desired_control_mode_

Private Functions

bool setMode(const as2_msgs::msg::ControlMode &mode)

Private Static Attributes

static int number_of_instances_ = 0
static rclcpp::Subscription<as2_msgs::msg::ControllerInfo>::SharedPtr controller_info_sub_ = nullptr
static as2_msgs::msg::ControlMode current_mode_ = as2_msgs::msg::ControlMode()
static rclcpp::Publisher<as2_msgs::msg::TrajectoryPoint>::SharedPtr command_traj_pub_ = nullptr
static rclcpp::Publisher<geometry_msgs::msg::PoseStamped>::SharedPtr command_pose_pub_ = nullptr
static rclcpp::Publisher<geometry_msgs::msg::TwistStamped>::SharedPtr command_twist_pub_ = nullptr
template<typename actionT>
class BehaviorServer : public as2::Node

Public Types

using GoalHandleAction = rclcpp_action::ServerGoalHandle<actionT>
using BehaviorStatus = as2_msgs::msg::BehaviorStatus
using start_srv = typename actionT::Impl::SendGoalService
using modify_srv = start_srv
using result_srv = typename actionT::Impl::GetResultService
using feedback_msg = typename actionT::Impl::FeedbackMessage
using goal_status_msg = typename actionT::Impl::GoalStatusMessage
using cancel_srv = typename actionT::Impl::CancelGoalService

Public Functions

void register_action()
rclcpp_action::GoalResponse handleGoal(const rclcpp_action::GoalUUID &uuid, std::shared_ptr<const typename actionT::Goal> goal)
rclcpp_action::CancelResponse handleCancel(const std::shared_ptr<GoalHandleAction> goal_handle)
void handleAccepted(const std::shared_ptr<GoalHandleAction> goal_handle)
BehaviorServer(const std::string &name, const rclcpp::NodeOptions &options = rclcpp::NodeOptions())
virtual bool on_activate(std::shared_ptr<const typename actionT::Goal> goal)
virtual bool on_modify(std::shared_ptr<const typename actionT::Goal> goal)
virtual bool on_deactivate(const std::shared_ptr<std::string> &message)
virtual bool on_pause(const std::shared_ptr<std::string> &message)
virtual bool on_resume(const std::shared_ptr<std::string> &message)
inline virtual void on_execution_end(const ExecutionStatus &state)
virtual ExecutionStatus on_run(const typename std::shared_ptr<const typename actionT::Goal> &goal, typename std::shared_ptr<typename actionT::Feedback> &feedback_msg, typename std::shared_ptr<typename actionT::Result> &result_msg)
bool activate(std::shared_ptr<const typename actionT::Goal> goal)
void modify(std::shared_ptr<const typename actionT::Goal> goal)
void deactivate(const typename std_srvs::srv::Trigger::Request::SharedPtr goal, typename std_srvs::srv::Trigger::Response::SharedPtr result)
void pause(const typename std_srvs::srv::Trigger::Request::SharedPtr goal, typename std_srvs::srv::Trigger::Response::SharedPtr result)
void resume(const typename std_srvs::srv::Trigger::Request::SharedPtr goal, typename std_srvs::srv::Trigger::Response::SharedPtr result)
void run(const typename std::shared_ptr<GoalHandleAction> &goal_handle_action)
inline void timer_callback()
void publish_behavior_status()

Public Members

std::string action_name_
rclcpp_action::Server<actionT>::SharedPtr action_server_
std::shared_ptr<GoalHandleAction> goal_handle_
as2_msgs::msg::BehaviorStatus behavior_status_

Private Functions

std::string generate_name(const std::string &name)
void register_service_servers()
void register_publishers()
void register_timers()
void register_run_timer()
void cleanup_run_timer(const ExecutionStatus &status)

Private Members

rclcpp::Service<start_srv>::SharedPtr start_srv_
rclcpp::Service<modify_srv>::SharedPtr modify_srv_
rclcpp::Service<std_srvs::srv::Trigger>::SharedPtr stop_srv_
rclcpp::Service<std_srvs::srv::Trigger>::SharedPtr pause_srv_
rclcpp::Service<std_srvs::srv::Trigger>::SharedPtr resume_srv_
rclcpp::Publisher<feedback_msg>::SharedPtr feedback_pub_
rclcpp::Publisher<goal_status_msg>::SharedPtr goal_status_pub_
rclcpp::Publisher<BehaviorStatus>::SharedPtr behavior_status_pub_
rclcpp::TimerBase::SharedPtr behavior_status_timer_
rclcpp::TimerBase::SharedPtr run_timer_
template<class ActionT>
class BtActionNode : public BT::ActionNodeBase
#include <bt_action_node.hpp>

Abstract class representing an action based BT node.

Template Parameters:

ActionT – Type of action

Public Functions

inline BtActionNode(const std::string &xml_tag_name, const std::string &action_name, const BT::NodeConfiguration &conf)

A nav2_behavior_tree::BtActionNode constructor.

Parameters:
  • xml_tag_name – Name for the XML tag for this node

  • action_name – Action name this node creates a client for

  • conf – BT node configuration

BtActionNode() = delete
inline virtual ~BtActionNode()
inline void createActionClient(const std::string &action_name)

Create instance of an action client.

Parameters:

action_name – Action name to create client for

inline virtual void on_tick()

Function to perform some user-defined operation on tick Could do dynamic checks, such as getting updates to values on the blackboard.

inline virtual void on_wait_for_result(std::shared_ptr<const typename ActionT::Feedback>)

Function to perform some user-defined operation after a timeout waiting for a result that hasn’t been received yet. Also provides access to the latest feedback message from the action server. Feedback will be nullptr in subsequent calls to this function if no new feedback is received while waiting for a result.

Parameters:

feedback – shared_ptr to latest feedback message, nullptr if no new feedback was received

inline virtual BT::NodeStatus on_success()

Function to perform some user-defined operation upon successful completion of the action. Could put a value on the blackboard.

Returns:

BT::NodeStatus Returns SUCCESS by default, user may override return another value

inline virtual BT::NodeStatus on_aborted()

Function to perform some user-defined operation whe the action is aborted.

Returns:

BT::NodeStatus Returns FAILURE by default, user may override return another value

inline virtual BT::NodeStatus on_cancelled()

Function to perform some user-defined operation when the action is cancelled.

Returns:

BT::NodeStatus Returns SUCCESS by default, user may override return another value

inline BT::NodeStatus tick() override

The main override required by a BT action.

Returns:

BT::NodeStatus Status of tick execution

inline void halt() override

The other (optional) override required by a BT action. In this case, we make sure to cancel the ROS2 action if it is still running.

Public Static Functions

static inline BT::PortsList providedBasicPorts(BT::PortsList addition)

Any subclass of BtActionNode that accepts parameters must provide a providedPorts method and call providedBasicPorts in it.

Parameters:

addition – Additional ports to add to BT port list

Returns:

BT::PortsList Containing basic ports along with node-specific ports

static inline BT::PortsList providedPorts()

Creates list of BT ports.

Returns:

BT::PortsList Containing basic ports along with node-specific ports

Protected Functions

inline bool should_cancel_goal()

Function to check if current goal should be cancelled.

Returns:

bool True if current goal should be cancelled, false otherwise

inline void send_new_goal()

Function to send new goal to action server.

inline void result_callback(const typename rclcpp_action::ClientGoalHandle<ActionT>::WrappedResult &result)
inline bool is_future_goal_handle_complete(std::chrono::milliseconds &elapsed)

Function to check if the action server acknowledged a new goal.

Parameters:

elapsed – Duration since the last goal was sent and future goal handle has not completed. After waiting for the future to complete, this value is incremented with the timeout value.

Returns:

boolean True if future_goal_handle_ returns SUCCESS, False otherwise

inline void increment_recovery_count()

Function to increment recovery count on blackboard if this node wraps a recovery.

Protected Attributes

std::string action_name_
std::shared_ptr<rclcpp_action::Client<ActionT>> action_client_
ActionT::Goal goal_
bool goal_updated_ = {false}
bool goal_result_available_ = {false}
rclcpp_action::ClientGoalHandle<ActionT>::SharedPtr goal_handle_
rclcpp_action::ClientGoalHandle<ActionT>::WrappedResult result_
std::shared_ptr<const typename ActionT::Feedback> feedback_
rclcpp::Node::SharedPtr node_
rclcpp::CallbackGroup::SharedPtr callback_group_
rclcpp::executors::SingleThreadedExecutor callback_group_executor_
std::chrono::milliseconds server_timeout_
std::chrono::milliseconds bt_loop_duration_
std::shared_ptr<std::shared_future<typename rclcpp_action::ClientGoalHandle<ActionT>::SharedPtr>> future_goal_handle_
rclcpp::Time time_goal_sent_
template<class ServiceT>
class BtServiceNode : public BT::ActionNodeBase

Abstract class representing a service based BT node.

Template Parameters:

ServiceT – Type of service

Public Functions

inline BtServiceNode(const std::string &service_node_name, const BT::NodeConfiguration &conf)

A nav2_behavior_tree::BtServiceNode constructor.

Parameters:
  • service_node_name – Service name this node creates a client for

  • conf – BT node configuration

BtServiceNode() = delete
inline virtual ~BtServiceNode()
inline BT::NodeStatus tick() override

The main override required by a BT service.

Returns:

BT::NodeStatus Status of tick execution

inline void halt() override

The other (optional) override required by a BT service.

inline virtual void on_tick()

Function to perform some user-defined operation on tick Fill in service request with information if necessary.

inline virtual BT::NodeStatus on_completion(std::shared_ptr<typename ServiceT::Response>)

Function to perform some user-defined operation upon successful completion of the service. Could put a value on the blackboard.

Parameters:

response – can be used to get the result of the service call in the BT Node.

Returns:

BT::NodeStatus Returns SUCCESS by default, user may override to return another value

inline virtual BT::NodeStatus check_future()

Check the future and decide the status of BT.

Returns:

BT::NodeStatus SUCCESS if future complete before timeout, FAILURE otherwise

inline virtual void on_wait_for_result()

Function to perform some user-defined operation after a timeout waiting for a result that hasn’t been received yet.

Public Static Functions

static inline BT::PortsList providedBasicPorts(BT::PortsList addition)

Any subclass of BtServiceNode that accepts parameters must provide a providedPorts method and call providedBasicPorts in it.

Parameters:

addition – Additional ports to add to BT port list

Returns:

BT::PortsList Containing basic ports along with node-specific ports

static inline BT::PortsList providedPorts()

Creates list of BT ports.

Returns:

BT::PortsList Containing basic ports along with node-specific ports

Protected Functions

inline void increment_recovery_count()

Function to increment recovery count on blackboard if this node wraps a recovery.

Protected Attributes

std::string service_name_
std::string service_node_name_
std::shared_ptr<rclcpp::Client<ServiceT>> service_client_
std::shared_ptr<typename ServiceT::Request> request_
rclcpp::Node::SharedPtr node_
rclcpp::CallbackGroup::SharedPtr callback_group_
rclcpp::executors::SingleThreadedExecutor callback_group_executor_
std::chrono::milliseconds server_timeout_
std::chrono::milliseconds bt_loop_duration_
std::shared_future<typename ServiceT::Response::SharedPtr> future_result_
bool request_sent_ = {false}
rclcpp::Time sent_time_
class CalculateGoal : public SyncActionNode, public SyncActionNode

Public Functions

inline CalculateGoal(const std::string &name, const NodeConfiguration &config)
inline NodeStatus tick() override
inline CalculateGoal(const std::string &name, const NodeConfiguration &config)
inline NodeStatus tick() override

Public Static Functions

static inline PortsList providedPorts()
static inline PortsList providedPorts()
class Camera : public as2::sensors::TFStatic, protected as2::sensors::GenericSensor
#include <sensor.hpp>

Class to handle the camera sensor.

Public Functions

Camera(const std::string &id, as2::Node *node_ptr, const float pub_freq = -1.0f, bool add_sensor_measurements_base = true, const std::string &info_name = "camera_info", const std::string &camera_link = "camera_link")

Construct a new Camera object.

Parameters:
  • idCamera ID

  • node_ptr – Pointer to the node

  • pub_freq – Frequency to publish the data (-1 to publish every time updateData is called)

  • add_sensor_measurements_base – Add “sensor_measurements” to the topic name

  • info_name – Name of the camera info topic

  • camera_link – Name of the camera link frame

virtual ~Camera()

Destroy the Camera object.

void updateData(const sensor_msgs::msg::Image &img)

Update the data of the camera.

Parameters:

img – Image message

void updateData(const cv::Mat &img)

Update the data of the camera.

Parameters:

img – Image message

void setParameters(const sensor_msgs::msg::CameraInfo &camera_info, const std::string &encoding, const std::string &camera_model = "pinhole")

Set camera info parameters.

Parameters:
  • camera_infoCamera info message

  • encoding – Image encoding

  • camera_modelCamera model (default is “pinhole”)

virtual void setStaticTransform(const std::string &frame_id, const std::string &parent_frame_id, float x, float y, float z, float qx, float qy, float qz, float qw)

Set the Static Transform in TF.

Parameters:
  • frame_id – Frame ID

  • parent_frame_id – Parent Frame ID

  • x – X position (m)

  • y – Y position (m)

  • z – Z position (m)

  • qx – Quaternion X

  • qy – Quaternion Y

  • qz – Quaternion Z

  • qw – Quaternion W

virtual void setStaticTransform(const std::string &frame_id, const std::string &parent_frame_id, float x, float y, float z, float roll, float pitch, float yaw)

Set the Static Transform in TF.

Parameters:
  • frame_id – Frame ID

  • parent_frame_id – Parent Frame ID

  • x – X position (m)

  • y – Y position (m)

  • z – Z position (m)

  • roll – Roll (rad)

  • pitch – Pitch (rad)

  • yaw – Yaw (rad)

Private Functions

std::shared_ptr<rclcpp::Node> getSelfPtr()

Get the Node Pointer object.

void setup()

Setup the camera info.

virtual void publishData()

Publish the camera image and camera info.

Private Members

as2::Node *node_ptr_ = nullptr
std::string camera_base_topic_
std::string camera_frame_
std::shared_ptr<SensorData<sensor_msgs::msg::CameraInfo>> camera_info_sensor_
bool setup_ = false
bool camera_info_available_ = false
std::string encoding_
std::string camera_model_
std::string camera_name_
rclcpp::Publisher<sensor_msgs::msg::Image>::SharedPtr image_publisher_
std::shared_ptr<image_transport::ImageTransport> image_transport_ptr_ = nullptr
image_transport::Publisher it_publisher_
sensor_msgs::msg::Image image_data_
struct Control_flags

Public Members

bool parameters_read = false
bool state_received = false
bool ref_received = false
struct Control_flags

Public Members

bool state_received = false
bool ref_received = false
bool plugin_parameters_read = false
bool position_controller_parameters_read = false
bool velocity_controller_parameters_read = false
bool speed_in_a_plane_controller_parameters_read = false
bool trajectory_controller_parameters_read = false
bool yaw_controller_parameters_read = false
class ControllerBase

Subclassed by differential_flatness_controller::Plugin, pid_speed_controller::Plugin

Public Functions

inline ControllerBase()
inline void initialize(as2::Node *node_ptr)
inline virtual void ownInitialize()
virtual void updateState(const geometry_msgs::msg::PoseStamped &pose_msg, const geometry_msgs::msg::TwistStamped &twist_msg) = 0
inline virtual void updateReference(const geometry_msgs::msg::PoseStamped &ref)
inline virtual void updateReference(const geometry_msgs::msg::TwistStamped &ref)
inline virtual void updateReference(const as2_msgs::msg::TrajectoryPoint &ref)
virtual bool computeOutput(double dt, geometry_msgs::msg::PoseStamped &pose, geometry_msgs::msg::TwistStamped &twist, as2_msgs::msg::Thrust &thrust) = 0
virtual bool setMode(const as2_msgs::msg::ControlMode &mode_in, const as2_msgs::msg::ControlMode &mode_out) = 0
virtual bool updateParams(const std::vector<rclcpp::Parameter> &_params_list) = 0
virtual void reset() = 0
inline virtual std::string getDesiredPoseFrameId()
inline virtual std::string getDesiredTwistFrameId()
inline virtual ~ControllerBase()

Protected Functions

inline as2::Node *getNodePtr()

Protected Attributes

as2::Node *node_ptr_
class ControllerHandler

Public Functions

ControllerHandler(std::shared_ptr<as2_motion_controller_plugin_base::ControllerBase> controller, as2::Node *node)
inline virtual ~ControllerHandler()
rcl_interfaces::msg::SetParametersResult parametersCallback(const std::vector<rclcpp::Parameter> &parameters)
void getMode(as2_msgs::msg::ControlMode &mode_in, as2_msgs::msg::ControlMode &mode_out)
void setInputControlModesAvailables(const std::vector<uint8_t> &available_modes)
void setOutputControlModesAvailables(const std::vector<uint8_t> &available_modes)
void reset()

Protected Attributes

as2::Node *node_ptr_

Private Functions

void stateCallback(const geometry_msgs::msg::TwistStamped::SharedPtr msg)
void refPoseCallback(const geometry_msgs::msg::PoseStamped::SharedPtr msg)
void refTwistCallback(const geometry_msgs::msg::TwistStamped::SharedPtr msg)
void refTrajCallback(const as2_msgs::msg::TrajectoryPoint::SharedPtr msg)
void platformInfoCallback(const as2_msgs::msg::PlatformInfo::SharedPtr msg)
void setControlModeSrvCall(const as2_msgs::srv::SetControlMode::Request::SharedPtr request, as2_msgs::srv::SetControlMode::Response::SharedPtr response)
bool listPlatformAvailableControlModes()
void controlTimerCallback()
std::string getFrameIdByReferenceFrame(uint8_t reference_frame)
bool findSuitableOutputControlModeForPlatformInputMode(uint8_t &output_mode, const uint8_t input_mode)
bool checkSuitabilityInputMode(uint8_t &input_mode, const uint8_t output_mode)
bool setPlatformControlMode(const as2_msgs::msg::ControlMode &mode)
bool findSuitableControlModes(uint8_t &input_mode, uint8_t &output_mode)
bool trySetPlatformHover()
bool tryToBypassController(const uint8_t input_mode, uint8_t &output_mode)
void sendCommand()
void publishCommand()

Private Members

std::vector<uint8_t> controller_available_modes_in_
std::vector<uint8_t> controller_available_modes_out_
std::vector<uint8_t> platform_available_modes_in_
std::string enu_frame_id_ = "odom"
std::string flu_frame_id_ = "base_link"
std::string input_pose_frame_id_ = "odom"
std::string input_twist_frame_id_ = "odom"
std::string output_pose_frame_id_ = "odom"
std::string output_twist_frame_id_ = "odom"
as2::tf::TfHandler tf_handler_
rclcpp::Subscription<geometry_msgs::msg::TwistStamped>::SharedPtr twist_sub_
rclcpp::Subscription<geometry_msgs::msg::PoseStamped>::SharedPtr ref_pose_sub_
rclcpp::Subscription<geometry_msgs::msg::TwistStamped>::SharedPtr ref_twist_sub_
rclcpp::Subscription<as2_msgs::msg::PlatformInfo>::SharedPtr platform_info_sub_
rclcpp::Subscription<as2_msgs::msg::TrajectoryPoint>::SharedPtr ref_traj_sub_
rclcpp::Publisher<as2_msgs::msg::TrajectoryPoint>::SharedPtr trajectory_pub_
rclcpp::Publisher<as2_msgs::msg::Thrust>::SharedPtr thrust_pub_
rclcpp::Publisher<geometry_msgs::msg::PoseStamped>::SharedPtr pose_pub_
rclcpp::Publisher<geometry_msgs::msg::TwistStamped>::SharedPtr twist_pub_
rclcpp::Service<as2_msgs::srv::SetControlMode>::SharedPtr set_control_mode_srv_
as2::SynchronousServiceClient<as2_msgs::srv::SetControlMode>::SharedPtr set_control_mode_client_
as2::SynchronousServiceClient<as2_msgs::srv::ListControlModes>::SharedPtr list_control_modes_client_
rclcpp::TimerBase::SharedPtr control_timer_
bool control_mode_established_ = false
bool motion_reference_adquired_ = false
bool state_adquired_ = false
bool use_bypass_ = false
bool bypass_controller_ = false
std::chrono::nanoseconds tf_timeout_ = TF_TIMEOUT
uint8_t prefered_output_mode_ = 0b00000000
rclcpp::Time last_time_
as2_msgs::msg::PlatformInfo platform_info_
as2_msgs::msg::ControlMode control_mode_in_
as2_msgs::msg::ControlMode control_mode_out_
geometry_msgs::msg::PoseStamped state_pose_
geometry_msgs::msg::TwistStamped state_twist_
geometry_msgs::msg::PoseStamped ref_pose_
geometry_msgs::msg::TwistStamped ref_twist_
as2_msgs::msg::TrajectoryPoint ref_traj_
geometry_msgs::msg::PoseStamped command_pose_
geometry_msgs::msg::TwistStamped command_twist_
as2_msgs::msg::Thrust command_thrust_
std::shared_ptr<as2_motion_controller_plugin_base::ControllerBase> controller_ptr_
class ControllerManager : public as2::Node

Public Functions

ControllerManager()
~ControllerManager()

Public Members

double cmd_freq_

Private Functions

void configAvailableControlModes(const std::filesystem::path project_path)
void modeTimerCallback()

Private Members

double info_freq_
std::filesystem::path plugin_name_
std::filesystem::path available_modes_config_file_
std::shared_ptr<pluginlib::ClassLoader<as2_motion_controller_plugin_base::ControllerBase>> loader_
std::shared_ptr<controller_handler::ControllerHandler> controller_handler_
std::shared_ptr<as2_motion_controller_plugin_base::ControllerBase> controller_
rclcpp::Publisher<as2_msgs::msg::ControllerInfo>::SharedPtr mode_pub_
rclcpp::TimerBase::SharedPtr mode_timer_
class DetectArucoMarkersBehavior : public as2_behavior::BehaviorServer<as2_msgs::action::DetectArucoMarkers>

Public Functions

DetectArucoMarkersBehavior()

Construct a new Aruco Detector object.

inline ~DetectArucoMarkersBehavior()

Destroy the Aruco Detector object.

void imageCallback(const sensor_msgs::msg::Image::SharedPtr img)
void camerainfoCallback(const sensor_msgs::msg::CameraInfo::SharedPtr info)

Private Functions

void loadParameters()
void setup()
void setCameraParameters(const sensor_msgs::msg::CameraInfo &_camera_info)
bool checkIdIsTarget(const int _id)
bool on_activate(std::shared_ptr<const as2_msgs::action::DetectArucoMarkers::Goal> goal) override

As2 Behavior methods

bool on_modify(std::shared_ptr<const as2_msgs::action::DetectArucoMarkers::Goal> goal) override
virtual bool on_deactivate(const std::shared_ptr<std::string> &message) override
virtual bool on_pause(const std::shared_ptr<std::string> &message) override
virtual bool on_resume(const std::shared_ptr<std::string> &message) override
as2_behavior::ExecutionStatus on_run(const std::shared_ptr<const as2_msgs::action::DetectArucoMarkers::Goal> &goal, std::shared_ptr<as2_msgs::action::DetectArucoMarkers::Feedback> &feedback_msg, std::shared_ptr<as2_msgs::action::DetectArucoMarkers::Result> &result_msg) override
virtual void on_execution_end(const as2_behavior::ExecutionStatus &state) override

Private Members

rclcpp::Subscription<sensor_msgs::msg::Image>::SharedPtr cam_image_sub_
rclcpp::Subscription<sensor_msgs::msg::CameraInfo>::SharedPtr cam_info_sub_
rclcpp::Publisher<as2_msgs::msg::PoseStampedWithID>::SharedPtr aruco_pose_pub_
std::shared_ptr<as2::sensors::Camera> aruco_img_transport_
std::vector<uint16_t> target_ids_
float aruco_size_
std::string camera_model_
std::string distorsion_model_
bool camera_qos_reliable_
bool camera_params_available_
cv::Mat camera_matrix_
cv::Mat dist_coeffs_
cv::Ptr<cv::aruco::Dictionary> aruco_dict_
std::string img_encoding_
std::string camera_image_topic_ = "camera/image_raw"
std::string camera_info_topic_ = "camera/camera_info"
class DisarmService : public nav2_behavior_tree::BtServiceNode<std_srvs::srv::SetBool>

Public Functions

DisarmService(const std::string &xml_tag_name, const BT::NodeConfiguration &conf)
virtual void on_tick() override

Function to perform some user-defined operation on tick Fill in service request with information if necessary.

BT::NodeStatus on_completion(std::shared_ptr<std_srvs::srv::SetBool::Response> response)
class DynamicPolynomialTrajectoryGenerator : public as2_behavior::BehaviorServer<as2_msgs::action::GeneratePolynomialTrajectory>

Public Functions

DynamicPolynomialTrajectoryGenerator(const rclcpp::NodeOptions &options = rclcpp::NodeOptions())
inline ~DynamicPolynomialTrajectoryGenerator()

Private Functions

bool on_activate(std::shared_ptr<const as2_msgs::action::GeneratePolynomialTrajectory::Goal> goal) override

As2 Behavior methods

bool on_modify(std::shared_ptr<const as2_msgs::action::GeneratePolynomialTrajectory::Goal> goal) override
virtual bool on_deactivate(const std::shared_ptr<std::string> &message) override
virtual bool on_pause(const std::shared_ptr<std::string> &message) override
virtual bool on_resume(const std::shared_ptr<std::string> &message) override
as2_behavior::ExecutionStatus on_run(const std::shared_ptr<const as2_msgs::action::GeneratePolynomialTrajectory::Goal> &goal, std::shared_ptr<as2_msgs::action::GeneratePolynomialTrajectory::Feedback> &feedback_msg, std::shared_ptr<as2_msgs::action::GeneratePolynomialTrajectory::Result> &result_msg) override
virtual void on_execution_end(const as2_behavior::ExecutionStatus &state) override
void stateCallback(const geometry_msgs::msg::TwistStamped::SharedPtr msg)

Topic Callbacks

void yawCallback(const std_msgs::msg::Float32::SharedPtr _msg)
void modifyWaypointCallback(const as2_msgs::msg::PoseStampedWithID::SharedPtr _msg)

For faster waypoint modified

void setup()

Trajectory generator functions

bool goalToDynamicWaypoint(std::shared_ptr<const as2_msgs::action::GeneratePolynomialTrajectory::Goal> goal, dynamic_traj_generator::DynamicWaypoint::Vector &waypoints)
bool evaluateTrajectory(double _eval_time)
double computeYawAnglePathFacing()
void plotTrajectory()

Debug functions

void plotTrajectoryThread()
void plotRefTrajPoint()

Private Members

rclcpp::Subscription<geometry_msgs::msg::TwistStamped>::SharedPtr state_sub_

Subscriptions

rclcpp::Subscription<std_msgs::msg::Float32>::SharedPtr yaw_sub_
rclcpp::Subscription<as2_msgs::msg::PoseStampedWithID>::SharedPtr mod_waypoint_sub_
std::shared_ptr<dynamic_traj_generator::DynamicTrajectory> trajectory_generator_

Dynamic trajectory generator library

as2::motionReferenceHandlers::HoverMotion hover_motion_handler_

Handlers

as2::motionReferenceHandlers::TrajectoryMotion trajectory_motion_handler_
as2::tf::TfHandler tf_handler_

Parameters

std::string desired_frame_id_
as2_msgs::msg::YawMode yaw_mode_
as2_msgs::action::GeneratePolynomialTrajectory::Goal goal_
as2_msgs::action::GeneratePolynomialTrajectory::Feedback feedback_
as2_msgs::action::GeneratePolynomialTrajectory::Result result_
bool has_yaw_from_topic_ = false
float yaw_from_topic_ = 0.0f
float init_yaw_angle_ = 0.0f
Eigen::Vector3d current_position_
double current_yaw_
double yaw_angle_ = 0.0
dynamic_traj_generator::References traj_command_
rclcpp::Time time_zero_
bool first_run_ = false
bool has_odom_ = false
bool enable_debug_ = true
std::thread plot_thread_
rclcpp::Publisher<nav_msgs::msg::Path>::SharedPtr path_pub_

For debuging Debug publishers

rclcpp::Publisher<visualization_msgs::msg::Marker>::SharedPtr ref_point_pub
class Echo : public BT::SyncActionNode

Public Functions

Echo(const std::string &xml_tag_name, const BT::NodeConfiguration &conf)
BT::NodeStatus tick() override

Public Static Functions

static inline BT::PortsList providedPorts()

Private Members

rclcpp::Node::SharedPtr node_
struct follow_path_plugin_params

Public Members

double follow_path_speed = 0.0
double follow_path_threshold = 0.0
double tf_timeout_threshold = 0.0
class FollowPathAction : public nav2_behavior_tree::BtActionNode<as2_msgs::action::FollowPath>

Public Functions

inline FollowPathAction(const std::string &xml_tag_name, const BT::NodeConfiguration &conf)
inline virtual void on_tick()

Function to perform some user-defined operation on tick Could do dynamic checks, such as getting updates to values on the blackboard.

inline void on_wait_for_result(std::shared_ptr<const as2_msgs::action::FollowPath::Feedback> feedback)

Public Static Functions

static inline BT::PortsList providedPorts()

Private Members

std::vector<as2_msgs::msg::PoseWithID> path_
double max_speed_
int yaw_mode_
class FollowPathBase

Subclassed by follow_path_plugin_position::Plugin, follow_path_plugin_trajectory::Plugin

Public Types

using GoalHandleFollowPath = rclcpp_action::ServerGoalHandle<as2_msgs::action::FollowPath>

Public Functions

inline FollowPathBase()
inline virtual ~FollowPathBase()
inline void initialize(as2::Node *node_ptr, std::shared_ptr<as2::tf::TfHandler> tf_handler, follow_path_plugin_params &params)
inline virtual void state_callback(geometry_msgs::msg::PoseStamped &pose_msg, geometry_msgs::msg::TwistStamped &twist_msg)
inline void platform_info_callback(const as2_msgs::msg::PlatformInfo::SharedPtr msg)
inline bool on_activate(std::shared_ptr<const as2_msgs::action::FollowPath::Goal> goal)
inline bool on_modify(std::shared_ptr<const as2_msgs::action::FollowPath::Goal> goal)
inline bool on_deactivate(const std::shared_ptr<std::string> &message)
inline bool on_pause(const std::shared_ptr<std::string> &message)
inline bool on_resume(const std::shared_ptr<std::string> &message)
inline void on_execution_end(const as2_behavior::ExecutionStatus &state)
inline virtual as2_behavior::ExecutionStatus on_run(const std::shared_ptr<const as2_msgs::action::FollowPath::Goal> goal, std::shared_ptr<as2_msgs::action::FollowPath::Feedback> &feedback_msg, std::shared_ptr<as2_msgs::action::FollowPath::Result> &result_msg)

Protected Functions

inline virtual void ownInit()
virtual bool own_activate(as2_msgs::action::FollowPath::Goal &goal) = 0
inline virtual bool own_modify(as2_msgs::action::FollowPath::Goal &goal)
virtual bool own_deactivate(const std::shared_ptr<std::string> &message) = 0
inline virtual bool own_pause(const std::shared_ptr<std::string> &message)
inline virtual bool own_resume(const std::shared_ptr<std::string> &message)
virtual void own_execution_end(const as2_behavior::ExecutionStatus &state) = 0
virtual as2_behavior::ExecutionStatus own_run() = 0
virtual Eigen::Vector3d getTargetPosition() = 0
inline void sendHover()
inline float getActualYaw()

Protected Attributes

as2::Node *node_ptr_
std::shared_ptr<as2::tf::TfHandler> tf_handler = nullptr
as2_msgs::action::FollowPath::Goal goal_
as2_msgs::action::FollowPath::Feedback feedback_
as2_msgs::action::FollowPath::Result result_
int platform_state_
follow_path_plugin_params params_
geometry_msgs::msg::PoseStamped actual_pose_
bool localization_flag_ = false

Private Functions

inline bool processGoal(as2_msgs::action::FollowPath::Goal &_goal)
inline void reset()

Private Members

std::shared_ptr<as2::motionReferenceHandlers::HoverMotion> hover_motion_handler_ = nullptr
bool goal_accepted_ = false
class FollowPathBehavior : public as2_behavior::BehaviorServer<as2_msgs::action::FollowPath>

Public Types

using GoalHandleFollowPath = rclcpp_action::ServerGoalHandle<as2_msgs::action::FollowPath>

Public Functions

FollowPathBehavior(const rclcpp::NodeOptions &options = rclcpp::NodeOptions())
~FollowPathBehavior()
void state_callback(const geometry_msgs::msg::TwistStamped::SharedPtr _twist_msg)
void platform_info_callback(const as2_msgs::msg::PlatformInfo::SharedPtr msg)
bool process_goal(std::shared_ptr<const as2_msgs::action::FollowPath::Goal> goal, as2_msgs::action::FollowPath::Goal &new_goal)
bool on_activate(std::shared_ptr<const as2_msgs::action::FollowPath::Goal> goal) override
bool on_modify(std::shared_ptr<const as2_msgs::action::FollowPath::Goal> goal) override
virtual bool on_deactivate(const std::shared_ptr<std::string> &message) override
virtual bool on_pause(const std::shared_ptr<std::string> &message) override
virtual bool on_resume(const std::shared_ptr<std::string> &message) override
as2_behavior::ExecutionStatus on_run(const std::shared_ptr<const as2_msgs::action::FollowPath::Goal> &goal, std::shared_ptr<as2_msgs::action::FollowPath::Feedback> &feedback_msg, std::shared_ptr<as2_msgs::action::FollowPath::Result> &result_msg) override
virtual void on_execution_end(const as2_behavior::ExecutionStatus &state) override

Private Members

std::shared_ptr<pluginlib::ClassLoader<follow_path_base::FollowPathBase>> loader_
std::shared_ptr<follow_path_base::FollowPathBase> follow_path_plugin_
std::shared_ptr<as2::tf::TfHandler> tf_handler_
std::chrono::nanoseconds tf_timeout
rclcpp::Subscription<geometry_msgs::msg::TwistStamped>::SharedPtr twist_sub_
rclcpp::Subscription<as2_msgs::msg::PlatformInfo>::SharedPtr platform_info_sub_
class FollowPathBehaviorEmulator : public as2::BasicBehavior<as2_msgs::action::FollowPath>

Public Types

using GoalHandleFollowPath = rclcpp_action::ServerGoalHandle<as2_msgs::action::FollowPath>

Public Functions

inline FollowPathBehaviorEmulator()
inline ~FollowPathBehaviorEmulator()
inline rclcpp_action::GoalResponse onAccepted(const std::shared_ptr<const as2_msgs::action::FollowPath::Goal> goal)
inline virtual rclcpp_action::CancelResponse onCancel(const std::shared_ptr<GoalHandleFollowPath> goal_handle)
inline virtual void onExecute(const std::shared_ptr<GoalHandleFollowPath> goal_handle)
class FollowReferenceBehavior : public as2_behavior::BehaviorServer<as2_msgs::action::FollowReference>

Public Types

using GoalHandleFollowReference = rclcpp_action::ServerGoalHandle<as2_msgs::action::FollowReference>

Public Functions

FollowReferenceBehavior(const rclcpp::NodeOptions &options = rclcpp::NodeOptions())
~FollowReferenceBehavior()
void state_callback(const geometry_msgs::msg::TwistStamped::SharedPtr _twist_msg)
void platform_info_callback(const as2_msgs::msg::PlatformInfo::SharedPtr msg)
bool process_goal(std::shared_ptr<const as2_msgs::action::FollowReference::Goal> goal, as2_msgs::action::FollowReference::Goal &new_goal)
bool on_activate(std::shared_ptr<const as2_msgs::action::FollowReference::Goal> goal) override
bool on_modify(std::shared_ptr<const as2_msgs::action::FollowReference::Goal> goal) override
virtual bool on_deactivate(const std::shared_ptr<std::string> &message) override
virtual bool on_pause(const std::shared_ptr<std::string> &message) override
virtual bool on_resume(const std::shared_ptr<std::string> &message) override
as2_behavior::ExecutionStatus on_run(const std::shared_ptr<const as2_msgs::action::FollowReference::Goal> &goal, std::shared_ptr<as2_msgs::action::FollowReference::Feedback> &feedback_msg, std::shared_ptr<as2_msgs::action::FollowReference::Result> &result_msg) override
virtual void on_execution_end(const as2_behavior::ExecutionStatus &state) override

Private Functions

inline void sendHover()
inline float getActualYaw()
bool getState()
bool computeYaw(const uint8_t yaw_mode, const geometry_msgs::msg::Point &target, const geometry_msgs::msg::Point &actual, float &yaw)
bool checkGoal(as2_msgs::action::FollowReference::Goal &_goal)

Private Members

geometry_msgs::msg::PoseStamped actual_pose_
geometry_msgs::msg::TwistStamped actual_twist
rclcpp::Subscription<geometry_msgs::msg::TwistStamped>::SharedPtr twist_sub_
rclcpp::Subscription<as2_msgs::msg::PlatformInfo>::SharedPtr platform_info_sub_
std::shared_ptr<as2::tf::TfHandler> tf_handler_
std::chrono::nanoseconds tf_timeout
as2_msgs::action::FollowReference::Goal goal_
as2_msgs::action::FollowReference::Feedback feedback_
as2_msgs::action::FollowReference::Result result_
std::shared_ptr<as2::motionReferenceHandlers::PositionMotion> position_motion_handler_ = nullptr
std::shared_ptr<as2::motionReferenceHandlers::HoverMotion> hover_motion_handler_ = nullptr
int platform_state_
bool localization_flag_ = false
class GazeboPlatform : public as2::AerialPlatform

Public Functions

GazeboPlatform()
inline ~GazeboPlatform()
inline virtual void configureSensors()

Configures the platform sensors.

virtual bool ownSendCommand() override

Handles how a command must be sended in the concrete platform.

Returns:

true command is sended successfully.

Returns:

false command is not sended.

virtual bool ownSetArmingState(bool state) override

Handles how arming state has to be settled in the concrete platform.

Parameters:

state – true for arming the platform, false to disarm.

Returns:

true Arming state is settled successfully.

Returns:

false Arming state is not settled.

virtual bool ownSetOffboardControl(bool offboard) override

Handles how offboard mode has to be settled in the concrete platform.

Parameters:

offboard – true if offboard mode is enabled.

Returns:

true Offboard mode is settled successfully.

Returns:

false Offboard mode is not settled.

virtual bool ownSetPlatformControlMode(const as2_msgs::msg::ControlMode &msg) override

Handles how the control mode has to be settled in the concrete platform.

Parameters:

control_mode – as2_msgs::msg::PlatformControlMode with the new control mode.

Returns:

true Control mode is settled successfully.

Returns:

false Control mode is not settled.

virtual void ownKillSwitch() override

Handles the platform emergency kill switch command. This means stop the motors inmediately, this cannot be reversed. USE WITH CAUTION.

virtual void ownStopPlatform() override

Handles the platform emergency stop command. STOP means to hover as best as possible. This hover is different from the hover in the platform control mode. And when it is activated the platform will stop hearing commands from AS2. USE WITH CAUTION.

virtual bool ownTakeoff() override

Handles the platform takeoff command.

Returns:

true Takeoff command is sended successfully.

Returns:

false Takeoff command is not sended.

virtual bool ownLand() override

Handles the platform landing command.

Returns:

true Landing command is sended successfully.

Returns:

false Landing command is not sended.

Public Members

rclcpp::Publisher<geometry_msgs::msg::Twist>::SharedPtr twist_pub_
rclcpp::Publisher<std_msgs::msg::Bool>::SharedPtr arm_pub_
rclcpp::Subscription<geometry_msgs::msg::TwistStamped>::SharedPtr twist_state_sub_

Private Functions

void resetCommandTwistMsg()
void state_callback(const geometry_msgs::msg::TwistStamped::SharedPtr _twist_msg)

Private Members

as2_msgs::msg::ControlMode control_in_
double yaw_rate_limit_ = M_PI_2
bool enable_takeoff_ = false
bool enable_land_ = false
bool state_received_ = false
double current_height_ = 0.0
double current_vertical_speed_ = 0.0
std::shared_ptr<as2::tf::TfHandler> tf_handler_
template<class Clock = std::chrono::high_resolution_clock>
class GenericRate : public as2::rate::RateBase

Public Functions

inline explicit GenericRate(double rate)
inline explicit GenericRate(std::chrono::nanoseconds period)
inline virtual bool sleep()
inline virtual void set_period(double rate)
inline virtual void set_period(std::chrono::nanoseconds period)
inline virtual bool is_steady() const
inline virtual void reset()
inline std::chrono::nanoseconds period() const

Private Types

using ClockDurationNano = std::chrono::duration<typename Clock::rep, std::nano>

Private Members

std::chrono::nanoseconds period_
std::chrono::time_point<Clock, ClockDurationNano> last_interval_
class GenericSensor
#include <sensor.hpp>

GenericSensor object to publish sensor data at a given frequency.

Subclassed by as2::sensors::Camera, as2::sensors::Gimbal, as2::sensors::GroundTruth, as2::sensors::Sensor< T >

Public Functions

explicit GenericSensor(as2::Node *node_ptr, const float pub_freq = -1.0f)

Construct a new GenericSensor object.

Parameters:
  • node_ptr – Pointer to the node

  • pub_freq – Frequency to publish the data (-1 to publish every time updateData is called)

virtual ~GenericSensor()

Destroy the GenericSensor object.

void dataUpdated()

User must call this function when the data is updated.

virtual void publishData() = 0

User must implement the data publishing in this function.

Private Functions

void timerCallback()

Callback function for the timer. Publishes the data.

Private Members

rclcpp::TimerBase::SharedPtr timer_
float pub_freq_
class GetOrigin : public nav2_behavior_tree::BtServiceNode<as2_msgs::srv::GetOrigin>

Public Functions

GetOrigin(const std::string &xml_tag_name, const BT::NodeConfiguration &conf)
virtual void on_tick() override

Function to perform some user-defined operation on tick Fill in service request with information if necessary.

BT::NodeStatus on_completion()

Public Static Functions

static inline BT::PortsList providedPorts()
class Gimbal : public as2::sensors::TFStatic, protected as2::sensors::TFDynamic, protected as2::sensors::GenericSensor, protected as2::sensors::SensorData<geometry_msgs::msg::PoseStamped>
#include <sensor.hpp>

Class to handle the gimbal sensor.

Public Functions

explicit Gimbal(const std::string &gimbal_id, const std::string &gimbal_base_id, as2::Node *node_ptr, const float pub_freq = -1.0f, bool add_sensor_measurements_base = true)

Construct a new Gimbal object.

Parameters:
  • gimbal_id – Frame ID of the gimbal

  • gimbal_base_id – Frame ID of the gimbal base

  • node_ptr – Pointer to the node

  • pub_freq – Frequency to publish the data (-1 to publish every time updateData is called)

  • add_sensor_measurements_base – Add “sensor_measurements” to the topic name

virtual ~Gimbal()

Destroy the Gimbal object.

void setGimbalBaseTransform(const geometry_msgs::msg::Transform &gimbal_base_transform, const std::string &gimbal_parent_frame_id = "base_link")

Set the gimbal base transformation respect to the parent frame.

Parameters:
  • gimbal_base_transform – Transform message

  • gimbal_parent_frame_id – Parent frame ID (default is “base_link”)

void updateData(const geometry_msgs::msg::PoseStamped &pose_msg)

Update the gimbal transformation respect to the base.

Parameters:

pose_msg – Pose message

void updateData(const geometry_msgs::msg::QuaternionStamped &orientation_msg)

Update the gimbal transformation respect to the base.

Parameters:

pose_msg – Pose message

const std::string &getGimbalFrameId() const

Get the Gimbal Frame ID.

Returns:

const std::string& Frame ID of the gimbal

const std::string &getGimbalBaseFrameId() const

Get the Gimbal Base Frame ID.

Returns:

const std::string& Frame ID of the gimbal base

Protected Functions

virtual void publishData()

Publish the data in a topic and in TF.

Protected Attributes

std::string gimbal_frame_id_
std::string gimbal_base_frame_id_
geometry_msgs::msg::TransformStamped gimbal_transform_
struct gimbal_status

Public Members

geometry_msgs::msg::Vector3 orientation
class GimbalBridge : public rclcpp::Node

Public Functions

inline GimbalBridge()

Private Functions

inline void gimbalCmdCallback(const as2_msgs::msg::GimbalControl::SharedPtr msg)

Private Members

rclcpp::Subscription<as2_msgs::msg::GimbalControl>::SharedPtr gimbal_cmd_sub_
std::shared_ptr<gz::transport::Node> gz_node_ptr_
gz::transport::Node::Publisher gimbal_roll_pub
gz::transport::Node::Publisher gimbal_pitch_pub
gz::transport::Node::Publisher gimbal_yaw_pub

Private Static Functions

static inline void gzJointStateCallback(const gz::msgs::Model &gz_msg, const gz::transport::MessageInfo &msg_info)

Private Static Attributes

static std::string model_name_ = ""
static std::string gimbal_name_ = ""
static std::string sensor_name_ = ""
static std::string control_mode_ = ""
static std::string world_name_ = ""
static rclcpp::Publisher<geometry_msgs::msg::QuaternionStamped>::SharedPtr gimbal_attitude_pub_ = nullptr
static rclcpp::Publisher<geometry_msgs::msg::Vector3Stamped>::SharedPtr gimbal_angular_velocity_pub_ = nullptr
static std::shared_ptr<rclcpp::Clock> clock_ = nullptr
struct go_to_plugin_params

Public Members

double go_to_speed = 0.0
double go_to_threshold = 0.0
double tf_timeout_threshold = 0.0
class GoToAction : public nav2_behavior_tree::BtActionNode<as2_msgs::action::GoToWaypoint>

Public Functions

GoToAction(const std::string &xml_tag_name, const BT::NodeConfiguration &conf)
virtual void on_tick()

Function to perform some user-defined operation on tick Could do dynamic checks, such as getting updates to values on the blackboard.

void on_wait_for_result(std::shared_ptr<const as2_msgs::action::GoToWaypoint::Feedback> feedback)

Public Static Functions

static inline BT::PortsList providedPorts()
class GoToBase

Subclassed by go_to_plugin_position::Plugin, go_to_plugin_trajectory::Plugin

Public Types

using GoalHandleGoTo = rclcpp_action::ServerGoalHandle<as2_msgs::action::GoToWaypoint>

Public Functions

inline GoToBase()
inline virtual ~GoToBase()
inline void initialize(as2::Node *node_ptr, std::shared_ptr<as2::tf::TfHandler> tf_handler, go_to_plugin_params &params)
inline void state_callback(geometry_msgs::msg::PoseStamped &pose_msg, geometry_msgs::msg::TwistStamped &twist_msg)
inline void platform_info_callback(const as2_msgs::msg::PlatformInfo::SharedPtr msg)
inline bool on_activate(std::shared_ptr<const as2_msgs::action::GoToWaypoint::Goal> goal)
inline bool on_modify(std::shared_ptr<const as2_msgs::action::GoToWaypoint::Goal> goal)
inline bool on_deactivate(const std::shared_ptr<std::string> &message)
inline bool on_pause(const std::shared_ptr<std::string> &message)
inline bool on_resume(const std::shared_ptr<std::string> &message)
inline void on_execution_end(const as2_behavior::ExecutionStatus &state)
inline as2_behavior::ExecutionStatus on_run(const std::shared_ptr<const as2_msgs::action::GoToWaypoint::Goal> goal, std::shared_ptr<as2_msgs::action::GoToWaypoint::Feedback> &feedback_msg, std::shared_ptr<as2_msgs::action::GoToWaypoint::Result> &result_msg)

Protected Functions

inline virtual void ownInit()
virtual bool own_activate(as2_msgs::action::GoToWaypoint::Goal &goal) = 0
inline virtual bool own_modify(as2_msgs::action::GoToWaypoint::Goal &goal)
virtual bool own_deactivate(const std::shared_ptr<std::string> &message) = 0
inline virtual bool own_pause(const std::shared_ptr<std::string> &message)
inline virtual bool own_resume(const std::shared_ptr<std::string> &message)
virtual void own_execution_end(const as2_behavior::ExecutionStatus &state) = 0
virtual as2_behavior::ExecutionStatus own_run() = 0
inline void sendHover()

Protected Attributes

as2::Node *node_ptr_
std::shared_ptr<as2::tf::TfHandler> tf_handler = nullptr
as2_msgs::action::GoToWaypoint::Goal goal_
as2_msgs::action::GoToWaypoint::Feedback feedback_
as2_msgs::action::GoToWaypoint::Result result_
int platform_state_
go_to_plugin_params params_
geometry_msgs::msg::PoseStamped actual_pose_
bool localization_flag_

Private Functions

inline bool processGoal(as2_msgs::action::GoToWaypoint::Goal &_goal)

Private Members

std::shared_ptr<as2::motionReferenceHandlers::HoverMotion> hover_motion_handler_ = nullptr
class GoToBehavior : public as2_behavior::BehaviorServer<as2_msgs::action::GoToWaypoint>

Public Types

using GoalHandleGoTo = rclcpp_action::ServerGoalHandle<as2_msgs::action::GoToWaypoint>

Public Functions

GoToBehavior(const rclcpp::NodeOptions &options = rclcpp::NodeOptions())
~GoToBehavior()
void state_callback(const geometry_msgs::msg::TwistStamped::SharedPtr _twist_msg)
void platform_info_callback(const as2_msgs::msg::PlatformInfo::SharedPtr msg)
bool process_goal(std::shared_ptr<const as2_msgs::action::GoToWaypoint::Goal> goal, as2_msgs::action::GoToWaypoint::Goal &new_goal)
bool on_activate(std::shared_ptr<const as2_msgs::action::GoToWaypoint::Goal> goal) override
bool on_modify(std::shared_ptr<const as2_msgs::action::GoToWaypoint::Goal> goal) override
virtual bool on_deactivate(const std::shared_ptr<std::string> &message) override
virtual bool on_pause(const std::shared_ptr<std::string> &message) override
virtual bool on_resume(const std::shared_ptr<std::string> &message) override
as2_behavior::ExecutionStatus on_run(const std::shared_ptr<const as2_msgs::action::GoToWaypoint::Goal> &goal, std::shared_ptr<as2_msgs::action::GoToWaypoint::Feedback> &feedback_msg, std::shared_ptr<as2_msgs::action::GoToWaypoint::Result> &result_msg) override
virtual void on_execution_end(const as2_behavior::ExecutionStatus &state) override

Private Members

std::shared_ptr<pluginlib::ClassLoader<go_to_base::GoToBase>> loader_
std::shared_ptr<go_to_base::GoToBase> go_to_plugin_
std::shared_ptr<as2::tf::TfHandler> tf_handler_
std::chrono::nanoseconds tf_timeout
rclcpp::Subscription<geometry_msgs::msg::TwistStamped>::SharedPtr twist_sub_
rclcpp::Subscription<as2_msgs::msg::PlatformInfo>::SharedPtr platform_info_sub_
class GoToBehaviorEmulator : public as2::BasicBehavior<as2_msgs::action::GoToWaypoint>

Public Types

using GoalHandleLand = rclcpp_action::ServerGoalHandle<as2_msgs::action::GoToWaypoint>

Public Functions

inline GoToBehaviorEmulator()
inline ~GoToBehaviorEmulator()
inline rclcpp_action::GoalResponse onAccepted(const std::shared_ptr<const as2_msgs::action::GoToWaypoint::Goal> goal)
inline virtual rclcpp_action::CancelResponse onCancel(const std::shared_ptr<GoalHandleLand> goal_handle)
inline virtual void onExecute(const std::shared_ptr<GoalHandleLand> goal_handle)
class GoTobehaviorEmulator : public as2::BasicBehavior<as2_msgs::action::GoToWaypoint>

Public Types

using GoalHandleLand = rclcpp_action::ServerGoalHandle<as2_msgs::action::GoToWaypoint>

Public Functions

inline GoTobehaviorEmulator()
inline ~GoTobehaviorEmulator()
inline rclcpp_action::GoalResponse onAccepted(const std::shared_ptr<const as2_msgs::action::GoToWaypoint::Goal> goal)
inline virtual rclcpp_action::CancelResponse onCancel(const std::shared_ptr<GoalHandleLand> goal_handle)
inline virtual void onExecute(const std::shared_ptr<GoalHandleLand> goal_handle)
class GoToGpsAction : public nav2_behavior_tree::BtActionNode<as2_msgs::action::GoToWaypoint>

Public Functions

GoToGpsAction(const std::string &xml_tag_name, const BT::NodeConfiguration &conf)
virtual void on_tick() override

Function to perform some user-defined operation on tick Could do dynamic checks, such as getting updates to values on the blackboard.

void on_wait_for_result(std::shared_ptr<const as2_msgs::action::GoToWaypoint::Feedback> feedback)

Public Static Functions

static inline BT::PortsList providedPorts()

Private Members

rclcpp::Node::SharedPtr node_
rclcpp::Client<as2_msgs::srv::GeopathToPath>::SharedPtr client
geographic_msgs::msg::GeoPoseStamped geopose
geometry_msgs::msg::Point point
std::string service_name_
class GPSBridge : public rclcpp::Node

Public Functions

inline GPSBridge()

Private Members

std::shared_ptr<gz::transport::Node> ign_node_ptr_
std::string world_name
std::string name_space
std::string sensor_name
std::string sensor_type

Private Static Functions

static inline std::string replace_delimiter(const std::string &input, const std::string &old_delim, const std::string new_delim)
static inline void ignitionGPSCallback(const gz::msgs::NavSat &ign_msg, const gz::transport::MessageInfo &msg_info)

Private Static Attributes

static bool use_sim_time_ = false
static rclcpp::Publisher<sensor_msgs::msg::NavSatFix>::SharedPtr gps_pub_ = nullptr
class GpsHandler : private GeographicLib::LocalCartesian

Public Functions

inline GpsHandler()

Construct a new Gps Handler object based on WGS84 ellipsoid.

inline GpsHandler(double lat0, double lon0, double h0 = 0)

Construct a new Gps Handler object based on WGS84 ellipsoid with a given origin.

Parameters:
  • lat0 – Latitude at origin (degrees)

  • lon0 – Longitude at origin (degrees)

  • h0 – Altitude at origin (meters)

void setOrigin(const double &lat0, const double &lon0, const double &h0 = 0)
void setOrigin(const sensor_msgs::msg::NavSatFix &fix)
void setOrigin(const geographic_msgs::msg::GeoPoseStamped &gps)
void getOrigin(double &rLat, double &rLon, double &rH)
void getOrigin(geographic_msgs::msg::GeoPoseStamped &gps)
void LatLon2Local(const double &lat, const double &lon, const double &h, double &rX, double &rY, double &rZ)
void LatLon2Local(const sensor_msgs::msg::NavSatFix &fix, double &rX, double &rY, double &rZ)
void LatLon2Local(const geographic_msgs::msg::GeoPoseStamped &gps, double &rX, double &rY, double &rZ)
void LatLon2Local(const double &lat, const double &lon, const double &h, geometry_msgs::msg::PoseStamped &ps)
void LatLon2Local(const sensor_msgs::msg::NavSatFix &fix, geometry_msgs::msg::PoseStamped &ps)
void LatLon2Local(const geographic_msgs::msg::GeoPoseStamped &gps, geometry_msgs::msg::PoseStamped &ps)
void Local2LatLon(const double &x, const double &y, const double &z, double &rLat, double &rLon, double &rH)
void Local2LatLon(const double &x, const double &y, const double &z, geographic_msgs::msg::GeoPoseStamped &gps)
void Local2LatLon(const geometry_msgs::msg::PoseStamped &ps, double &rLat, double &rLon, double &rH)
void Local2LatLon(const geometry_msgs::msg::PoseStamped &ps, geographic_msgs::msg::GeoPoseStamped &gps)

Public Static Functions

static void LatLon2Ecef(const double &lat, const double &lon, const double &h, double &rX, double &rY, double &rZ)
static void LatLon2Ecef(const sensor_msgs::msg::NavSatFix &fix, double &rX, double &rY, double &rZ)
static void LatLon2Ecef(const geographic_msgs::msg::GeoPoseStamped &gps, double &rX, double &rY, double &rZ)
static void LatLon2Ecef(const double &lat, const double &lon, const double &h, geometry_msgs::msg::PoseStamped &ps)
static void LatLon2Ecef(const sensor_msgs::msg::NavSatFix &fix, geometry_msgs::msg::PoseStamped &ps)
static void LatLon2Ecef(const geographic_msgs::msg::GeoPoseStamped &gps, geometry_msgs::msg::PoseStamped &ps)
static void Ecef2LatLon(const double &x, const double &y, const double &z, double &rLat, double &rLon, double &rH)
static void Ecef2LatLon(const double &x, const double &y, const double &z, geographic_msgs::msg::GeoPoseStamped &gps)
static void Ecef2LatLon(const geometry_msgs::msg::PoseStamped &ps, double &rLat, double &rLon, double &rH)
static void Ecef2LatLon(const geometry_msgs::msg::PoseStamped &ps, geographic_msgs::msg::GeoPoseStamped &gps)

Private Members

const std::string local_frame_ = "map"
bool is_origin_set_ = false
class GpsToCartesian : public nav2_behavior_tree::BtServiceNode<as2_msgs::srv::GeopathToPath>

Public Functions

GpsToCartesian(const std::string &xml_tag_name, const BT::NodeConfiguration &conf)
virtual void on_tick() override

Function to perform some user-defined operation on tick Fill in service request with information if necessary.

BT::NodeStatus on_completion()

Public Static Functions

static inline BT::PortsList providedPorts()

Private Members

geometry_msgs::msg::Pose pose
geographic_msgs::msg::GeoPoseStamped geopose
geographic_msgs::msg::GeoPath geopath
class GroundTruth : protected as2::sensors::GenericSensor
#include <sensor.hpp>

Class to handle the ground truth of the platform.

Public Functions

explicit GroundTruth(as2::Node *node_ptr, const float pub_freq = -1, const std::string &topic_name_base = "")

Construct a new GroundTruth object.

Parameters:
  • node_ptr – Pointer to the node

  • pub_freq – Frequency to publish the data (-1 to publish every time updateData is called)

  • topic_name_base – Base name of the topics. Default is “”

virtual ~GroundTruth()

Destroy the GroundTruth object.

void updateData(const geometry_msgs::msg::PoseStamped &pose_msg)

Update the data of the ground truth.

Parameters:

pose_msg – Pose message

void updateData(const geometry_msgs::msg::TwistStamped &twist_msg)

Update the data of the ground truth.

Parameters:

twist_msg – Twist message

void updateData(const geometry_msgs::msg::PoseStamped &pose_msg, const geometry_msgs::msg::TwistStamped &twist_msg)

Update the data of the ground truth.

Parameters:
  • pose_msg – Pose message

  • twist_msg – Twist message

Protected Functions

virtual void publishData() override

User must implement the data publishing in this function.

Protected Attributes

std::shared_ptr<SensorData<geometry_msgs::msg::PoseStamped>> pose_sensor_
std::shared_ptr<SensorData<geometry_msgs::msg::TwistStamped>> twist_sensor_
class GroundTruthBridge : public rclcpp::Node

Public Functions

inline GroundTruthBridge()

Private Members

std::shared_ptr<gz::transport::Node> ign_node_ptr_
std::string model_name_

Private Static Functions

static inline std::string replace_delimiter(const std::string &input, const std::string &old_delim, const std::string new_delim)
static inline void ignitionGroundTruthCallback(const gz::msgs::Odometry &ign_msg, const gz::transport::MessageInfo &msg_info)

Private Static Attributes

static std::string pose_frame_id_ = ""
static std::string twist_frame_id_ = ""
static rclcpp::Publisher<geometry_msgs::msg::PoseStamped>::SharedPtr ps_pub_ = nullptr
static rclcpp::Publisher<geometry_msgs::msg::TwistStamped>::SharedPtr ts_pub_ = nullptr
class HoverMotion : public as2::motionReferenceHandlers::BasicMotionReferenceHandler
#include <hover_motion.hpp>

The HoverMotion class is a motion reference handler that allows the robot to hover at the current position.

Public Functions

HoverMotion(as2::Node *node_ptr, const std::string &ns = "")

HoverMotion Constructor.

Parameters:

nodeas2::Node pointer.

inline ~HoverMotion()
bool sendHover()

Send hover motion command.

Returns:

true if the motion reference was sent successfully.

class IsFlyingCondition : public BT::ConditionNode

Public Functions

IsFlyingCondition(const std::string &xml_tag_name, const BT::NodeConfiguration &conf)
IsFlyingCondition() = delete
BT::NodeStatus tick() override

Public Static Functions

static inline BT::PortsList providedPorts()

Private Functions

inline void stateCallback(as2_msgs::msg::PlatformInfo::SharedPtr msg)

Private Members

rclcpp::Node::SharedPtr node_
rclcpp::CallbackGroup::SharedPtr callback_group_
rclcpp::executors::SingleThreadedExecutor callback_group_executor_
rclcpp::Subscription<as2_msgs::msg::PlatformInfo>::SharedPtr state_sub_
bool is_flying_ = false
struct land_plugin_params

Public Members

double land_speed = 0.0
double tf_timeout_threshold = 0.0
class LandAction : public nav2_behavior_tree::BtActionNode<as2_msgs::action::Land>

Public Functions

LandAction(const std::string &xml_tag_name, const BT::NodeConfiguration &conf)
virtual void on_tick() override

Function to perform some user-defined operation on tick Could do dynamic checks, such as getting updates to values on the blackboard.

void on_wait_for_result(std::shared_ptr<const as2_msgs::action::Land::Feedback> feedback)

Public Static Functions

static inline BT::PortsList providedPorts()
class LandBase

Subclassed by land_plugin_platform::Plugin, land_plugin_speed::Plugin, land_plugin_trajectory::Plugin

Public Types

using GoalHandleLand = rclcpp_action::ServerGoalHandle<as2_msgs::action::Land>

Public Functions

inline LandBase()
inline virtual ~LandBase()
inline void initialize(as2::Node *node_ptr, std::shared_ptr<as2::tf::TfHandler> tf_handler, land_plugin_params &params)
inline virtual void state_callback(geometry_msgs::msg::PoseStamped &pose_msg, geometry_msgs::msg::TwistStamped &twist_msg)
inline bool on_activate(std::shared_ptr<const as2_msgs::action::Land::Goal> goal)
inline bool on_modify(std::shared_ptr<const as2_msgs::action::Land::Goal> goal)
inline bool on_deactivate(const std::shared_ptr<std::string> &message)
inline bool on_pause(const std::shared_ptr<std::string> &message)
inline bool on_resume(const std::shared_ptr<std::string> &message)
inline void on_execution_end(const as2_behavior::ExecutionStatus &state)
inline as2_behavior::ExecutionStatus on_run(const std::shared_ptr<const as2_msgs::action::Land::Goal> goal, std::shared_ptr<as2_msgs::action::Land::Feedback> &feedback_msg, std::shared_ptr<as2_msgs::action::Land::Result> &result_msg)

Protected Functions

inline virtual void ownInit()
virtual bool own_activate(as2_msgs::action::Land::Goal &goal) = 0
inline virtual bool own_modify(as2_msgs::action::Land::Goal &goal)
virtual bool own_deactivate(const std::shared_ptr<std::string> &message) = 0
inline virtual bool own_pause(const std::shared_ptr<std::string> &message)
inline virtual bool own_resume(const std::shared_ptr<std::string> &message)
virtual void own_execution_end(const as2_behavior::ExecutionStatus &state) = 0
virtual as2_behavior::ExecutionStatus own_run() = 0
inline void sendHover()

Protected Attributes

as2::Node *node_ptr_
std::shared_ptr<as2::tf::TfHandler> tf_handler = nullptr
as2_msgs::action::Land::Goal goal_
as2_msgs::action::Land::Feedback feedback_
as2_msgs::action::Land::Result result_
land_plugin_params params_
geometry_msgs::msg::PoseStamped actual_pose_
bool localization_flag_ = false

Private Functions

inline bool processGoal(as2_msgs::action::Land::Goal &_goal)

Private Members

std::shared_ptr<as2::motionReferenceHandlers::HoverMotion> hover_motion_handler_ = nullptr
class LandBehavior : public as2_behavior::BehaviorServer<as2_msgs::action::Land>

Public Types

using GoalHandleLand = rclcpp_action::ServerGoalHandle<as2_msgs::action::Land>
using PSME = as2_msgs::msg::PlatformStateMachineEvent

Public Functions

LandBehavior(const rclcpp::NodeOptions &options = rclcpp::NodeOptions())
~LandBehavior()
void state_callback(const geometry_msgs::msg::TwistStamped::SharedPtr _twist_msg)
bool sendEventFSME(const int8_t _event)
bool sendDisarm()
bool process_goal(std::shared_ptr<const as2_msgs::action::Land::Goal> goal, as2_msgs::action::Land::Goal &new_goal)
bool on_activate(std::shared_ptr<const as2_msgs::action::Land::Goal> goal) override
bool on_modify(std::shared_ptr<const as2_msgs::action::Land::Goal> goal) override
virtual bool on_deactivate(const std::shared_ptr<std::string> &message) override
virtual bool on_pause(const std::shared_ptr<std::string> &message) override
virtual bool on_resume(const std::shared_ptr<std::string> &message) override
as2_behavior::ExecutionStatus on_run(const std::shared_ptr<const as2_msgs::action::Land::Goal> &goal, std::shared_ptr<as2_msgs::action::Land::Feedback> &feedback_msg, std::shared_ptr<as2_msgs::action::Land::Result> &result_msg) override
virtual void on_execution_end(const as2_behavior::ExecutionStatus &state) override

Private Members

std::shared_ptr<pluginlib::ClassLoader<land_base::LandBase>> loader_
std::shared_ptr<land_base::LandBase> land_plugin_
std::shared_ptr<as2::tf::TfHandler> tf_handler_
std::chrono::nanoseconds tf_timeout
rclcpp::Subscription<geometry_msgs::msg::TwistStamped>::SharedPtr twist_sub_
as2::SynchronousServiceClient<as2_msgs::srv::SetPlatformStateMachineEvent>::SharedPtr platform_land_cli_
as2::SynchronousServiceClient<std_srvs::srv::SetBool>::SharedPtr platform_disarm_cli_
class LandBehaviorEmulator : public as2::BasicBehavior<as2_msgs::action::Land>

Public Types

using GoalHandleLand = rclcpp_action::ServerGoalHandle<as2_msgs::action::Land>
using PSME = as2_msgs::msg::PlatformStateMachineEvent

Public Functions

inline LandBehaviorEmulator()
inline ~LandBehaviorEmulator()
inline rclcpp_action::GoalResponse onAccepted(const std::shared_ptr<const as2_msgs::action::Land::Goal> goal)
inline virtual rclcpp_action::CancelResponse onCancel(const std::shared_ptr<GoalHandleLand> goal_handle)
inline virtual void onExecute(const std::shared_ptr<GoalHandleLand> goal_handle)
class MultirotorSimulatorPlatform : public as2::AerialPlatform

Public Functions

explicit MultirotorSimulatorPlatform(const rclcpp::NodeOptions &options = rclcpp::NodeOptions())
~MultirotorSimulatorPlatform()
virtual void configureSensors() override

Configures the platform sensors.

virtual bool ownSetArmingState(bool state) override

Handles how arming state has to be settled in the concrete platform.

Parameters:

state – true for arming the platform, false to disarm.

Returns:

true Arming state is settled successfully.

Returns:

false Arming state is not settled.

virtual bool ownSetOffboardControl(bool offboard) override

Handles how offboard mode has to be settled in the concrete platform.

Parameters:

offboard – true if offboard mode is enabled.

Returns:

true Offboard mode is settled successfully.

Returns:

false Offboard mode is not settled.

virtual bool ownSetPlatformControlMode(const as2_msgs::msg::ControlMode &msg) override

Handles how the control mode has to be settled in the concrete platform.

Parameters:

control_mode – as2_msgs::msg::PlatformControlMode with the new control mode.

Returns:

true Control mode is settled successfully.

Returns:

false Control mode is not settled.

virtual bool ownSendCommand() override

Handles how a command must be sended in the concrete platform.

Returns:

true command is sended successfully.

Returns:

false command is not sended.

virtual void ownStopPlatform() override

Handles the platform emergency stop command. STOP means to hover as best as possible. This hover is different from the hover in the platform control mode. And when it is activated the platform will stop hearing commands from AS2. USE WITH CAUTION.

virtual void ownKillSwitch() override

Handles the platform emergency kill switch command. This means stop the motors inmediately, this cannot be reversed. USE WITH CAUTION.

virtual bool ownTakeoff() override

Handles the platform takeoff command.

Returns:

true Takeoff command is sended successfully.

Returns:

false Takeoff command is not sended.

virtual bool ownLand() override

Handles the platform landing command.

Returns:

true Landing command is sended successfully.

Returns:

false Landing command is not sended.

void gimbalControlCallback(const as2_msgs::msg::GimbalControl::SharedPtr msg)

Private Types

using Simulator = multirotor::Simulator<double, 4>
using SimulatorParams = multirotor::SimulatorParams<double, 4>

Private Functions

Eigen::Vector3d readVectorParams(const std::string &param_name)

Read given parameter of vector type.

Parameters:

param_name – Name of the parameter

Returns:

Eigen::Vector3d Vector parameter

inline void readParams(PlatformParams &platform_params)

Read platform parameters.

Parameters:

param_name – platform parameters

template<typename T>
inline void getParam(const std::string &param_name, T &param_value, bool use_default = true)

Get parameter from the parameter server.

Parameters:
  • param_name – Name of the parameter

  • param_value – Value of the parameter

  • use_default – Use default value if parameter is not found

void simulatorTimerCallback()

Simulator timer callback.

void simulatorControlTimerCallback()

Simulator control timer callback.

void simulatorStateTimerCallback()

Simulator state timer callback.

Private Members

std::shared_ptr<as2::tf::TfHandler> tf_handler_
as2::gps::GpsHandler gps_handler_
PlatformParams platform_params_
Simulator simulator_
SimulatorParams simulator_params_
rclcpp::TimerBase::SharedPtr simulator_timer_
rclcpp::TimerBase::SharedPtr simulator_control_timer_
rclcpp::TimerBase::SharedPtr simulator_state_pub_timer_
std::string frame_id_odom_ = "odom"
std::string frame_id_earth_ = "earth"
geometry_msgs::msg::QuaternionStamped gimbal_desired_orientation_
rclcpp::Subscription<as2_msgs::msg::GimbalControl>::SharedPtr gimbal_control_sub_
std::unique_ptr<as2::sensors::GroundTruth> sensor_ground_truth_ptr_
std::unique_ptr<as2::sensors::Sensor<nav_msgs::msg::Odometry>> sensor_odom_estimate_ptr_
std::unique_ptr<as2::sensors::Sensor<sensor_msgs::msg::Imu>> sensor_imu_ptr_
std::unique_ptr<as2::sensors::Sensor<sensor_msgs::msg::NavSatFix>> sensor_gps_ptr_
std::unique_ptr<as2::sensors::Gimbal> sensor_gimbal_ptr_
class Node : public AS2_NODE_FATHER_TYPE
#include <node.hpp>

Basic Aerostack2 Node, it heritages all the functionality of an rclcpp::Node.

Subclassed by as2::BasicBehavior< as2_msgs::action::Takeoff >, as2::BasicBehavior< as2_msgs::action::FollowPath >, as2::BasicBehavior< as2_msgs::action::GoToWaypoint >, as2::BasicBehavior< as2_msgs::action::Land >, as2::BasicBehavior< as2_msgs::action::Takeoff >, as2::BasicBehavior< as2_msgs::action::FollowPath >, as2::BasicBehavior< as2_msgs::action::GoToWaypoint >, as2::BasicBehavior< as2_msgs::action::Land >, as2_behavior::BehaviorServer< as2_msgs::action::SetArmingState >, as2_behavior::BehaviorServer< as2_msgs::action::Takeoff >, as2_behavior::BehaviorServer< as2_msgs::action::FollowReference >, as2_behavior::BehaviorServer< as2_msgs::action::GeneratePolynomialTrajectory >, as2_behavior::BehaviorServer< as2_msgs::action::FollowPath >, as2_behavior::BehaviorServer< as2_msgs::action::SetOffboardMode >, as2_behavior::BehaviorServer< as2_msgs::action::GoToWaypoint >, as2_behavior::BehaviorServer< as2_msgs::action::PointGimbal >, as2_behavior::BehaviorServer< as2_msgs::action::DetectArucoMarkers >, as2_behavior::BehaviorServer< as2_msgs::action::Land >, AlphanumericViewer, PlatformEmulator, RealsenseInterface, StateEstimator, UsbCameraInterface, as2::AerialPlatform, as2::BasicBehavior< MessageT >, as2::BasicBehavior< MessageT >, as2_behavior::BehaviorServer< actionT >, controller_manager::ControllerManager

Public Functions

inline Node(const std::string &name, const std::string &ns, const rclcpp::NodeOptions &options = rclcpp::NodeOptions())

Construct a new Node object.

Parameters:

nameNode name

inline explicit Node(const std::string &name, const rclcpp::NodeOptions &options = rclcpp::NodeOptions())
inline void configure()
inline void activate()
inline void deactivate()
inline void cleanup()
inline void shutdown()
inline void error()
std::string generate_local_name(const std::string &name)

transform an string into local topic name inside drone namespace and node namespace

Parameters:

name – source string

Returns:

std::string result name

std::string generate_global_name(const std::string &name)

transform an string into global topic name inside drone namespace

Parameters:

name – source string

Returns:

std::string result name

template<typename DurationRepT, typename DurationT, typename CallbackT>
inline rclcpp::TimerBase::SharedPtr create_timer(std::chrono::duration<DurationRepT, DurationT> period, CallbackT callback, rclcpp::CallbackGroup::SharedPtr group = nullptr)

create a timer with the node clock

Returns:

rclcpp::TimerBase::SharedPtr rclcpp timer using node clock

inline bool sleep()

sleeps the node to ensure node_frecuency desired

Returns:

true the node is sleeping

Returns:

false the node is not sleeping, this means that desired frequency is not reached

inline double get_loop_frequency()

Get the loop frequency object.

Returns:

double frequency in Hz

inline bool preset_loop_frequency(double frequency)

Protected Types

using CallbackReturn = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn

Callback for the activate state.

Param state:

Return:

CallbackReturn

Protected Functions

inline virtual CallbackReturn on_activate(const rclcpp_lifecycle::State& = rclcpp_lifecycle::State())
inline virtual CallbackReturn on_deactivate(const rclcpp_lifecycle::State& = rclcpp_lifecycle::State())

Callback for the deactivate state.

Parameters:

state

Returns:

CallbackReturn

inline virtual CallbackReturn on_configure(const rclcpp_lifecycle::State& = rclcpp_lifecycle::State())

Callback for the configure state.

Parameters:

state

Returns:

CallbackReturn

inline virtual CallbackReturn on_cleanup(const rclcpp_lifecycle::State& = rclcpp_lifecycle::State())

Callback for the cleanup state.

Parameters:

state

Returns:

CallbackReturn

inline virtual CallbackReturn on_shutdown(const rclcpp_lifecycle::State& = rclcpp_lifecycle::State())

Callback for the shutdown state.

Parameters:

state

Returns:

CallbackReturn

inline virtual CallbackReturn on_error(const rclcpp_lifecycle::State& = rclcpp_lifecycle::State())

Callback for the error state.

Parameters:

state

Returns:

CallbackReturn

Private Functions

inline void init()

Private Members

double loop_frequency_

frequency of the spin cycle of the node

std::shared_ptr<as2::Rate> loop_rate_ptr_
class ObjectFramePublisher : public rclcpp::Node

Public Functions

inline ObjectFramePublisher()

Private Members

rclcpp::Subscription<tf2_msgs::msg::TFMessage>::SharedPtr subscription
std::shared_ptr<gz::transport::Node> ign_node_ptr_

Private Static Functions

static inline void poseCallback(const gz::msgs::Pose_V &ign_msg, const gz::transport::MessageInfo &msg_info)

Private Static Attributes

static std::unique_ptr<tf2_ros::TransformBroadcaster> tfBroadcaster = NULL
static std::string world_frame_ = ""
static std::string model_name_ = ""
static std::string world_name_ = ""
static bool use_sim_time_ = false
class OffboardService : public nav2_behavior_tree::BtServiceNode<std_srvs::srv::SetBool>

Public Functions

OffboardService(const std::string &xml_tag_name, const BT::NodeConfiguration &conf)
virtual void on_tick() override

Function to perform some user-defined operation on tick Fill in service request with information if necessary.

BT::NodeStatus on_completion(std::shared_ptr<std_srvs::srv::SetBool::Response> response)
class OriginAlreadySet : public std::runtime_error

Public Functions

inline OriginAlreadySet()
class OriginNonSet : public std::runtime_error

Public Functions

inline OriginNonSet()
class PlatformEmulator : public as2::Node

Public Functions

inline PlatformEmulator()
inline ~PlatformEmulator()

Private Functions

inline void setArmingStateSrvCall(const std::shared_ptr<std_srvs::srv::SetBool::Request> request, std::shared_ptr<std_srvs::srv::SetBool::Response> response)
inline void setOffboardModeSrvCall(const std::shared_ptr<std_srvs::srv::SetBool::Request> request, std::shared_ptr<std_srvs::srv::SetBool::Response> response)

Private Members

rclcpp::Service<std_srvs::srv::SetBool>::SharedPtr set_arming_state_srv_
rclcpp::Service<std_srvs::srv::SetBool>::SharedPtr set_offboard_mode_srv_
struct PlatformParams

Public Members

double update_freq = 100.0
double control_freq = 100.0
double state_freq = 100.0
double imu_pub_freq = 100.0
double odometry_pub_freq = 100.0
double ground_truth_pub_freq = 100.0
double gps_pub_freq = 100.0
double gimbal_pub_freq = 100.0
double latitude
double longitude
double altitude
class PlatformStateMachine

This class implements the Platform State Machine, which is in charge of handling the state of the platform using a FSM (Finite State Machine). This state machine consist on 6 states:

  • DISARMED -> The platform is not armed.

  • LANDED -> The platform is armed and landed.

  • TAKING_OFF -> The platform is taking off.

  • FLYING -> The platform is on air.

  • LANDING -> The platform is landing.

  • EMERGENCY -> The platform is in emergency mode.

The events that can trigger the state machine are:

  • ARM

  • DISARM

  • TAKE_OFF

  • TOOK_OFF

  • LAND

  • LANDED

  • EMERGENCY TODO(miferco97): add figure of the state machine ../../../../../_images/test.jpg

Public Functions

explicit PlatformStateMachine(as2::Node *node)

Constructor of the Platform State Machine.

Parameters:

node_ptr – Pointer to an aerostack2 node.

~PlatformStateMachine()
bool processEvent(const int8_t &event)

This function is in charge of handling the state machine.

Parameters:

event – The event that triggers the state machine.

Returns:

true If the event is valid in current State.

bool processEvent(const Event &event)

This function is in charge of handling the state machine.

Parameters:

event – The event that triggers the state machine.

Returns:

true If the event is valid in current State.

StateMachineTransition getTransition(const int8_t &current_state, const int8_t &event)

Get the Transition object.

Parameters:
  • current_state

  • event

Returns:

StateMachineTransition

inline as2_msgs::msg::PlatformStatus getState()

This function returns the current state of the state machine.

Returns:

The current Platform Status of the state machine

inline void setState(as2_msgs::msg::PlatformStatus state)

Set the State of the FSM to the desired state. (THIS MAY BE USED ONLY FOR TESTING PURPOSES)

Parameters:

state

inline void setState(const int8_t &state)

Private Functions

void defineTransitions()

in this function the state machine is created based on the transitions. its called in the constructor of the class.

void setStateMachineEventSrvCallback(const std::shared_ptr<as2_msgs::srv::SetPlatformStateMachineEvent::Request> request, std::shared_ptr<as2_msgs::srv::SetPlatformStateMachineEvent::Response> response)
std::string eventToString(int8_t event)
std::string stateToString(int8_t state)

Private Members

std::vector<StateMachineTransition> transitions_
as2_msgs::msg::PlatformStatus state_
as2::Node *node_ptr_
rclcpp::Service<as2_msgs::srv::SetPlatformStateMachineEvent>::SharedPtr state_machine_event_srv_
class Plugin : public as2_motion_controller_plugin_base::ControllerBase

Public Functions

inline Plugin()
inline ~Plugin()
virtual void ownInitialize() override

Virtual functions from ControllerBase

virtual void updateState(const geometry_msgs::msg::PoseStamped &pose_msg, const geometry_msgs::msg::TwistStamped &twist_msg) override
virtual void updateReference(const as2_msgs::msg::TrajectoryPoint &ref) override
virtual bool setMode(const as2_msgs::msg::ControlMode &mode_in, const as2_msgs::msg::ControlMode &mode_out) override
virtual bool computeOutput(double dt, geometry_msgs::msg::PoseStamped &pose, geometry_msgs::msg::TwistStamped &twist, as2_msgs::msg::Thrust &thrust) override
virtual bool updateParams(const std::vector<rclcpp::Parameter> &_params_list) override
virtual void reset() override
inline virtual std::string getDesiredPoseFrameId() override
inline virtual std::string getDesiredTwistFrameId() override

Private Functions

bool checkParamList(const std::string &param, std::vector<std::string> &_params_list)

Controller especific functions

void updateDFParameter(std::string _parameter_name, const rclcpp::Parameter &_param)
inline void resetState()
void resetReferences()
void resetCommands()
void computeActions(geometry_msgs::msg::PoseStamped &pose, geometry_msgs::msg::TwistStamped &twist, as2_msgs::msg::Thrust &thrust)
bool getOutput(geometry_msgs::msg::TwistStamped &twist_msg, as2_msgs::msg::Thrust &thrust_msg)
Eigen::Vector3d getForce(const double &_dt, const Eigen::Vector3d &_pos_state, const Eigen::Vector3d &_vel_state, const Eigen::Vector3d &_pos_reference, const Eigen::Vector3d &_vel_reference, const Eigen::Vector3d &_acc_reference)
Acro_command computeTrajectoryControl(const double &_dt, const Eigen::Vector3d &_pos_state, const Eigen::Vector3d &_vel_state, const tf2::Quaternion &_attitude_state, const Eigen::Vector3d &_pos_reference, const Eigen::Vector3d &_vel_reference, const Eigen::Vector3d &_acc_reference, const double &_yaw_angle_reference)

Private Members

UAV_state uav_state_
UAV_reference control_ref_
Acro_command control_command_
Control_flags flags_
bool hover_flag_ = false
as2_msgs::msg::ControlMode control_mode_in_
as2_msgs::msg::ControlMode control_mode_out_
Eigen::Matrix3d Kp_ = {Eigen::Matrix3d::Zero()}
Eigen::Matrix3d Kd_ = {Eigen::Matrix3d::Zero()}
Eigen::Matrix3d Ki_ = {Eigen::Matrix3d::Zero()}
Eigen::Matrix3d Kp_ang_mat_ = {Eigen::Matrix3d::Zero()}
Eigen::Vector3d accum_pos_error_ = {Eigen::Vector3d::Zero()}
double mass_
double antiwindup_cte_ = 0.0
std::string odom_frame_id_ = "odom"
const Eigen::Vector3d gravitational_accel_ = Eigen::Vector3d(0, 0, -9.81)
const std::vector<std::string> parameters_list_ = {"mass", "trajectory_control.antiwindup_cte", "trajectory_control.alpha", "trajectory_control.kp.x", "trajectory_control.kp.y", "trajectory_control.kp.z", "trajectory_control.ki.x", "trajectory_control.ki.y", "trajectory_control.ki.z", "trajectory_control.kd.x", "trajectory_control.kd.y", "trajectory_control.kd.z", "trajectory_control.roll_control.kp", "trajectory_control.pitch_control.kp", "trajectory_control.yaw_control.kp",}
std::vector<std::string> parameters_to_read_ = {parameters_list_}
class Plugin : public follow_path_base::FollowPathBase

Public Functions

inline virtual void ownInit()
inline virtual bool own_activate(as2_msgs::action::FollowPath::Goal &_goal) override
inline virtual bool own_modify(as2_msgs::action::FollowPath::Goal &_goal) override
inline virtual bool own_deactivate(const std::shared_ptr<std::string> &message) override
inline virtual bool own_pause(const std::shared_ptr<std::string> &message) override
inline virtual bool own_resume(const std::shared_ptr<std::string> &message) override
inline virtual void own_execution_end(const as2_behavior::ExecutionStatus &state) override
inline virtual as2_behavior::ExecutionStatus own_run() override
inline virtual Eigen::Vector3d getTargetPosition() override
inline geometry_msgs::msg::Quaternion processYaw(as2_msgs::action::FollowPath::Goal &_goal, const std::string &id)
inline void updateDesiredPose(as2_msgs::action::FollowPath::Goal &_goal, const std::string &waypoint_id)

Private Functions

inline bool checkGoalCondition()

Private Members

std::shared_ptr<as2::motionReferenceHandlers::PositionMotion> position_motion_handler_ = nullptr
std::vector<std::string> path_ids_
std::vector<std::string> path_ids_remaining_
double initial_yaw_
geometry_msgs::msg::PoseStamped desired_pose_
geometry_msgs::msg::TwistStamped desired_twist_
class Plugin : public follow_path_base::FollowPathBase

Public Functions

inline virtual void ownInit()
inline virtual bool own_activate(as2_msgs::action::FollowPath::Goal &_goal) override
inline virtual bool own_modify(as2_msgs::action::FollowPath::Goal &_goal) override
inline virtual bool own_deactivate(const std::shared_ptr<std::string> &message) override
inline virtual bool own_pause(const std::shared_ptr<std::string> &message) override
inline virtual bool own_resume(const std::shared_ptr<std::string> &message) override
inline virtual void own_execution_end(const as2_behavior::ExecutionStatus &state) override
inline virtual as2_behavior::ExecutionStatus own_run() override
inline virtual Eigen::Vector3d getTargetPosition() override
inline void feedback_callback(GoalHandleTrajectoryGenerator::SharedPtr, const std::shared_ptr<const TrajectoryGeneratorAction::Feedback> feedback)
inline void result_callback(const GoalHandleTrajectoryGenerator::WrappedResult &result)

Private Types

using TrajectoryGeneratorAction = as2_msgs::action::GeneratePolynomialTrajectory
using GoalHandleTrajectoryGenerator = rclcpp_action::ClientGoalHandle<TrajectoryGeneratorAction>

Private Functions

inline as2_msgs::action::GeneratePolynomialTrajectory::Goal followPathGoalToTrajectoryGeneratorGoal(const as2_msgs::action::FollowPath::Goal &_goal)

Private Members

std::shared_ptr<rclcpp_action::Client<TrajectoryGeneratorAction>> traj_gen_client_ = nullptr
as2::SynchronousServiceClient<std_srvs::srv::Trigger>::SharedPtr traj_gen_pause_client_ = nullptr
as2::SynchronousServiceClient<std_srvs::srv::Trigger>::SharedPtr traj_gen_resume_client_ = nullptr
rclcpp_action::Client<TrajectoryGeneratorAction>::SendGoalOptions traj_gen_goal_options_
std::shared_future<GoalHandleTrajectoryGenerator::SharedPtr> traj_gen_goal_handle_future_
bool traj_gen_goal_accepted_ = false
bool traj_gen_result_received_ = false
bool traj_gen_result_ = false
geometry_msgs::msg::Pose desired_pose_
class Plugin : public go_to_base::GoToBase

Public Functions

inline virtual void ownInit()
inline virtual bool own_activate(as2_msgs::action::GoToWaypoint::Goal &_goal) override
inline virtual bool own_modify(as2_msgs::action::GoToWaypoint::Goal &_goal) override
inline virtual bool own_deactivate(const std::shared_ptr<std::string> &message) override
inline virtual bool own_pause(const std::shared_ptr<std::string> &message) override
inline virtual bool own_resume(const std::shared_ptr<std::string> &message) override
inline virtual void own_execution_end(const as2_behavior::ExecutionStatus &state) override
inline virtual as2_behavior::ExecutionStatus own_run() override

Private Functions

inline bool checkGoalCondition()
inline float getActualYaw()
inline bool computeYaw(const uint8_t yaw_mode, const geometry_msgs::msg::Point &target, const geometry_msgs::msg::Point &actual, float &yaw)

Private Members

std::shared_ptr<as2::motionReferenceHandlers::PositionMotion> position_motion_handler_ = nullptr
class Plugin : public go_to_base::GoToBase

Public Functions

inline virtual void ownInit()
inline virtual bool own_activate(as2_msgs::action::GoToWaypoint::Goal &_goal) override
inline virtual bool own_modify(as2_msgs::action::GoToWaypoint::Goal &_goal) override
inline virtual bool own_deactivate(const std::shared_ptr<std::string> &message) override
inline virtual bool own_pause(const std::shared_ptr<std::string> &message) override
inline virtual bool own_resume(const std::shared_ptr<std::string> &message) override
inline virtual void own_execution_end(const as2_behavior::ExecutionStatus &state) override
inline virtual as2_behavior::ExecutionStatus own_run() override
inline void feedback_callback(GoalHandleTrajectoryGenerator::SharedPtr, const std::shared_ptr<const TrajectoryGeneratorAction::Feedback> feedback)
inline void result_callback(const GoalHandleTrajectoryGenerator::WrappedResult &result)

Private Types

using TrajectoryGeneratorAction = as2_msgs::action::GeneratePolynomialTrajectory
using GoalHandleTrajectoryGenerator = rclcpp_action::ClientGoalHandle<TrajectoryGeneratorAction>

Private Functions

inline as2_msgs::action::GeneratePolynomialTrajectory::Goal goToGoalToTrajectoryGeneratorGoal(const as2_msgs::action::GoToWaypoint::Goal &_goal)

Private Members

std::shared_ptr<rclcpp_action::Client<TrajectoryGeneratorAction>> traj_gen_client_ = nullptr
as2::SynchronousServiceClient<std_srvs::srv::Trigger>::SharedPtr traj_gen_pause_client_ = nullptr
as2::SynchronousServiceClient<std_srvs::srv::Trigger>::SharedPtr traj_gen_resume_client_ = nullptr
rclcpp_action::Client<TrajectoryGeneratorAction>::SendGoalOptions traj_gen_goal_options_
std::shared_future<GoalHandleTrajectoryGenerator::SharedPtr> traj_gen_goal_handle_future_
TrajectoryGeneratorAction::Feedback traj_gen_feedback_
bool traj_gen_goal_accepted_ = false
bool traj_gen_result_received_ = false
bool traj_gen_result_ = false
class Plugin : public as2_state_estimator_plugin_base::StateEstimatorBase

Public Functions

inline Plugin()
inline virtual void on_setup() override

Private Functions

inline void generate_map_frame_from_gps(const geographic_msgs::msg::GeoPoint &origin, const sensor_msgs::msg::NavSatFix &gps_pose)
inline void generate_map_frame_from_ground_truth_pose(const geometry_msgs::msg::PoseStamped &pose)
inline void pose_callback(const geometry_msgs::msg::PoseStamped::SharedPtr msg)
inline void twist_callback(const geometry_msgs::msg::TwistStamped::SharedPtr msg)
inline void getOriginCallback(const as2_msgs::srv::GetOrigin::Request::SharedPtr request, as2_msgs::srv::GetOrigin::Response::SharedPtr response)
inline void setOriginCallback(const as2_msgs::srv::SetOrigin::Request::SharedPtr request, as2_msgs::srv::SetOrigin::Response::SharedPtr response)
inline void gps_callback(sensor_msgs::msg::NavSatFix::UniquePtr msg)

Private Members

rclcpp::Subscription<geometry_msgs::msg::PoseStamped>::SharedPtr pose_sub_
rclcpp::Subscription<geometry_msgs::msg::TwistStamped>::SharedPtr twist_sub_
rclcpp::Subscription<sensor_msgs::msg::NavSatFix>::SharedPtr gps_sub_
rclcpp::Service<as2_msgs::srv::SetOrigin>::SharedPtr set_origin_srv_
rclcpp::Service<as2_msgs::srv::GetOrigin>::SharedPtr get_origin_srv_
bool use_gps_ = false
bool set_origin_on_start_ = false
bool earth_to_map_set_ = false
double origin_lat_ = 0.0
double origin_lon_ = 0.0
double origin_alt_ = 0.0
geometry_msgs::msg::TransformStamped earth_to_map_
geographic_msgs::msg::GeoPoint::UniquePtr origin_
sensor_msgs::msg::NavSatFix::UniquePtr gps_pose_
bool using_ignition_tf_ = false
class Plugin : public land_base::LandBase

Public Functions

inline virtual void ownInit()
inline virtual bool own_activate(as2_msgs::action::Land::Goal &_goal) override
inline virtual bool own_deactivate(const std::shared_ptr<std::string> &message) override
inline virtual void own_execution_end(const as2_behavior::ExecutionStatus &state) override
inline virtual as2_behavior::ExecutionStatus own_run() override

Private Members

rclcpp::Client<std_srvs::srv::SetBool>::SharedPtr platform_land_cli_
std_srvs::srv::SetBool::Request::SharedPtr platform_land_request_
rclcpp::Client<std_srvs::srv::SetBool>::SharedFuture platform_land_future_
class Plugin : public land_base::LandBase

Public Functions

inline virtual void ownInit()
inline virtual bool own_activate(as2_msgs::action::Land::Goal &_goal) override
inline virtual bool own_modify(as2_msgs::action::Land::Goal &_goal) override
inline virtual bool own_deactivate(const std::shared_ptr<std::string> &message) override
inline virtual bool own_pause(const std::shared_ptr<std::string> &message) override
inline virtual bool own_resume(const std::shared_ptr<std::string> &message) override
inline virtual void own_execution_end(const as2_behavior::ExecutionStatus &state) override
inline virtual as2_behavior::ExecutionStatus own_run() override

Private Functions

inline bool checkGoalCondition()

Private Members

std::shared_ptr<as2::motionReferenceHandlers::SpeedMotion> speed_motion_handler_ = nullptr
rclcpp::Time time_
double land_speed_condition_percentage_
double land_speed_condition_height_
float speed_condition_
int time_condition_ = 1
float initial_height_
class Plugin : public land_base::LandBase

Public Functions

inline virtual void ownInit()
inline virtual bool own_activate(as2_msgs::action::Land::Goal &_goal) override
inline virtual bool own_modify(as2_msgs::action::Land::Goal &_goal) override
inline virtual bool own_deactivate(const std::shared_ptr<std::string> &message) override
inline virtual bool own_pause(const std::shared_ptr<std::string> &message) override
inline virtual bool own_resume(const std::shared_ptr<std::string> &message) override
inline virtual void own_execution_end(const as2_behavior::ExecutionStatus &state) override
inline virtual as2_behavior::ExecutionStatus own_run() override
inline void feedback_callback(GoalHandleTrajectoryGenerator::SharedPtr, const std::shared_ptr<const TrajectoryGeneratorAction::Feedback> feedback)
inline void result_callback(const GoalHandleTrajectoryGenerator::WrappedResult &result)

Private Types

using TrajectoryGeneratorAction = as2_msgs::action::GeneratePolynomialTrajectory
using GoalHandleTrajectoryGenerator = rclcpp_action::ClientGoalHandle<TrajectoryGeneratorAction>

Private Functions

inline bool checkGoalCondition()
inline as2_msgs::action::GeneratePolynomialTrajectory::Goal landGoalToTrajectoryGeneratorGoal(const as2_msgs::action::Land::Goal &_goal)

Private Members

std::shared_ptr<rclcpp_action::Client<TrajectoryGeneratorAction>> traj_gen_client_ = nullptr
as2::SynchronousServiceClient<std_srvs::srv::Trigger>::SharedPtr traj_gen_pause_client_ = nullptr
as2::SynchronousServiceClient<std_srvs::srv::Trigger>::SharedPtr traj_gen_resume_client_ = nullptr
rclcpp_action::Client<TrajectoryGeneratorAction>::SendGoalOptions traj_gen_goal_options_
std::shared_future<GoalHandleTrajectoryGenerator::SharedPtr> traj_gen_goal_handle_future_
TrajectoryGeneratorAction::Feedback traj_gen_feedback_
bool traj_gen_goal_accepted_ = false
bool traj_gen_result_received_ = false
bool traj_gen_result_ = false
rclcpp::Time time_
double land_speed_condition_percentage_
double land_speed_condition_height_
float speed_condition_
int time_condition_ = 1
float initial_height_
float land_height_ = -10.0f
class Plugin : public as2_state_estimator_plugin_base::StateEstimatorBase

Public Functions

inline Plugin()
inline virtual void on_setup() override
inline const geometry_msgs::msg::TwistStamped &twist_from_pose(const geometry_msgs::msg::PoseStamped &pose, std::vector<tf2::Transform> *data = nullptr)

Public Members

geometry_msgs::msg::TwistStamped twist_msg_

Private Functions

inline void rigid_bodies_callback(const mocap4r2_msgs::msg::RigidBodies::SharedPtr msg)
inline void process_mocap_pose(const geometry_msgs::msg::PoseStamped &msg)

Private Members

rclcpp::Subscription<mocap4r2_msgs::msg::RigidBodies>::SharedPtr rigid_bodies_sub_
tf2::Transform earth_to_map_ = tf2::Transform::getIdentity()
const tf2::Transform map_to_odom_ = tf2::Transform::getIdentity()
tf2::Transform odom_to_base_ = tf2::Transform::getIdentity()
bool has_earth_to_map_ = false
std::string mocap_topic_
std::string rigid_body_name_
double twist_alpha_ = 1.0
double orientation_alpha_ = 1.0
geometry_msgs::msg::PoseStamped last_pose_msg_
class Plugin : public as2_motion_controller_plugin_base::ControllerBase

Public Functions

inline Plugin()
inline ~Plugin()
virtual void ownInitialize() override
virtual void updateState(const geometry_msgs::msg::PoseStamped &pose_msg, const geometry_msgs::msg::TwistStamped &twist_msg) override
virtual void updateReference(const geometry_msgs::msg::PoseStamped &ref) override
virtual void updateReference(const geometry_msgs::msg::TwistStamped &ref) override
virtual void updateReference(const as2_msgs::msg::TrajectoryPoint &ref) override
virtual bool setMode(const as2_msgs::msg::ControlMode &mode_in, const as2_msgs::msg::ControlMode &mode_out) override
virtual std::string getDesiredPoseFrameId()
virtual std::string getDesiredTwistFrameId()
virtual bool computeOutput(double dt, geometry_msgs::msg::PoseStamped &pose, geometry_msgs::msg::TwistStamped &twist, as2_msgs::msg::Thrust &thrust) override
virtual bool updateParams(const std::vector<rclcpp::Parameter> &_params_list) override
virtual void reset() override

Private Types

using PID = pid_controller::PID<double>
using PID_1D = pid_1d_controller::PID<double>

Private Functions

void checkParamList(const std::string &param, std::vector<std::string> &_params_list, bool &_all_params_read)
void updateControllerParameter(PID_1D &_pid_handler, const std::string &_parameter_name, const rclcpp::Parameter &_param)
void updateController3DParameter(PID &_pid_handler, const std::string &_parameter_name, const rclcpp::Parameter &_param)
void updateSpeedInAPlaneParameter(PID_1D &_pid_1d_handler, PID &_pid_3d_handler, const std::string &_parameter_name, const rclcpp::Parameter &_param)
void resetState()
void resetReferences()
void resetCommands()
bool getOutput(geometry_msgs::msg::TwistStamped &twist_msg)

Private Members

as2_msgs::msg::ControlMode control_mode_in_
as2_msgs::msg::ControlMode control_mode_out_
Control_flags flags_
PID_1D pid_yaw_handler_
PID pid_3D_position_handler_
PID pid_3D_velocity_handler_
PID_1D pid_1D_speed_in_a_plane_handler_
PID pid_3D_speed_in_a_plane_handler_
PID pid_3D_trajectory_handler_
std::shared_ptr<as2::tf::TfHandler> tf_handler_
std::vector<std::string> plugin_parameters_list_ = {"proportional_limitation", "use_bypass"}
const std::vector<std::string> position_control_parameters_list_ = {"position_control.reset_integral", "position_control.antiwindup_cte", "position_control.alpha", "position_control.kp.x", "position_control.kp.y", "position_control.kp.z", "position_control.ki.x", "position_control.ki.y", "position_control.ki.z", "position_control.kd.x", "position_control.kd.y", "position_control.kd.z"}
const std::vector<std::string> velocity_control_parameters_list_ = {"speed_control.reset_integral", "speed_control.antiwindup_cte", "speed_control.alpha", "speed_control.kp.x", "speed_control.kp.y", "speed_control.kp.z", "speed_control.ki.x", "speed_control.ki.y", "speed_control.ki.z", "speed_control.kd.x", "speed_control.kd.y", "speed_control.kd.z"}
const std::vector<std::string> speed_in_a_plane_control_parameters_list_ = {"speed_in_a_plane_control.reset_integral", "speed_in_a_plane_control.antiwindup_cte", "speed_in_a_plane_control.alpha", "speed_in_a_plane_control.height.kp", "speed_in_a_plane_control.height.ki", "speed_in_a_plane_control.height.kd", "speed_in_a_plane_control.speed.kp.x", "speed_in_a_plane_control.speed.kp.y", "speed_in_a_plane_control.speed.ki.x", "speed_in_a_plane_control.speed.ki.y", "speed_in_a_plane_control.speed.kd.x", "speed_in_a_plane_control.speed.kd.y"}
const std::vector<std::string> trajectory_control_parameters_list_ = {"trajectory_control.reset_integral", "trajectory_control.antiwindup_cte", "trajectory_control.alpha", "trajectory_control.kp.x", "trajectory_control.kp.y", "trajectory_control.kp.z", "trajectory_control.ki.x", "trajectory_control.ki.y", "trajectory_control.ki.z", "trajectory_control.kd.x", "trajectory_control.kd.y", "trajectory_control.kd.z"}
const std::vector<std::string> yaw_control_parameters_list_ = {"yaw_control.reset_integral", "yaw_control.antiwindup_cte", "yaw_control.alpha", "yaw_control.kp", "yaw_control.ki", "yaw_control.kd"}
std::vector<std::string> plugin_parameters_to_read_ = {plugin_parameters_list_}
std::vector<std::string> position_control_parameters_to_read_ = {position_control_parameters_list_}
std::vector<std::string> velocity_control_parameters_to_read_ = {velocity_control_parameters_list_}
std::vector<std::string> speed_in_a_plane_control_parameters_to_read_{speed_in_a_plane_control_parameters_list_}
std::vector<std::string> trajectory_control_parameters_to_read_{trajectory_control_parameters_list_}
std::vector<std::string> yaw_control_parameters_to_read_ = {yaw_control_parameters_list_}
UAV_state uav_state_
UAV_state control_ref_
UAV_command control_command_
bool hover_flag_ = false
Eigen::Vector3d speed_limits_
double yaw_speed_limit_
bool use_bypass_ = true
bool proportional_limitation_ = false
std::string enu_frame_id_ = "odom"
std::string flu_frame_id_ = "base_link"
std::string input_pose_frame_id_ = enu_frame_id_
std::string input_twist_frame_id_ = enu_frame_id_
std::string output_twist_frame_id_ = enu_frame_id_
class Plugin : public as2_state_estimator_plugin_base::StateEstimatorBase

Public Functions

inline Plugin()
inline virtual void on_setup() override

Private Functions

inline void generate_map_frame_from_gps(const geographic_msgs::msg::GeoPoint &origin, const sensor_msgs::msg::NavSatFix &gps_pose)
inline void odom_callback(const nav_msgs::msg::Odometry::UniquePtr msg)
inline void getOriginCallback(const as2_msgs::srv::GetOrigin::Request::SharedPtr request, as2_msgs::srv::GetOrigin::Response::SharedPtr response)
inline void setOriginCallback(const as2_msgs::srv::SetOrigin::Request::SharedPtr request, as2_msgs::srv::SetOrigin::Response::SharedPtr response)
inline void gps_callback(sensor_msgs::msg::NavSatFix::UniquePtr msg)

Private Members

rclcpp::Subscription<nav_msgs::msg::Odometry>::SharedPtr odom_sub_
rclcpp::Subscription<sensor_msgs::msg::NavSatFix>::SharedPtr gps_sub_
rclcpp::Service<as2_msgs::srv::SetOrigin>::SharedPtr set_origin_srv_
rclcpp::Service<as2_msgs::srv::GetOrigin>::SharedPtr get_origin_srv_
bool use_gps_ = false
bool set_origin_on_start_ = false
double earth_to_map_height_ = 0.0
double origin_lat_ = 0.0
double origin_lon_ = 0.0
double origin_alt_ = 0.0
geometry_msgs::msg::TransformStamped earth_to_map_
geographic_msgs::msg::GeoPoint::UniquePtr origin_
sensor_msgs::msg::NavSatFix::UniquePtr gps_pose_
class Plugin : public takeoff_base::TakeoffBase

Public Functions

inline virtual void ownInit()
inline virtual bool own_activate(as2_msgs::action::Takeoff::Goal &_goal) override
inline virtual bool own_deactivate(const std::shared_ptr<std::string> &message) override
inline virtual void own_execution_end(const as2_behavior::ExecutionStatus &state) override
inline virtual as2_behavior::ExecutionStatus own_run() override

Private Members

rclcpp::Client<std_srvs::srv::SetBool>::SharedPtr platform_takeoff_cli_
std_srvs::srv::SetBool::Request::SharedPtr platform_takeoff_request_
rclcpp::Client<std_srvs::srv::SetBool>::SharedFuture platform_takeoff_future_
class Plugin : public takeoff_base::TakeoffBase

Public Functions

inline virtual void ownInit()
inline virtual bool own_activate(as2_msgs::action::Takeoff::Goal &_goal) override
inline virtual bool own_modify(as2_msgs::action::Takeoff::Goal &_goal) override
inline virtual bool own_deactivate(const std::shared_ptr<std::string> &message) override
inline virtual void own_execution_end(const as2_behavior::ExecutionStatus &state) override
inline virtual as2_behavior::ExecutionStatus own_run() override

Private Functions

inline bool checkGoalCondition()

Private Members

std::shared_ptr<as2::motionReferenceHandlers::PositionMotion> position_motion_handler_ = nullptr
geometry_msgs::msg::Point takeoff_position_
double takeoff_angle_
class Plugin : public takeoff_base::TakeoffBase

Public Functions

inline virtual void ownInit()
inline virtual bool own_activate(as2_msgs::action::Takeoff::Goal &_goal) override
inline virtual bool own_modify(as2_msgs::action::Takeoff::Goal &_goal) override
inline virtual bool own_deactivate(const std::shared_ptr<std::string> &message) override
inline virtual void own_execution_end(const as2_behavior::ExecutionStatus &state) override
inline virtual as2_behavior::ExecutionStatus own_run() override

Private Functions

inline bool checkGoalCondition()

Private Members

std::shared_ptr<as2::motionReferenceHandlers::SpeedMotion> speed_motion_handler_ = nullptr
class Plugin : public takeoff_base::TakeoffBase

Public Functions

inline virtual void ownInit()
inline virtual bool own_activate(as2_msgs::action::Takeoff::Goal &_goal) override
inline virtual bool own_modify(as2_msgs::action::Takeoff::Goal &_goal) override
inline virtual bool own_deactivate(const std::shared_ptr<std::string> &message) override
inline virtual void own_execution_end(const as2_behavior::ExecutionStatus &state) override
inline virtual as2_behavior::ExecutionStatus own_run() override
inline void feedback_callback(GoalHandleTrajectoryGenerator::SharedPtr, const std::shared_ptr<const TrajectoryGeneratorAction::Feedback> feedback)
inline void result_callback(const GoalHandleTrajectoryGenerator::WrappedResult &result)

Private Types

using TrajectoryGeneratorAction = as2_msgs::action::GeneratePolynomialTrajectory
using GoalHandleTrajectoryGenerator = rclcpp_action::ClientGoalHandle<TrajectoryGeneratorAction>

Private Functions

inline as2_msgs::action::GeneratePolynomialTrajectory::Goal takeoffGoalToTrajectoryGeneratorGoal(const as2_msgs::action::Takeoff::Goal &_goal)

Private Members

std::shared_ptr<rclcpp_action::Client<TrajectoryGeneratorAction>> traj_gen_client_ = nullptr
rclcpp_action::Client<TrajectoryGeneratorAction>::SendGoalOptions traj_gen_goal_options_
std::shared_future<GoalHandleTrajectoryGenerator::SharedPtr> traj_gen_goal_handle_future_
TrajectoryGeneratorAction::Feedback traj_gen_feedback_
bool traj_gen_goal_accepted_ = false
bool traj_gen_result_received_ = false
bool traj_gen_result_ = false
class PointGimbalBehavior : public as2_behavior::BehaviorServer<as2_msgs::action::PointGimbal>

Public Functions

explicit PointGimbalBehavior(const rclcpp::NodeOptions &options = rclcpp::NodeOptions())
virtual ~PointGimbalBehavior() = default

Protected Functions

bool on_activate(std::shared_ptr<const as2_msgs::action::PointGimbal::Goal> goal) override
bool on_modify(std::shared_ptr<const as2_msgs::action::PointGimbal::Goal> goal) override
virtual bool on_deactivate(const std::shared_ptr<std::string> &message) override
virtual bool on_pause(const std::shared_ptr<std::string> &message) override
virtual bool on_resume(const std::shared_ptr<std::string> &message) override
as2_behavior::ExecutionStatus on_run(const std::shared_ptr<const as2_msgs::action::PointGimbal::Goal> &goal, std::shared_ptr<as2_msgs::action::PointGimbal::Feedback> &feedback_msg, std::shared_ptr<as2_msgs::action::PointGimbal::Result> &result_msg) override
virtual void on_execution_end(const as2_behavior::ExecutionStatus &state) override
bool check_gimbal_limits(const double roll, const double pitch, const double yaw)
bool update_gimbal_state()
bool check_finished()

Private Members

as2::tf::TfHandler tf_handler_
std::chrono::nanoseconds tf_timeout_threshold_
std::string gimbal_name_
std::string gimbal_base_frame_id_
std::string gimbal_frame_id_
double gimbal_threshold_
rclcpp::Time goal_init_time_
rclcpp::Duration behavior_timeout_ = rclcpp::Duration(0, 0)
double gimbal_roll_min_
double gimbal_roll_max_
double gimbal_pitch_min_
double gimbal_pitch_max_
double gimbal_yaw_min_
double gimbal_yaw_max_
geometry_msgs::msg::PointStamped desired_goal_position_
geometry_msgs::msg::PointStamped current_goal_position_
geometry_msgs::msg::Vector3Stamped gimbal_angles_current_
as2_msgs::msg::GimbalControl gimbal_control_msg_
rclcpp::Publisher<as2_msgs::msg::GimbalControl>::SharedPtr gimbal_control_pub_
struct Position2D

Public Members

double x
double y
class PositionMotion : public as2::motionReferenceHandlers::BasicMotionReferenceHandler

The PositionMotion class is a motion reference handler that moves the robot to a given position.

Public Functions

PositionMotion(as2::Node *node_ptr, const std::string &ns = "")

PositionMotion Constructor.

Parameters:

nodeas2::Node pointer.

inline ~PositionMotion()
bool ownSendCommand()

ownSendCommand sends the pose and twist messages.

Returns:

true if commands was sent successfully, false otherwise.

bool sendPositionCommandWithYawAngle(const std::string &frame_id_pose, const float &x, const float &y, const float &z, const float &yaw_angle, const std::string &frame_id_twist, const float &vx, const float &vy, const float &vz)

sendPositionCommandWithYawAngle sends a position command to the robot. The yaw angle is given in radians. The linear velocity limitation is given in m/s. The position command and the velocity limitation are sent in the input frame id.

Parameters:
  • frame_id_pose – frame id of the position command.

  • x – x coordinate of the position command.

  • y – y coordinate of the position command.

  • z – z coordinate of the position command.

  • yaw_angle – yaw angle of the position command.

  • frame_id_twist – frame id of the velocity limitation.

  • vx – linear velocity limitation in x direction.

  • vy – linear velocity limitation in y direction.

  • vz – linear velocity limitation in z direction.

Returns:

true if the command was sent successfully, false otherwise.

bool sendPositionCommandWithYawAngle(const std::string &frame_id_pose, const float &x, const float &y, const float &z, const geometry_msgs::msg::Quaternion &q, const std::string &frame_id_twist, const float &vx, const float &vy, const float &vz)

sendPositionCommandWithYawAngle sends a position command to the robot. The yaw angle is given in a quaternion. The linear velocity is given in m/s. The position command and the velocity limitation are sent in the input frame id.

Parameters:
  • frame_id_pose – frame id of the position command.

  • x – x coordinate of the position command.

  • y – y coordinate of the position command.

  • z – z coordinate of the position command.

  • q – quaternion of the position command. (with the desired yaw angle).

  • frame_id_twist – frame id of the velocity limitation.

  • vx – linear velocity limitation in x direction.

  • vy – linear velocity limitation in y direction.

  • vz – linear velocity limitation in z direction.

Returns:

true if the command was sent successfully, false otherwise.

bool sendPositionCommandWithYawAngle(const geometry_msgs::msg::PoseStamped &pose, const geometry_msgs::msg::TwistStamped &twist)

sendPositionCommandWithYawAngle sends a position command to the robot. The position command is sent in the frame id frame.

Parameters:
  • pose – geometry_msgs::msg::PoseStamped with the desired position and yaw angle.

  • twist – geometry_msgs::msg::TwistStamped with the desired linear velocity.

Returns:

true if the command was sent successfully, false otherwise.

bool sendPositionCommandWithYawSpeed(const std::string &frame_id_pose, const float &x, const float &y, const float &z, const float &yaw_speed, const std::string &frame_id_twist, const float &vx, const float &vy, const float &vz)

sendPositionCommandWithYawSpeed sends a position command to the robot. The yaw speed is given in rad/s. The linear velocity is given in m/s. The position command and the velocity limitation are sent in the input frame id.

Parameters:
  • frame_id_pose – frame id of the position command.

  • x – x coordinate of the position command.

  • y – y coordinate of the position command.

  • z – z coordinate of the position command.

  • yaw_speed – yaw speed of the position command.

  • frame_id_twist – frame id of the velocity limitation.

  • vx – linear velocity limitation in x direction.

  • vy – linear velocity limitation in y direction.

  • vz – linear velocity limitation in z direction.

Returns:

true if the command was sent successfully, false otherwise.

bool sendPositionCommandWithYawSpeed(const geometry_msgs::msg::PoseStamped &pose, const geometry_msgs::msg::TwistStamped &twist)

sendPositionCommandWithYawSpeed sends a position command to the robot. The position command is sent in the frame id frame.

Parameters:
  • x – pose geometry_msgs::msg::PoseStamped with the desired position.

  • twist – geometry_msgs::msg::TwistStamped with the desired linear velocity and yaw speed.

Returns:

true if the command was sent successfully, false otherwise.

class PrintTarget : public SyncActionNode, public SyncActionNode

Public Functions

inline PrintTarget(const std::string &name, const NodeConfiguration &config)
inline NodeStatus tick() override
inline PrintTarget(const std::string &name, const NodeConfiguration &config)
inline NodeStatus tick() override

Public Static Functions

static inline PortsList providedPorts()
static inline PortsList providedPorts()
struct Quaternion

Public Members

float w
float x
float y
float z
class RateBase

Subclassed by as2::rate::GenericRate< Clock >

Public Functions

virtual  RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE (RateBase) virtual bool sleep()=0
virtual bool is_steady() const = 0
virtual void reset() = 0
virtual void set_period(std::chrono::nanoseconds period) = 0
class RealsenseInterface : public as2::Node

Public Functions

RealsenseInterface()

Constructor of the RealsenseInterface object.

void stop()

Stop rutine for odometry node. This function stops the pipeline.

void run()

Funtionality during node lifetime. This function gets the sensor measurements from realsense device and publish them.

Private Functions

bool setup()
void setupCamera(const std::shared_ptr<as2::sensors::Camera> &_camera, const rs2_stream _rs2_stream, const std::string _encoding, const std::string _camera_model)
void runImu(const rs2::motion_frame &accel_frame, const rs2::motion_frame &gyro_frame)
void runPose(const rs2::pose_frame &pose_frame)
void runOdom(const rs2::pose_frame &pose_frame)
void runColor(const rs2::video_frame &color_frame)
bool identifyDevice()
bool identifySensors(const rs2::device &dev)
void setStaticTransform(const std::string _rs_link, const std::string _ref_frame, const std::array<double, 3> &_t, const std::array<double, 3> &_r)
void setupPoseTransforms(const std::array<double, 3> &device_t, const std::array<double, 3> &device_r)

Private Members

std::string realsense_name_
bool verbose_
bool device_not_found_
bool imu_available_
bool depth_available_
bool color_available_
bool fisheye_available_
bool pose_available_
std::string serial_
rs2::pipeline pipe_
std::shared_ptr<as2::sensors::Sensor<nav_msgs::msg::Odometry>> pose_sensor_
std::shared_ptr<as2::sensors::Imu> imu_sensor_
std::shared_ptr<as2::sensors::Camera> color_sensor_
std::shared_ptr<rs2::motion_frame> accel_frame_
std::shared_ptr<rs2::motion_frame> gyro_frame_
std::shared_ptr<rs2::pose_frame> pose_frame_
std::shared_ptr<rs2::video_frame> color_frame_
std::shared_ptr<tf2_ros::StaticTransformBroadcaster> tf_static_broadcaster_
std::vector<geometry_msgs::msg::TransformStamped> tf2_fix_transforms_
std::string odom_frame_
std::string color_sensor_frame_
std::string imu_sensor_frame_
tf2::Transform realsense_pose_
class SendEvent : public BT::SyncActionNode

Public Functions

SendEvent(const std::string &xml_tag_name, const BT::NodeConfiguration &conf)
BT::NodeStatus tick() override

Public Static Functions

static inline BT::PortsList providedPorts()

Private Members

rclcpp::Node::SharedPtr node_
rclcpp::CallbackGroup::SharedPtr callback_group_
rclcpp::executors::SingleThreadedExecutor callback_group_executor_
rclcpp::Publisher<std_msgs::msg::String>::SharedPtr pub_
std::string topic_name_
template<typename T>
class Sensor : public as2::sensors::TFStatic, protected as2::sensors::GenericSensor, protected as2::sensors::SensorData<T>
#include <sensor.hpp>

Sensor handler to publish sensor data at a given frequency.

Public Functions

inline Sensor(const std::string &id, as2::Node *node_ptr, float pub_freq = -1.0f, bool add_sensor_measurements_base = true)

Construct a new Sensor object.

Parameters:
  • idSensor ID

  • node_ptr – Pointer to the node

  • pub_freq – Frequency to publish the data (-1 to publish every time updateData is called)

  • add_sensor_measurements_base – Add “sensor_measurements” to the topic name

inline Sensor(const std::string &id, as2::Node *node_ptr, int pub_freq, bool add_sensor_measurements_base = true)

Construct a new Sensor object.

Parameters:
  • idSensor ID

  • node_ptr – Pointer to the node

  • pub_freq – Frequency to publish the data (-1 to publish every time updateData is called)

  • add_sensor_measurements_base – Add “sensor_measurements” to the topic name

inline Sensor(const std::string &id, as2::Node *node_ptr, double pub_freq, bool add_sensor_measurements_base = true)

Construct a new Sensor object.

Parameters:
  • idSensor ID

  • node_ptr – Pointer to the node

  • pub_freq – Frequency to publish the data (-1 to publish every time updateData is called)

  • add_sensor_measurements_base – Add “sensor_measurements” to the topic name

inline virtual ~Sensor()

Destroy the Sensor object.

inline void updateData(const T &msg)

Update the data of the sensor.

If the frequency is set to -1, the data is published immediately Otherwise, the data is stored and published at the given frequency

Parameters:

msg – Message

Protected Functions

inline virtual void publishData() override

Publish the data in a topic.

template<typename T>
class SensorData
#include <sensor.hpp>

SensorData object to publish data in a topic.

Template Parameters:

T – Type of the message

Subclassed by as2::sensors::Sensor< T >

Public Functions

inline explicit SensorData(const std::string &topic_name, rclcpp::Node *node_ptr, bool add_sensor_measurements_base = true)

Construct a new GenericSensor object.

Parameters:

node_ptr – Pointer to the node

inline virtual ~SensorData()

Destroy the GenericSensor object.

inline void setData(const T &msg)

Update the message value.

Parameters:

msg – Message

inline void publish()

Publish the data stored in the message.

inline void updateAndPublish(const T &msg)

Update the message value and publish it.

Parameters:

msg – Message

inline const std::string &getTopicName() const

Get the Topic Name object.

Returns:

std::string Topic name

inline const T &getData() const

Get the data stored in the message.

Returns:

T Message

Public Static Functions

static inline std::string processTopicName(const std::string &topic_name, bool add_sensor_measurements_base = true)

Process the topic name with the sensor measurements base.

Parameters:
  • topic_name – Topic name

  • add_sensor_measurements_base – Add “sensor_measurements” to the topic name

Returns:

std::string Processed topic name

Private Members

rclcpp::Publisher<T>::SharedPtr sensor_publisher_
T msg_data_
std::string topic_name_
class SetArmingStateBehavior : public as2_behavior::BehaviorServer<as2_msgs::action::SetArmingState>

Public Functions

inline SetArmingStateBehavior()
inline bool on_activate(std::shared_ptr<const as2_msgs::action::SetArmingState::Goal> goal) override
inline bool on_modify(std::shared_ptr<const as2_msgs::action::SetArmingState::Goal> goal) override
inline virtual bool on_deactivate(const std::shared_ptr<std::string> &message) override
inline virtual bool on_pause(const std::shared_ptr<std::string> &message) override
inline virtual bool on_resume(const std::shared_ptr<std::string> &message) override
inline virtual void on_execution_end(const as2_behavior::ExecutionStatus &state) override
inline as2_behavior::ExecutionStatus on_run(const typename std::shared_ptr<const as2_msgs::action::SetArmingState::Goal> &goal, typename std::shared_ptr<as2_msgs::action::SetArmingState::Feedback> &feedback_msg, typename std::shared_ptr<as2_msgs::action::SetArmingState::Result> &result_msg) override

Public Members

rclcpp::Client<std_srvs::srv::SetBool>::SharedPtr client_
rclcpp::Client<std_srvs::srv::SetBool>::SharedFuture future_
class SetOffboardModeBehavior : public as2_behavior::BehaviorServer<as2_msgs::action::SetOffboardMode>

Public Functions

inline SetOffboardModeBehavior()
inline bool on_activate(std::shared_ptr<const as2_msgs::action::SetOffboardMode::Goal> goal) override
inline bool on_modify(std::shared_ptr<const as2_msgs::action::SetOffboardMode::Goal> goal) override
inline virtual bool on_deactivate(const std::shared_ptr<std::string> &message) override
inline virtual bool on_pause(const std::shared_ptr<std::string> &message) override
inline virtual bool on_resume(const std::shared_ptr<std::string> &message) override
inline virtual void on_execution_end(const as2_behavior::ExecutionStatus &state) override
inline as2_behavior::ExecutionStatus on_run(const typename std::shared_ptr<const as2_msgs::action::SetOffboardMode::Goal> &goal, typename std::shared_ptr<as2_msgs::action::SetOffboardMode::Feedback> &feedback_msg, typename std::shared_ptr<as2_msgs::action::SetOffboardMode::Result> &result_msg) override

Public Members

rclcpp::Client<std_srvs::srv::SetBool>::SharedPtr client_
rclcpp::Client<std_srvs::srv::SetBool>::SharedFuture future_
class SetOrigin : public nav2_behavior_tree::BtServiceNode<as2_msgs::srv::SetOrigin>

Public Functions

SetOrigin(const std::string &xml_tag_name, const BT::NodeConfiguration &conf)
virtual void on_tick() override

Function to perform some user-defined operation on tick Fill in service request with information if necessary.

BT::NodeStatus on_completion()

Public Static Functions

static inline BT::PortsList providedPorts()
class SpeedInAPlaneMotion : public as2::motionReferenceHandlers::BasicMotionReferenceHandler

The SpeedInAPlaneMotion class is a motion reference handler that moves the robot at a given speed.

Public Functions

SpeedInAPlaneMotion(as2::Node *node_ptr, const std::string &ns = "")

PositionMotion Constructor.

Parameters:

nodeas2::Node pointer.

inline ~SpeedInAPlaneMotion()
bool ownSendCommand()

ownSendCommand sends pose and twist messages.

Returns:

true if commands was sent successfully, false otherwise.

bool sendSpeedInAPlaneCommandWithYawSpeed(const std::string &frame_id_speed, const float vx, const float vy, const std::string &frame_id_pose, const float hz, const float yaw_speed)

sendSpeedInAPlaneCommandWithYawAngle sends a speed in a plane command to the robot with a yaw speed. The speed plane command is sent in the frame id frame. The linear velocity is given in m/s. The height command is sent in the frame id frame. The height is given in m.

Parameters:
  • frame_id_speed – frame id of the velocity command.

  • vx – Linear velocity in the x axis.

  • vy – Linear velocity in the y axis.

  • frame_id_yaw – frame id of the height and yaw angle command.

  • hz – Height in the z axis.

  • yaw_speed – Yaw speed in radians/s.

Returns:

true if the command was sent successfully, false otherwise.

bool sendSpeedInAPlaneCommandWithYawSpeed(const geometry_msgs::msg::PoseStamped &pose, const geometry_msgs::msg::TwistStamped &twist)

sendSpeedInAPlaneCommandWithYawAngle sends a speed in a plane command to the robot with a yaw speed. The speed plane command is sent in the frame id frame. The linear velocity is given in m/s. The height command is sent in the frame id frame. The height is given in m.

Parameters:
  • pose – PoseStamped message that represents the height.

  • twist – TwistStamped message that represents the linear velocity and yaw speed.

Returns:

true if the command was sent successfully, false otherwise.

bool sendSpeedInAPlaneCommandWithYawAngle(const std::string &frame_id_speed, const float vx, const float vy, const std::string &frame_id_pose, const float hz, const float yaw_angle)

sendSpeedInAPlaneCommandWithYawAngle sends a speed in a plane command to the robot with a yaw angle. The speed plane command is sent in the frame id frame. The linear velocity is given in m/s. The height command is sent in the frame id frame. The height is given in m.

Parameters:
  • frame_id_speed – frame id of the velocity command.

  • vx – Linear velocity in the x axis.

  • vy – Linear velocity in the y axis.

  • frame_id_yaw – frame id of the height and yaw angle command.

  • hz – Height in the z axis.

  • yaw_angle – Yaw angle in radians.

Returns:

true if the command was sent successfully, false otherwise.

bool sendSpeedInAPlaneCommandWithYawAngle(const std::string &frame_id_speed, const float vx, const float vy, const std::string &frame_id_pose, const float hz, const geometry_msgs::msg::Quaternion &q)

sendSpeedInAPlaneCommandWithYawAngle sends a speed in a plane command to the robot with a yaw angle. The speed plane command is sent in the frame id frame. The linear velocity is given in m/s. The height command is sent in the frame id frame. The height is given in m.

Parameters:
  • frame_id_speed – frame id of the velocity command.

  • vx – Linear velocity in the x axis.

  • vy – Linear velocity in the y axis.

  • frame_id_yaw – frame id of the height and yaw angle command.

  • hz – Height in the z axis.

  • q – Quaternion that represents the yaw angle.

Returns:

true if the command was sent successfully, false otherwise.

bool sendSpeedInAPlaneCommandWithYawAngle(const geometry_msgs::msg::PoseStamped &pose, const geometry_msgs::msg::TwistStamped &twist)

sendSpeedInAPlaneCommandWithYawAngle sends a speed in a plane command to the robot with a yaw angle. The speed plane command is sent in the frame id frame. The linear velocity is given in m/s. The height command is sent in the frame id frame. The height is given in m.

Parameters:
  • pose – PoseStamped message that represents the height and yaw angle.

  • twist – TwistStamped message that represents the linear velocity.

Returns:

true if the command was sent successfully, false otherwise.

bool sendSpeedInAPlaneCommandWithYawAngle(const std::string &frame_id_speed, const float &vx, const float &vy, const std::string &frame_id_pose, const float &hz, const float &yaw_angle)

sendSpeedInAPlaneCommandWithYawAngle sends a speed command to the robot. The speed command is sent in the input frame id. The linear velocity is given in m/s.

Parameters:
  • frame_id_speed – frame id of the velocity command.

  • vx – Linear velocity in the x axis.

  • vy – Linear velocity in the y axis.

  • hz – Height in the z axis.

  • frame_id_yaw – frame id of the yaw angle command.

  • yaw_angle – Yaw angle in radians.

Returns:

true if the command was sent successfully, false otherwise.

bool sendSpeedInAPlaneCommandWithYawAngle(const std::string &frame_id_speed, const float &vx, const float &vy, const std::string &frame_id_pose, const float &hz, const geometry_msgs::msg::Quaternion &q)

sendSpeedInAPlaneCommandWithYawAngle sends a speed command to the robot. The speed command is sent in the input frame id. The linear velocity is given in m/s.

Parameters:
  • frame_id_speed – frame id of the velocity command.

  • vx – Linear velocity in the x axis.

  • vy – Linear velocity in the y axis.

  • hz – Height in the z axis.

  • frame_id_yaw – frame id of the yaw angle command.

  • q – Quaternion that represents the yaw angle.

Returns:

true if the command was sent successfully, false otherwise.

bool sendSpeedInAPlaneCommandWithYawSpeed(const std::string &frame_id, const float &vx, const float &vy, const std::string &frame_id_pose, const float &hz, const float &yaw_speed)

sendSpeedInAPlaneCommandWithYawSpeed sends a speed command to the robot. The speed command is sent in the input frame id. The linear velocity is given in m/s. The yaw speed is given in rad/s.

Parameters:
  • frame_id – frame id of the velocity command.

  • vx – Linear velocity in the x axis.

  • vy – Linear velocity in the y axis.

  • vz – Linear velocity in the z axis.

  • yaw_speed – Yaw speed in rad/s.

Returns:

true if the command was sent successfully, false otherwise.

class SpeedMotion : public as2::motionReferenceHandlers::BasicMotionReferenceHandler
#include <speed_motion.hpp>

The SpeedMotion class is a motion reference handler that moves the robot at a given speed.

Public Functions

SpeedMotion(as2::Node *node_ptr, const std::string &ns = "")

PositionMotion Constructor.

Parameters:

nodeas2::Node pointer.

inline ~SpeedMotion()
bool ownSendCommand()

ownSendCommand sends pose and twist messages.

Returns:

true if commands was sent successfully, false otherwise.

bool sendSpeedCommandWithYawAngle(const std::string &frame_id_speed, const float &vx, const float &vy, const float &vz, const std::string &frame_id_yaw, const float &yaw_angle)

sendSpeedCommandWithYawAngle sends a speed command to the robot. The speed command is sent in the input frame id. The linear velocity is given in m/s.

Parameters:
  • frame_id_speed – frame id of the velocity command.

  • vx – Linear velocity in the x axis.

  • vy – Linear velocity in the y axis.

  • vz – Linear velocity in the z axis.

  • frame_id_yaw – frame id of the yaw angle command.

  • yaw_angle – Yaw angle in radians.

Returns:

true if the command was sent successfully, false otherwise.

bool sendSpeedCommandWithYawAngle(const std::string &frame_id_speed, const float &vx, const float &vy, const float &vz, const std::string &frame_id_yaw, const geometry_msgs::msg::Quaternion &q)

sendSpeedCommandWithYawAngle sends a speed command to the robot. The speed command is sent in the input frame id. The linear velocity is given in m/s.

Parameters:
  • frame_id_speed – frame id of the velocity command.

  • vx – Linear velocity in the x axis.

  • vy – Linear velocity in the y axis.

  • vz – Linear velocity in the z axis.

  • frame_id_yaw – frame id of the yaw angle command.

  • q – Quaternion that represents the yaw angle.

Returns:

true if the command was sent successfully, false otherwise.

bool sendSpeedCommandWithYawAngle(const geometry_msgs::msg::PoseStamped &pose, const geometry_msgs::msg::TwistStamped &twist)

sendSpeedCommandWithYawAngle sends a speed command to the robot. The speed command is sent in the frame id frame. The linear velocity is given in m/s.

Parameters:
  • pose – PoseStamped message that represents the rotation .

  • twist – TwistStamped message that represents the linear velocity.

Returns:

true if the command was sent successfully, false otherwise.

bool sendSpeedCommandWithYawSpeed(const std::string &frame_id, const float &vx, const float &vy, const float &vz, const float &yaw_speed)

sendSpeedCommandWithYawSpeed sends a speed command to the robot. The speed command is sent in the input frame id. The linear velocity is given in m/s. The yaw speed is given in rad/s.

Parameters:
  • frame_id – frame id of the velocity command.

  • vx – Linear velocity in the x axis.

  • vy – Linear velocity in the y axis.

  • vz – Linear velocity in the z axis.

  • yaw_speed – Yaw speed in rad/s.

Returns:

true if the command was sent successfully, false otherwise.

bool sendSpeedCommandWithYawSpeed(const geometry_msgs::msg::TwistStamped &twist)

sendSpeedCommandWithYawSpeed sends a speed command to the robot. The speed command is sent in the frame id frame. The linear velocity is given in m/s. The yaw speed is given in rad/s.

Parameters:

twist – TwistStamped message that represents the linear velocity and the angular yaw speed

Returns:

true if the command was sent successfully, false otherwise.

class StateEstimator : public as2::Node

Public Functions

StateEstimator()
inline ~StateEstimator()

Private Members

std::filesystem::path plugin_name_
std::shared_ptr<pluginlib::ClassLoader<as2_state_estimator_plugin_base::StateEstimatorBase>> loader_
std::shared_ptr<as2_state_estimator_plugin_base::StateEstimatorBase> plugin_ptr_
std::shared_ptr<tf2_ros::TransformBroadcaster> tf_broadcaster_
std::shared_ptr<tf2_ros::StaticTransformBroadcaster> tfstatic_broadcaster_
std::shared_ptr<tf2_ros::Buffer> tf_buffer_
std::shared_ptr<tf2_ros::TransformListener> tf_listener_ = {nullptr}
class StateEstimatorBase

Subclassed by ground_truth::Plugin, mocap_pose::Plugin, raw_odometry::Plugin

Public Functions

inline StateEstimatorBase()
inline void setup(as2::Node *node, std::shared_ptr<tf2_ros::Buffer> tf_buffer, std::shared_ptr<tf2_ros::TransformBroadcaster> tf_broadcaster, std::shared_ptr<tf2_ros::StaticTransformBroadcaster> static_tf_broadcaster)
virtual void on_setup() = 0
inline virtual bool get_earth_to_map_transform(geometry_msgs::msg::TransformStamped &transform)

Protected Functions

inline void publish_transform(const geometry_msgs::msg::TransformStamped &transform)
inline void publish_static_transform(const geometry_msgs::msg::TransformStamped &transform)
inline void publish_twist(const geometry_msgs::msg::TwistStamped &twist)
inline void publish_pose(const geometry_msgs::msg::PoseStamped &pose)
inline const std::string &get_earth_frame() const
inline const std::string &get_map_frame() const
inline const std::string &get_odom_frame() const
inline const std::string &get_base_frame() const
inline bool get_earth_to_map_transform(tf2::Transform &earth_to_map)

Protected Attributes

as2::Node *node_ptr_
tf2::Transform odom_to_baselink
tf2::Transform earth_to_map
tf2::Transform earth_to_baselink
bool static_transforms_published_ = false
rclcpp::TimerBase::SharedPtr static_transforms_timer_

Private Functions

inline void check_standard_transform(const geometry_msgs::msg::TransformStamped &transform)

Private Members

std::string earth_frame_id_
std::string base_frame_id_
std::string odom_frame_id_
std::string map_frame_id_
tf2::Transform earth_to_map_ = tf2::Transform::getIdentity()
tf2::Transform map_to_odom_ = tf2::Transform::getIdentity()
tf2::Transform odom_to_base_ = tf2::Transform::getIdentity()
std::shared_ptr<tf2_ros::Buffer> tf_buffer_
std::shared_ptr<tf2_ros::TransformBroadcaster> tf_broadcaster_
std::shared_ptr<tf2_ros::StaticTransformBroadcaster> static_tf_broadcaster_
rclcpp::Publisher<geometry_msgs::msg::TwistStamped>::SharedPtr twist_pub_
rclcpp::Publisher<geometry_msgs::msg::PoseStamped>::SharedPtr pose_pub_
struct StateMachineTransition

Data Structure for defining the state machine transitions.

Public Members

std::string transition_name
int8_t from_state_id
int8_t transition_id
int8_t to_state_id
class SuctionGripperPlugin : public ignition::gazebo::System, public ignition::gazebo::ISystemConfigure, public ignition::gazebo::ISystemPreUpdate
#include <SuctionGripper.hh>

This plugin implements a suction gripper. When the gripper makes contact with an item it picks up the item. One can command the release of the item through a configurable topic. The plugin requires a contact sensor to detect when an item is in contact.

Parameters

<parent_link> The link to which this gripper should be attached. [string] <contact_sensor_topic> The topic to listen to for contact sensor inputs. [string] <command_topic> The topic to listen to for commands. [string]

Subscribers

<contact_sensor_topic> used to detect when an item is in contact. [gz::msgs::Contacts] <command_topic> - used to command the release of an item. Sending a False to this topic will cause the suction to stop. If there is an object then it will be released, otherwise new objects will not be picked up. Sending a true signal again will cause the suction to start again. By default suction is on. [igntion::msgs::Boolean]

Public Functions

SuctionGripperPlugin()
~SuctionGripperPlugin()
void Configure(const ignition::gazebo::Entity &_entity, const std::shared_ptr<const sdf::Element> &_sdf, ignition::gazebo::EntityComponentManager &_ecm, ignition::gazebo::EventManager &_eventMgr) override
void PreUpdate(const ignition::gazebo::UpdateInfo &_info, ignition::gazebo::EntityComponentManager &_ecm) override

Public Members

std::unique_ptr<SuctionGripperPrivate> dataPtr
class SuctionGripperPrivate

Public Functions

inline void OnContact(int idx0, int idx1, const gz::msgs::Contacts &_msg)

Callback for when contact is made.

inline void OnCmd(const gz::msgs::Boolean &_suctionOn)

Command callback.

Public Members

Entity childItem = {kNullEntity}

The item being moved.

std::string linkName

The gripper link name.

Entity joint = {kNullEntity}

Used to store the joint when we attach to an object.

Entity gripperEntity = {kNullEntity}

The gripper link entity.

transport::Node node

The transport node.

bool suctionOn = {false}

Used for determining when the suction is on.

bool pendingJointCreation = {false}

Set to true when we detect the suction gripper is in contact.

bool jointCreated = {false}

True when we are holding an object.

std::mutex mtx

mutex for accessing member variables

std::array<std::array<Entity, 3>, 3> contacts

Two-dimensional array of contact points.

transport::Node::Publisher contactPublisherCenter

Publisher for contact points.

transport::Node::Publisher contactPublisherLeft
transport::Node::Publisher contactPublisherRight
transport::Node::Publisher contactPublisherTop
transport::Node::Publisher contactPublisherBottom
template<class ServiceT>
class SynchronousServiceClient

Class for handling synchronous service clients in ROS2 without taking care about the spin() method.

Public Types

using SharedPtr = std::shared_ptr<SynchronousServiceClient<ServiceT>>

Public Functions

inline SynchronousServiceClient(std::string service_name, as2::Node *node)

Constructor.

Parameters:

service_name – Name of the service

inline bool sendRequest(const RequestT &req, ResponseT &resp, int wait_time = 0)

Send Request synchronously to the service.

Parameters:
  • request – Request to be sent to the service

  • respone – Response received from the service

  • wait_time – Time to wait for the service to be available in seconds

Returns:

True if the service was called successfully, false otherwise

inline bool sendRequest(const std::shared_ptr<RequestT> &req, std::shared_ptr<ResponseT> &resp, int wait_time = 0)

Send Request synchronously to the service.

Parameters:
  • request – Request to be sent to the service

  • respone – Response received from the service

  • wait_time – Time to wait for the service to be available in seconds

Returns:

True if the service was called successfully, false otherwise

Private Types

typedef ServiceT::Request RequestT
typedef ServiceT::Response ResponseT

Private Members

std::string service_name_
as2::Node *node_
rclcpp::CallbackGroup::SharedPtr callback_group_
rclcpp::executors::SingleThreadedExecutor callback_group_executor_
std::shared_ptr<rclcpp::Client<ServiceT>> service_client_
struct takeoff_plugin_params

Public Members

double takeoff_height = 0.0
double takeoff_speed = 0.0
double takeoff_threshold = 0.0
double tf_timeout_threshold = 0.0
class TakeoffAction : public nav2_behavior_tree::BtActionNode<as2_msgs::action::Takeoff>

Public Functions

TakeoffAction(const std::string &xml_tag_name, const BT::NodeConfiguration &conf)
virtual void on_tick() override

Function to perform some user-defined operation on tick Could do dynamic checks, such as getting updates to values on the blackboard.

inline virtual BT::NodeStatus on_success()

Function to perform some user-defined operation upon successful completion of the action. Could put a value on the blackboard.

Returns:

BT::NodeStatus Returns SUCCESS by default, user may override return another value

void on_wait_for_result(std::shared_ptr<const as2_msgs::action::Takeoff::Feedback> feedback)

Public Members

std::string action_name_

Public Static Functions

static inline BT::PortsList providedPorts()
class TakeoffBase

Subclassed by takeoff_plugin_platform::Plugin, takeoff_plugin_position::Plugin, takeoff_plugin_speed::Plugin, takeoff_plugin_trajectory::Plugin

Public Types

using GoalHandleTakeoff = rclcpp_action::ServerGoalHandle<as2_msgs::action::Takeoff>

Public Functions

inline TakeoffBase()
inline virtual ~TakeoffBase()
inline void initialize(as2::Node *node_ptr, std::shared_ptr<as2::tf::TfHandler> tf_handler, takeoff_plugin_params &params)
inline virtual void state_callback(geometry_msgs::msg::PoseStamped &pose_msg, geometry_msgs::msg::TwistStamped &twist_msg)
inline bool on_activate(std::shared_ptr<const as2_msgs::action::Takeoff::Goal> goal)
inline bool on_modify(std::shared_ptr<const as2_msgs::action::Takeoff::Goal> goal)
inline bool on_deactivate(const std::shared_ptr<std::string> &message)
inline bool on_pause(const std::shared_ptr<std::string> &message)
inline bool on_resume(const std::shared_ptr<std::string> &message)
inline void on_execution_end(const as2_behavior::ExecutionStatus &state)
inline as2_behavior::ExecutionStatus on_run(const std::shared_ptr<const as2_msgs::action::Takeoff::Goal> goal, std::shared_ptr<as2_msgs::action::Takeoff::Feedback> &feedback_msg, std::shared_ptr<as2_msgs::action::Takeoff::Result> &result_msg)

Protected Functions

inline virtual void ownInit()
virtual bool own_activate(as2_msgs::action::Takeoff::Goal &goal) = 0
inline virtual bool own_modify(as2_msgs::action::Takeoff::Goal &goal)
virtual bool own_deactivate(const std::shared_ptr<std::string> &message) = 0
inline virtual bool own_pause(const std::shared_ptr<std::string> &message)
inline virtual bool own_resume(const std::shared_ptr<std::string> &message)
virtual void own_execution_end(const as2_behavior::ExecutionStatus &state) = 0
virtual as2_behavior::ExecutionStatus own_run() = 0
inline void sendHover()

Protected Attributes

as2::Node *node_ptr_
std::shared_ptr<as2::tf::TfHandler> tf_handler = nullptr
as2_msgs::action::Takeoff::Goal goal_
as2_msgs::action::Takeoff::Feedback feedback_
as2_msgs::action::Takeoff::Result result_
takeoff_plugin_params params_
geometry_msgs::msg::PoseStamped actual_pose_
bool localization_flag_

Private Functions

inline bool processGoal(as2_msgs::action::Takeoff::Goal &_goal)

Private Members

std::shared_ptr<as2::motionReferenceHandlers::HoverMotion> hover_motion_handler_ = nullptr
class TakeoffBehavior : public as2_behavior::BehaviorServer<as2_msgs::action::Takeoff>

Public Types

using GoalHandleTakeoff = rclcpp_action::ServerGoalHandle<as2_msgs::action::Takeoff>
using PSME = as2_msgs::msg::PlatformStateMachineEvent

Public Functions

TakeoffBehavior(const rclcpp::NodeOptions &options = rclcpp::NodeOptions())
~TakeoffBehavior()
void state_callback(const geometry_msgs::msg::TwistStamped::SharedPtr _twist_msg)
bool sendEventFSME(const int8_t _event)
bool process_goal(std::shared_ptr<const as2_msgs::action::Takeoff::Goal> goal, as2_msgs::action::Takeoff::Goal &new_goal)
bool on_activate(std::shared_ptr<const as2_msgs::action::Takeoff::Goal> goal) override
bool on_modify(std::shared_ptr<const as2_msgs::action::Takeoff::Goal> goal) override
virtual bool on_deactivate(const std::shared_ptr<std::string> &message) override
virtual bool on_pause(const std::shared_ptr<std::string> &message) override
virtual bool on_resume(const std::shared_ptr<std::string> &message) override
as2_behavior::ExecutionStatus on_run(const std::shared_ptr<const as2_msgs::action::Takeoff::Goal> &goal, std::shared_ptr<as2_msgs::action::Takeoff::Feedback> &feedback_msg, std::shared_ptr<as2_msgs::action::Takeoff::Result> &result_msg) override
virtual void on_execution_end(const as2_behavior::ExecutionStatus &state) override

Private Members

std::shared_ptr<pluginlib::ClassLoader<takeoff_base::TakeoffBase>> loader_
std::shared_ptr<takeoff_base::TakeoffBase> takeoff_plugin_
std::shared_ptr<as2::tf::TfHandler> tf_handler_
std::chrono::nanoseconds tf_timeout
rclcpp::Subscription<geometry_msgs::msg::TwistStamped>::SharedPtr twist_sub_
as2::SynchronousServiceClient<as2_msgs::srv::SetPlatformStateMachineEvent>::SharedPtr platform_cli_
class TakeoffBehaviorEmulator : public as2::BasicBehavior<as2_msgs::action::Takeoff>

Public Types

using GoalHandleTakeoff = rclcpp_action::ServerGoalHandle<as2_msgs::action::Takeoff>
using PSME = as2_msgs::msg::PlatformStateMachineEvent

Public Functions

inline TakeoffBehaviorEmulator()
inline ~TakeoffBehaviorEmulator()
inline rclcpp_action::GoalResponse onAccepted(const std::shared_ptr<const as2_msgs::action::Takeoff::Goal> goal)
inline virtual rclcpp_action::CancelResponse onCancel(const std::shared_ptr<GoalHandleTakeoff> goal_handle)
inline virtual void onExecute(const std::shared_ptr<GoalHandleTakeoff> goal_handle)
class TFDynamic
#include <sensor.hpp>

TFDynamic object to publish dynamic transforms in TF.

Subclassed by as2::sensors::Gimbal

Public Functions

explicit TFDynamic(rclcpp::Node *node_ptr)

Construct a new TFDynamic object.

Parameters:

node_ptr – Pointer to the node

virtual ~TFDynamic()

Destroy the TFDynamic object.

virtual void setDynamicTransform(const geometry_msgs::msg::TransformStamped &transform)

Publish the transform.

Parameters:

transform_msg – Transform message

virtual void setDynamicTransform(const std::string &frame_id, const std::string &parent_frame_id, float x, float y, float z, float qx, float qy, float qz, float qw)

Add a dynamic transform.

Parameters:
  • frame_id – Frame ID

  • parent_frame_id – Parent Frame ID

  • x – X position (m)

  • y – Y position (m)

  • z – Z position (m)

  • qx – Quaternion X

  • qy – Quaternion Y

  • qz – Quaternion Z

  • qw – Quaternion W

virtual void setDynamicTransform(const std::string &frame_id, const std::string &parent_frame_id, float x, float y, float z, float roll, float pitch, float yaw)

Add a dynamic transform.

Parameters:
  • frame_id – Frame ID

  • parent_frame_id – Parent Frame ID

  • x – X position (m)

  • y – Y position (m)

  • z – Z position (m)

  • roll – Roll (rad)

  • pitch – Pitch (rad)

  • yaw – Yaw (rad)

std::shared_ptr<tf2_ros::TransformBroadcaster> getTransformBroadcaster() const

Get the Transform Broadcaster object.

Returns:

std::shared_ptr<tf2_ros::TransformBroadcaster>

const rclcpp::Node *getNode() const

Get the Node Pointer object.

Returns:

rclcpp::Node* Node pointer

Protected Attributes

rclcpp::Node *node_ptr_ = nullptr
std::shared_ptr<tf2_ros::TransformBroadcaster> dynamic_tf_broadcaster_ptr_
class TfHandler
#include <tf_utils.hpp>

TfHandler class to handle the tf2_ros::Buffer and tf2_ros::TransformListener with ease inside a as2::Node class.

Public Functions

inline explicit TfHandler(as2::Node *_node)

Construct a new Tf Handler object.

Parameters:

_node – an as2::Node object

inline std::shared_ptr<tf2_ros::Buffer> getTfBuffer() const

Get the tf buffer object.

Returns:

std::shared_ptr<tf2_ros::Buffer>

geometry_msgs::msg::PointStamped convert(const geometry_msgs::msg::PointStamped &_point, const std::string &target_frame, const std::chrono::nanoseconds timeout = TF_TIMEOUT)

convert a geometry_msgs::msg::PointStamped from one frame to another

Parameters:
  • _point – a geometry_msgs::msg::PointStamped

  • _target_frame – the target frame

Throws:

tf2::TransformException – if the transform is not available

Returns:

geometry_msgs::msg::PointStamped in the target frame

geometry_msgs::msg::PoseStamped convert(const geometry_msgs::msg::PoseStamped &_pose, const std::string &target_frame, const std::chrono::nanoseconds timeout = TF_TIMEOUT)

convert a geometry_msgs::msg::PoseStamped from one frame to another

Parameters:
  • _pose – a geometry_msgs::msg::PoseStamped

  • _target_frame – the target frame

Throws:

tf2::TransformException – if the transform is not available

Returns:

geometry_msgs::msg::PoseStamped in the target frame

geometry_msgs::msg::TwistStamped convert(const geometry_msgs::msg::TwistStamped &_twist, const std::string &target_frame, const std::chrono::nanoseconds timeout = TF_TIMEOUT)

convert a geometry_msgs::msg::TwistStamped from one frame to another (only the linear part will be converted, the angular part will be maintained)

Parameters:
  • _twist – a geometry_msgs::msg::TwistStamped

  • _target_frame – the target frame

Throws:

tf2::TransformException – if the transform is not available

Returns:

geometry_msgs::msg::TwistStamped in the target frame

geometry_msgs::msg::Vector3Stamped convert(const geometry_msgs::msg::Vector3Stamped &_vector, const std::string &target_frame, const std::chrono::nanoseconds timeout = TF_TIMEOUT)

convert a geometry_msgs::msg::Vector3Stamped from one frame to another

Parameters:
  • _vector – a geometry_msgs::msg::Vector3Stamped

  • _target_frame – the target frame

Throws:

tf2::TransformException – if the transform is not available

Returns:

geometry_msgs::msg::Vector3Stamped in the target frame

nav_msgs::msg::Path convert(const nav_msgs::msg::Path &_path, const std::string &target_frame, const std::chrono::nanoseconds timeout = TF_TIMEOUT)

convert a nav_msgs::msg::Path from one frame to another

Parameters:
  • _path – a nav_msgs::msg::Path

  • _target_frame – the target frame

Throws:

tf2::TransformException – if the transform is not available

Returns:

nav_msgs::msg::Path in the target frame

geometry_msgs::msg::QuaternionStamped convert(const geometry_msgs::msg::QuaternionStamped &_quaternion, const std::string &target_frame, const std::chrono::nanoseconds timeout = TF_TIMEOUT)

convert a geometry_msgs::msg::QuaternionStamped from one frame to another

Parameters:
  • _quaternion – a geometry_msgs::msg::QuaternionStamped

  • _target_frame – the target frame

Throws:

tf2::TransformException – if the transform is not available

Returns:

geometry_msgs::msg::QuaternionStamped in the target frame

geometry_msgs::msg::PoseStamped getPoseStamped(const std::string &target_frame, const std::string &source_frame, const rclcpp::Time &time, const std::chrono::nanoseconds timeout = TF_TIMEOUT)

obtain a PoseStamped from the TF_buffer

Parameters:
  • target_frame – the target frame

  • source_frame – the source frame

  • time – the time of the transform in Ros Time

Throws:

tf2::TransformException – if the transform is not available

Returns:

geometry_msgs::msg::PoseStamped

geometry_msgs::msg::PoseStamped getPoseStamped(const std::string &target_frame, const std::string &source_frame, const tf2::TimePoint &time = tf2::TimePointZero, const std::chrono::nanoseconds timeout = TF_TIMEOUT)

obtain a TransformStamped from the TF_buffer

Parameters:
  • target_frame – the target frame

  • source_frame – the source frame

  • time – the time of the transform in TimePoint

Throws:

tf2::TransformException – if the transform is not available

Returns:

geometry_msgs::msg::TransformStamped

geometry_msgs::msg::QuaternionStamped getQuaternionStamped(const std::string &target_frame, const std::string &source_frame, const tf2::TimePoint &time = tf2::TimePointZero, const std::chrono::nanoseconds timeout = TF_TIMEOUT)

obtain a TransformStamped from the TF_buffer

Parameters:
  • target_frame – the target frame

  • source_frame – the source frame

  • time – the time of the transform

Throws:

tf2::TransformException – if the transform is not available

Returns:

geometry_msgs::msg::QuaternionStamped

geometry_msgs::msg::QuaternionStamped getQuaternionStamped(const std::string &target_frame, const std::string &source_frame, const rclcpp::Time &time, const std::chrono::nanoseconds timeout = TF_TIMEOUT)

obtain a TransformStamped from the TF_buffer

Parameters:
  • target_frame – the target frame

  • source_frame – the source frame

  • time – the time of the transform

Throws:

tf2::TransformException – if the transform is not available

Returns:

geometry_msgs::msg::QuaternionStamped

geometry_msgs::msg::TransformStamped getTransform(const std::string &target_frame, const std::string &source_frame, const tf2::TimePoint &time = tf2::TimePointZero)

obtain a TransformStamped from the TF_buffer

Parameters:
  • target_frame – the target frame

  • source_frame – the source frame

  • time – the time of the transform

Throws:

tf2::TransformException – if the transform is not available

Returns:

geometry_msgs::msg::QuaternionStamped

bool tryConvert(geometry_msgs::msg::PointStamped &_point, const std::string &_target_frame, const std::chrono::nanoseconds timeout = TF_TIMEOUT)

convert a geometry_msgs::msg::PointStamped to desired frame, checking if frames are valid

Parameters:
  • point – a geometry_msgs::msg::PointStamped to get converted

  • _target_frame – the target frame

Throws:

tf2::TransformException – if the transform is not available

Returns:

bool true if the conversion was successful

bool tryConvert(geometry_msgs::msg::PoseStamped &_pose, const std::string &_target_frame, const std::chrono::nanoseconds timeout = TF_TIMEOUT)

convert a geometry_msgs::msg::PoseStamped to desired frame, checking if frames are valid

Parameters:
  • point – a geometry_msgs::msg::PoseStamped to get converted

  • _target_frame – the target frame

Throws:

tf2::TransformException – if the transform is not available

Returns:

bool true if the conversion was successful

bool tryConvert(geometry_msgs::msg::TwistStamped &_twist, const std::string &_target_frame, const std::chrono::nanoseconds timeout = TF_TIMEOUT)

convert a geometry_msgs::msg::TwistStamped to desired frame, checking if frames are valid

Parameters:
  • point – a geometry_msgs::msg::TwistStamped to get converted

  • _target_frame – the target frame

Throws:

tf2::TransformException – if the transform is not available

Returns:

bool true if the conversion was successful

bool tryConvert(geometry_msgs::msg::QuaternionStamped &_quaternion, const std::string &_target_frame, const std::chrono::nanoseconds timeout = TF_TIMEOUT)

Get the pose and twist of the UAV at the given twist timestamp, in the given frames.

Parameters:
  • _twist

  • _twist_target_frame

  • _pose_target_frame

  • _pose_source_frame

  • _timeout

Returns:

std::pair<geometry_msgs::msg::PoseStamped, geometry_msgs::msg::TwistStamped>

std::pair<geometry_msgs::msg::PoseStamped, geometry_msgs::msg::TwistStamped> getState(const geometry_msgs::msg::TwistStamped &_twist, const std::string &_twist_target_frame, const std::string &_pose_target_frame, const std::string &_pose_source_frame, const std::chrono::nanoseconds timeout = TF_TIMEOUT)

convert a geometry_msgs::msg::QuaternionStamped to desired frame, checking if frames are valid

Parameters:
  • _quaternion – a geometry_msgs::msg::QuaternionStamped to get converted

  • _target_frame – the target frame

Throws:

tf2::TransformException – if the transform is not available

Returns:

bool true if the conversion was successful

Private Members

std::shared_ptr<tf2_ros::Buffer> tf_buffer_
std::shared_ptr<tf2_ros::TransformListener> tf_listener_
as2::Node *node_
class TFStatic
#include <sensor.hpp>

TFStatic object to publish static transforms in TF.

Subclassed by as2::sensors::Camera, as2::sensors::Gimbal, as2::sensors::Sensor< T >

Public Functions

explicit TFStatic(rclcpp::Node *node_ptr)

Construct a new TFStatic object.

virtual ~TFStatic()

Destroy the TFStatic object.

virtual void setStaticTransform(const geometry_msgs::msg::TransformStamped &transformStamped)

Set the Static Transform in TF.

Parameters:

transformStamped – TransformStamped message

virtual void setStaticTransform(const std::string &frame_id, const std::string &parent_frame_id, float x, float y, float z, float qx, float qy, float qz, float qw)

Set the Static Transform in TF.

Parameters:
  • frame_id – Frame ID

  • parent_frame_id – Parent Frame ID

  • x – X position (m)

  • y – Y position (m)

  • z – Z position (m)

  • qx – Quaternion X

  • qy – Quaternion Y

  • qz – Quaternion Z

  • qw – Quaternion W

virtual void setStaticTransform(const std::string &frame_id, const std::string &parent_frame_id, float x, float y, float z, float roll, float pitch, float yaw)

Set the Static Transform in TF.

Parameters:
  • frame_id – Frame ID

  • parent_frame_id – Parent Frame ID

  • x – X position (m)

  • y – Y position (m)

  • z – Z position (m)

  • roll – Roll (rad)

  • pitch – Pitch (rad)

  • yaw – Yaw (rad)

const rclcpp::Node *getNode() const

Get the Node Pointer object.

Returns:

rclcpp::Node* Node pointer

Private Functions

virtual void setStaticTransform_(const geometry_msgs::msg::TransformStamped &transformStamped)

Set the Static Transform in TF.

Parameters:

transformStamped – TransformStamped message

Private Members

rclcpp::Node *node_ptr_ = nullptr
class TrajectoryMotion : public as2::motionReferenceHandlers::BasicMotionReferenceHandler

The TrajectoryMotion class is a motion reference handler that sends a puntual trajectory reference to the robot. The trajectory point is given by a position, a yaw angle, a velocity and a acceleration.

Public Functions

TrajectoryMotion(as2::Node *node_ptr, const std::string &ns = "")

TrajectoryMotion constructor.

Parameters:

nodeas2::Node pointer.

inline ~TrajectoryMotion()
bool sendTrajectoryCommandWithYawAngle(const std::string &frame_id, const double x, const double y, const double z, const double yaw_angle, const double vx, const double vy, const double vz, const double ax, const double ay, const double az)

sendTrajectoryCommandWithYawAngle sends a trajectory command to the robot.

Parameters:
  • frame_id – frame id of trayectory point.

  • x – x coordinate of the trajectory point.

  • y – y coordinate of the trajectory point.

  • z – z coordinate of the trajectory point.

  • yaw_angle – yaw angle of the trajectory point.

  • vx – x velocity of the trajectory point.

  • vy – y velocity of the trajectory point.

  • vz – z velocity of the trajectory point.

  • ax – x acceleration of the trajectory point.

  • ay – y acceleration of the trajectory point.

  • az – z acceleration of the trajectory point.

Returns:

true if the command was sent successfully, false otherwise.

bool sendTrajectoryCommandWithYawAngle(const std::string &frame_id, const double yaw_angle, const std::vector<double> &positions, const std::vector<double> &velocities, const std::vector<double> &accelerations)

sendTrajectoryCommandWithYawAngle sends a trajectory command to the robot.

Parameters:
  • frame_id – frame id of trayectory point.

  • yaw_angle – yaw angle of the trajectory point.

  • positions – vector of positions of the trajectory point (x,y,z).

  • velocities – vector of velocities of the trajectory point (vx,vy,vz).

  • accelerations – vector of accelerations of the trajectory point (ax,ay,az).

Returns:

true if the command was sent successfully, false otherwise.

bool sendTrajectoryCommandWithYawAngle(const std::string &frame_id, const double yaw_angle, const Eigen::Vector3d &positions, const Eigen::Vector3d &velocities, const Eigen::Vector3d &accelerations)

sendTrajectoryCommandWithYawAngle sends a trajectory command to the robot.

Parameters:
  • frame_id – frame id of trayectory point.

  • yaw_angle – yaw angle of the trajectory point.

  • positions – vector of positions of the trajectory point (x,y,z).

  • velocities – vector of velocities of the trajectory point (vx,vy,vz).

  • accelerations – vector of accelerations of the trajectory point (ax,ay,az).

Returns:

true if the command was sent successfully, false otherwise.

struct UAV_command

Public Members

Eigen::Vector3d velocity = Eigen::Vector3d::Zero()
double yaw_speed = 0.0
struct UAV_reference

Public Members

Eigen::Vector3d position = Eigen::Vector3d::Zero()
Eigen::Vector3d velocity = Eigen::Vector3d::Zero()
Eigen::Vector3d acceleration = Eigen::Vector3d::Zero()
double yaw = 0.0
struct UAV_state

Public Members

Eigen::Vector3d position = Eigen::Vector3d::Zero()
Eigen::Vector3d velocity = Eigen::Vector3d::Zero()
tf2::Quaternion attitude_state = tf2::Quaternion::getIdentity()
struct UAV_state

Public Members

Eigen::Vector3d position = Eigen::Vector3d::Zero()
Eigen::Vector3d velocity = Eigen::Vector3d::Zero()
Eigen::Vector3d yaw = Eigen::Vector3d::Zero()
class UsbCameraInterface : public as2::Node

Public Functions

UsbCameraInterface()

Construct a new UsbCameraInterface object.

inline ~UsbCameraInterface()

Destroy the UsbCameraInterface object.

Private Functions

void setCameraParameters(const cv::Mat &_camera_matrix, const cv::Mat &_dist_coeffs)
void loadParameters()
void captureImage()
void setupCamera()
void setCameraTransform()
void setCameraModelTransform(const std::string &_camera_flu, const std::string &_camera_rdf)

Private Members

std::shared_ptr<as2::sensors::Camera> camera_
std::string camera_name_
std::string camera_frame_
std::string device_port_
int image_width_
int image_height_
double framerate_
cv::Mat camera_matrix_
cv::Mat dist_coeffs_
std::string distortion_model_
std::string camera_model_
std::string encoding_
cv::VideoCapture cap_
class WaitForAlert : public BT::DecoratorNode

Public Functions

WaitForAlert(const std::string &xml_tag_name, const BT::NodeConfiguration &conf)

Public Static Functions

static inline BT::PortsList providedPorts()

Private Functions

BT::NodeStatus tick() override
void callback(as2_msgs::msg::AlertEvent::SharedPtr msg)

Private Members

rclcpp::Node::SharedPtr node_
rclcpp::CallbackGroup::SharedPtr callback_group_
rclcpp::executors::SingleThreadedExecutor callback_group_executor_
rclcpp::Subscription<as2_msgs::msg::AlertEvent>::SharedPtr sub_
std::string topic_name_
bool flag_ = false
class WaitForEvent : public BT::DecoratorNode

Public Functions

WaitForEvent(const std::string &xml_tag_name, const BT::NodeConfiguration &conf)

Public Static Functions

static inline BT::PortsList providedPorts()

Private Functions

BT::NodeStatus tick() override
void callback(std_msgs::msg::String::SharedPtr msg)

Private Members

rclcpp::Node::SharedPtr node_
rclcpp::CallbackGroup::SharedPtr callback_group_
rclcpp::executors::SingleThreadedExecutor callback_group_executor_
rclcpp::Subscription<std_msgs::msg::String>::SharedPtr sub_
std::string topic_name_
bool flag_ = false
namespace as2

Typedefs

using Event = as2_msgs::msg::PlatformStateMachineEvent

Event type.

using Rate = as2::rate::GenericRate<std::chrono::system_clock>
using WallRate = as2::rate::GenericRate<std::chrono::steady_clock>

Functions

void spinLoop(std::shared_ptr<as2::Node> node, std::function<void()> run_function = nullptr)

Executes the main loop of the node.

Parameters:
  • node – node to execute the main loop

  • run_function – function to be executed in the main loop. Node frequency must be higher than 0

namespace control_mode

Functions

uint8_t convertAS2ControlModeToUint8t(const as2_msgs::msg::ControlMode &mode)
as2_msgs::msg::ControlMode convertUint8tToAS2ControlMode(uint8_t control_mode_uint8t)
std::string controlModeToString(const uint8_t control_mode_uint8t)
std::string controlModeToString(const as2_msgs::msg::ControlMode &mode)
constexpr uint8_t convertToUint8t(const as2_msgs::msg::ControlMode &mode)
constexpr uint8_t convertToUint8t(uint8_t control_mode_uint8t, uint8_t yaw_mode_uint8t, uint8_t reference_frame_uint8t)
inline bool compareModes(const uint8_t mode1, const uint8_t mode2, const uint8_t mask = MATCH_ALL)
inline bool compareModes(const as2_msgs::msg::ControlMode &mode1, const as2_msgs::msg::ControlMode &mode2, const uint8_t mask = MATCH_ALL)
inline bool isUnsetMode(const uint8_t control_mode_uint8t)
inline bool isUnsetMode(const as2_msgs::msg::ControlMode &mode)
inline bool isHoverMode(const uint8_t control_mode_uint8t)
inline bool isHoverMode(const as2_msgs::msg::ControlMode &mode)
void printControlMode(const as2_msgs::msg::ControlMode &mode)
void printControlMode(uint8_t control_mode_uint8t)
namespace frame

Functions

Eigen::Vector3d transform(const tf2::Quaternion &quaternion, const Eigen::Vector3d &vector)

Apply a quaternion rotation to a vector.

Parameters:
  • quaternion – tf2::Quaternion to apply.

  • vector – Eigen::Vector3d Vector to rotate.

Returns:

Returns:

Eigen::Vector3d Rotated vector.

Eigen::Vector3d transform(const float roll_angle, const float pitch_angle, const float yaw_angle, const Eigen::Vector3d &vector)

Apply a quaternion rotation to a vector.

Parameters:
  • roll_angle – Roll angle to apply.

  • pitch_angle – Pitch angle to apply.

  • yaw_angle – Yaw angle to apply.

  • vector – Eigen::Vector3d Vector to rotate.

Returns:

Returns:

Eigen::Vector3d Rotated vector.

Eigen::Vector3d transform(const geometry_msgs::msg::Quaternion &quaternion, const Eigen::Vector3d &vector)

Apply a quaternion rotation to a vector.

Parameters:
  • quaternion – geometry_msgs::Quaternion to apply.

  • vector – Eigen::Vector3d Vector to rotate.

Returns:

Returns:

Eigen::Vector3d Rotated vector.

Eigen::Vector3d transform(const Eigen::Quaterniond &quaternion, const Eigen::Vector3d &vector)

Apply a quaternion rotation to a vector.

Parameters:
  • quaternion – Eigen::Quaterniond to apply.

  • vector – Eigen::Vector3d Vector to rotate.

Returns:

Returns:

Eigen::Vector3d Rotated vector.

Eigen::Vector3d transformInverse(const tf2::Quaternion &quaternion, const Eigen::Vector3d &vector)

Apply a inverse quaternion rotation to a vector.

Parameters:
  • quaternion – tf2::Quaternion to apply.

  • vector – Eigen::Vector3d Vector to rotate.

Returns:

Returns:

Eigen::Vector3d Rotated vector.

Eigen::Vector3d transformInverse(const float roll_angle, const float pitch_angle, const float yaw_angle, const Eigen::Vector3d &vector)

Apply a inverse quaternion rotation to a vector.

Parameters:
  • roll_angle – Roll angle to apply.

  • pitch_angle – Pitch angle to apply.

  • yaw_angle – Yaw angle to apply.

  • vector – Eigen::Vector3d Vector to rotate.

Returns:

Returns:

Eigen::Vector3d Rotated vector.

Eigen::Vector3d transformInverse(const geometry_msgs::msg::Quaternion &quaternion, const Eigen::Vector3d &vector)

Apply a inverse quaternion rotation to a vector.

Parameters:
  • quaternion – geometry_msgs::Quaternion to apply.

  • vector – Eigen::Vector3d Vector to rotate.

Returns:

Returns:

Eigen::Vector3d Rotated vector.

Eigen::Vector3d transformInverse(const Eigen::Quaterniond &quaternion, const Eigen::Vector3d &vector)

Apply a inverse quaternion rotation to a vector.

Parameters:
  • quaternion – Eigen::Quaterniond to apply.

  • vector – Eigen::Vector3d Vector to rotate.

  • quaternion – geometry_msgs::msg::Pose with the quaternion to apply.

  • vector – Eigen::Vector3d Vector to rotate.

Returns:

Returns:

Eigen::Vector3d Rotated vector.

Returns:

Returns:

Eigen::Vector3d Rotated vector.

void quaternionToEuler(const tf2::Quaternion &quaternion, double &roll, double &pitch, double &yaw)

Convert quaternion to euler angles.

Parameters:
  • quaternion – tf2::Quaternion to convert.

  • roll – double pointer to store roll angle.

  • pitch – double pointer to store pitch angle.

  • yaw – double pointer to store yaw angle.

void quaternionToEuler(const geometry_msgs::msg::Quaternion &quaternion, double &roll, double &pitch, double &yaw)

Convert quaternion to euler angles.

Parameters:
  • quaternion – geometry_msgs::msg::Quaternion to convert.

  • roll – double pointer to store roll angle.

  • pitch – double pointer to store pitch angle.

  • yaw – double pointer to store yaw angle.

void quaternionToEuler(const Eigen::Quaterniond &quaternion, double &roll, double &pitch, double &yaw)

Convert quaternion to euler angles.

Parameters:
  • quaternion – Eigen::Quaternion to convert.

  • yaw – double pointer to store yaw angle.

void eulerToQuaternion(const double roll, const double pitch, const double yaw, tf2::Quaternion &quaternion)

Convert euler angles to quaternion.

Parameters:
  • roll – double roll angle.

  • pitch – double pitch angle.

  • yaw – double yaw angle.

  • quaternion – tf2::Quaternion pointer to store quaternion.

void eulerToQuaternion(const double roll, const double pitch, const double yaw, geometry_msgs::msg::Quaternion &quaternion)

Convert euler angles to quaternion.

Parameters:
  • roll – double roll angle.

  • pitch – double pitch angle.

  • yaw – double yaw angle.

  • quaternion – geometry_msgs::msg::Quaternion pointer to store quaternion.

void eulerToQuaternion(const double roll, const double pitch, const double yaw, Eigen::Quaterniond &quaternion)

Convert euler angles to quaternion.

Parameters:
  • roll – double roll angle.

  • pitch – double pitch angle.

  • yaw – double yaw angle.

  • quaternion – Eigen::Quaterniond pointer to store quaternion.

double getYawFromQuaternion(const tf2::Quaternion &quaternion)

Convert quaternion to euler angles.

Parameters:
  • quaternion – tf2::Quaternion to convert.

  • yaw – double pointer to store yaw angle.

double getYawFromQuaternion(const geometry_msgs::msg::Quaternion &quaternion)

Convert quaternion to euler angles.

Parameters:
  • quaternion – geometry_msgs::msg::Quaternion to convert.

  • yaw – double pointer to store yaw angle.

Returns:

Double yaw angle.

double getYawFromQuaternion(const Eigen::Quaterniond &quaternion)

Convert quaternion to euler angles.

Parameters:
  • quaternion – Eigen::Quaternion to convert.

  • yaw – double pointer to store yaw angle.

Returns:

Double yaw angle.

double getVector2DAngle(const double x, const double y)

Compute the angle between of a given vector in 2D and the unitary vector (1,0).

Parameters:
  • x – double x coordinate of the vector.

  • y – double y coordinate of the vector.

Returns:

Double yaw angle.

double wrapAngle0To2Pi(const double theta)

Wrap angle to [0, 2*pi].

Parameters:

theta – double angle.

Returns:

Double wrapped angle.

double wrapAnglePiToPi(const double theta)

Wrap angle to [-pi, pi].

Parameters:

theta – double angle.

Returns:

Double wrapped angle.

double angleMinError(const double theta1, const double theta2)

Compute the minumun angle between two angles. Maximun error is pi.

Parameters:
  • theta1 – double first angle.

  • theta2 – double second angle.

Returns:

Double yaw difference.

namespace gps

Functions

void Ecef2LatLon(const geometry_msgs::msg::PoseStamped &ps, geographic_msgs::msg::GeoPoseStamped &gps)

Variables

static const GeographicLib::Geocentric &earth = GeographicLib::Geocentric::WGS84()
static const char global_frame[] = "earth"
namespace motionReferenceHandlers
namespace rate
namespace sensors

Typedefs

using Odometry = Sensor<nav_msgs::msg::Odometry>
using Imu = Sensor<sensor_msgs::msg::Imu>
using GPS = Sensor<sensor_msgs::msg::NavSatFix>
using Lidar = Sensor<sensor_msgs::msg::LaserScan>
using Battery = Sensor<sensor_msgs::msg::BatteryState>
using Barometer = Sensor<sensor_msgs::msg::FluidPressure>
using Compass = Sensor<sensor_msgs::msg::MagneticField>
using RangeFinder = Sensor<sensor_msgs::msg::Range>
namespace tf

Functions

std::string generateTfName(const std::string &_namespace, const std::string &_frame_name)

Add namespace to the name of the Transform frame id.

Parameters:
  • _namespace

  • _frame_name

Returns:

std::string namespace/frame_id

std::string generateTfName(rclcpp::Node *node, std::string _frame_name)
geometry_msgs::msg::TransformStamped getTransformation(const std::string &_frame_id, const std::string &_child_frame_id, double _translation_x, double _translation_y, double _translation_z, double _roll, double _pitch, double _yaw)

Generate a Transform message from translation and rotation in Euler angles.

Parameters:
  • _frame_id

  • _child_frame_id

  • _translation_x

  • _translation_y

  • _translation_z

  • _roll

  • _pitch

  • _yaw

Returns:

geometry_msgs::msg::TransformStamped

namespace yaml

Functions

std::filesystem::path get_project_export_path_from_xml_path(const std::filesystem::path &xml_path)
std::vector<std::filesystem::path> find_yaml_files_inside(const std::filesystem::path &dir)
YAML::Node find_tag_across_multiple_yaml_files(const std::vector<std::filesystem::path> &yaml_files, const std::string &tag)
uint8_t parse_uint_from_string(const std::string &str)
std::vector<uint8_t> parse_uint_from_string(const std::vector<std::string> &str_v)
YAML::Node find_tag_in_yaml_node(const YAML::Node &node, const std::string &tag)
template<typename T = std::string>
std::vector<T> find_tag_in_yaml_file(const std::filesystem::path &yaml_file, const std::string &tag)
template<typename T = std::string>
std::vector<T> find_tag_from_project_exports_path(const std::filesystem::path &project_exports_path, const std::string &tag)
YAML::Node search_tag_across_multiple_yaml_files(const std::vector<std::filesystem::path> &yaml_files, const std::string &tag)
namespace as2_behavior

Enums

enum class ExecutionStatus

Values:

enumerator SUCCESS
enumerator RUNNING
enumerator FAILURE
enumerator ABORTED
namespace as2_behavior_tree
namespace as2_motion_controller_plugin_base
namespace as2_names
namespace actions
namespace behaviors

Variables

const char takeoff[] = "TakeoffBehavior"
const char gotowaypoint[] = "GoToBehavior"
const char followreference[] = "FollowReferenceBehavior"
const char followpath[] = "FollowPathBehavior"
const char land[] = "LandBehavior"
const char trajectorygenerator[] = "TrajectoryGeneratorBehavior"
namespace services

Variables

const char set_speed[] = ""
namespace behavior

Variables

const char package_pickup[] = "behavior/package_pickup"
const char package_unpick[] = "behavior/package_unpick"
const char dynamic_land[] = "behavior/dynamic_land"
const char dynamic_follower[] = "behavior/dynamic_follower"
namespace controller

Variables

const char set_control_mode[] = "controller/set_control_mode"
const char list_control_modes[] = "controller/list_control_modes"
namespace gps

Variables

const char get_origin[] = "get_origin"
const char set_origin[] = "set_origin"
const char path_to_geopath[] = ""
const char geopath_to_path[] = ""
namespace motion_reference

Variables

const char send_traj_wayp[] = "traj_gen/send_traj_wayp"
const char add_traj_wayp[] = "traj_gen/add_traj_wayp"
const char set_traj_speed[] = "traj_gen/set_traj_speed"
namespace platform

Variables

const char set_arming_state[] = "set_arming_state"
const char set_offboard_mode[] = "set_offboard_mode"
const char set_platform_control_mode[] = "set_platform_control_mode"
const char takeoff[] = "platform_takeoff"
const char land[] = "platform_land"
const char set_platform_state_machine_event[] = "platform/state_machine_event"
const char list_control_modes[] = "platform/list_control_modes"
namespace topics
namespace actuator_command

Variables

const rclcpp::QoS qos = rclcpp::SensorDataQoS()
const char pose[] = "actuator_command/pose"
const char twist[] = "actuator_command/twist"
const char thrust[] = "actuator_command/thrust"
const char trajectory[] = "actuator_command/trajectory"
namespace controller

Variables

const rclcpp::QoS qos_info = rclcpp::QoS(10)
const char info[] = "controller/info"
namespace follow_target

Variables

const rclcpp::QoS qos_info = rclcpp::QoS(10)
const char info[] = "follow_target/info"
namespace global

Variables

const rclcpp::QoS qos = rclcpp::QoS(10)
const char alert_event[] = "alert_event"
namespace ground_truth

Variables

const rclcpp::QoS qos = rclcpp::SensorDataQoS()
const char pose[] = "ground_truth/pose"
const char twist[] = "ground_truth/twist"
namespace motion_reference

Variables

const rclcpp::QoS qos = rclcpp::SensorDataQoS()
const rclcpp::QoS qos_waypoint = rclcpp::QoS(10)
const rclcpp::QoS qos_trajectory = rclcpp::QoS(10)
const char pose[] = "motion_reference/pose"
const char twist[] = "motion_reference/twist"
const char trajectory[] = "motion_reference/trajectory"
const char waypoints[] = "motion_reference/waypoints"
const char modify_waypoint[] = "motion_reference/modify_waypoint"
const char traj_gen_info[] = "motion_reference/traj_gen_info"
namespace platform

Variables

const rclcpp::QoS qos = rclcpp::QoS(10)
const char info[] = "platform/info"
namespace self_localization

Variables

const rclcpp::QoS qos = rclcpp::SensorDataQoS()
const char odom[] = "self_localization/odom"
const char pose[] = "self_localization/pose"
const char twist[] = "self_localization/twist"
namespace sensor_measurements

Variables

const rclcpp::QoS qos = rclcpp::SensorDataQoS()
const char base[] = "sensor_measurements/"
const char imu[] = "sensor_measurements/imu"
const char lidar[] = "sensor_measurements/lidar"
const char gps[] = "sensor_measurements/gps"
const char camera[] = "sensor_measurements/camera"
const char battery[] = "sensor_measurements/battery"
const char odom[] = "sensor_measurements/odom"
namespace as2_platform_multirotor_simulator
namespace as2_state_estimator_plugin_base
namespace BT

Functions

template<>
inline geometry_msgs::msg::Pose convertFromString(BT::StringView str)
template<>
inline Position2D convertFromString(StringView str)
namespace controller_handler

Functions

static inline bool checkMatchWithMask(const uint8_t mode1, const uint8_t mode2, const uint8_t mask)
static uint8_t findBestMatchWithMask(const uint8_t mode, const std::vector<uint8_t> &mode_list, const uint8_t mask)
namespace controller_manager
namespace differential_flatness_controller
namespace follow_path_base
namespace follow_path_plugin_position
namespace follow_path_plugin_trajectory
namespace gazebo
namespace gazebo_platform
namespace GeographicLib
namespace go_to_base
namespace go_to_plugin_position
namespace go_to_plugin_trajectory
namespace ground_truth
namespace ignition
namespace gazebo
namespace land_base
namespace land_plugin_platform
namespace land_plugin_speed
namespace land_plugin_trajectory
namespace mbzirc
namespace mocap_pose
namespace nav2_behavior_tree
namespace pid_speed_controller
namespace point_gimbal_behavior
namespace raw_odometry
namespace rclcpp
namespace std

STL namespace.

namespace chrono_literals
namespace takeoff_base
namespace takeoff_plugin_platform
namespace takeoff_plugin_position
namespace takeoff_plugin_speed
namespace takeoff_plugin_trajectory
file gazebo_platform.hpp
#include <rclcpp/logging.hpp>
#include <rclcpp/rclcpp.hpp>
#include <std_msgs/msg/bool.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>

Implementation of an Gazebo UAV platform.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file gazebo_platform.cpp
#include “gazebo_platform.hpp

Implementation of an Gazebo UAV platform.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file gazebo_platform_main.cpp
#include “gazebo_platform.hpp

ROS2 node for gazebo platform.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Functions

int main(int argc, char *argv[])
file as2_platform_multirotor_simulator.hpp
#include <string>
#include <memory>
#include <vector>
#include <rclcpp/rclcpp.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <sensor_msgs/msg/imu.hpp>
#include <sensor_msgs/msg/nav_sat_fix.hpp>
#include <nav_msgs/msg/odometry.hpp>
#include “as2_core/sensor.hpp
#include “as2_msgs/msg/control_mode.hpp”
#include “as2_msgs/msg/gimbal_control.hpp”
#include “multirotor_simulator.hpp”

MultirotorSimulatorPlatform class definition

Author

Rafael Perez-Segui r.psegui@upm.es

file as2_platform_multirotor_simulator.cpp

MultirotorSimulatorPlatform class implementation

Author

Rafael Perez-Segui r.psegui@upm.es

file as2_platform_multirotor_simulator_node.cpp

MultirotorSimulatorPlatform node implementation

Author

Rafael Perez-Segui r.psegui@upm.es

Functions

int main(int argc, char *argv[])
file arm_service.hpp
#include “behaviortree_cpp_v3/action_node.h”
#include “nav2_behavior_tree/bt_service_node.hpp”
#include <std_srvs/srv/set_bool.hpp>

Arm and disarm services implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file echo.hpp
#include “behaviortree_cpp_v3/action_node.h”
#include “rclcpp/rclcpp.hpp”

Echo implementation as behavior tree node. Just for testing purpouses.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file follow_path.hpp
#include <string>
#include “behaviortree_cpp_v3/action_node.h”
#include “as2_msgs/action/follow_path.hpp”
#include “as2_msgs/msg/pose_with_id.hpp”
#include “as2_msgs/msg/yaw_mode.hpp”
file get_origin.hpp
#include “behaviortree_cpp_v3/action_node.h”
#include “nav2_behavior_tree/bt_service_node.hpp”
#include “as2_msgs/srv/get_origin.hpp”

Get origin implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí Javier Melero Deza

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file go_to_action.hpp
#include “behaviortree_cpp_v3/action_node.h”
#include “as2_msgs/action/go_to_waypoint.hpp”
#include “geometry_msgs/msg/point_stamped.hpp”

Go to action implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file go_to_gps_action.hpp
#include <iterator>
#include “behaviortree_cpp_v3/action_node.h”
#include “as2_msgs/action/go_to_waypoint.hpp”
#include “as2_msgs/srv/geopath_to_path.hpp”
#include “geometry_msgs/msg/point.hpp”

Go to Gps action implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí Javier Melero Deza

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file gps_to_cartesian.hpp
#include <iterator>
#include “behaviortree_cpp_v3/action_node.h”
#include “as2_msgs/srv/geopath_to_path.hpp”
#include “geometry_msgs/msg/pose.hpp”
#include “nav2_behavior_tree/bt_service_node.hpp”
#include “rclcpp/rclcpp.hpp”

GPS to Cartesian implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file land_action.hpp
#include “behaviortree_cpp_v3/action_node.h”
#include “as2_msgs/action/land.hpp”

Land action implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file offboard_service.hpp
#include “behaviortree_cpp_v3/action_node.h”
#include “nav2_behavior_tree/bt_service_node.hpp”
#include <std_srvs/srv/set_bool.hpp>

Offboard service implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file send_event.hpp
#include “behaviortree_cpp_v3/action_node.h”
#include “nav2_behavior_tree/bt_service_node.hpp”
#include “std_msgs/msg/string.hpp”

Send event implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file set_origin.hpp
#include “behaviortree_cpp_v3/action_node.h”
#include “nav2_behavior_tree/bt_service_node.hpp”
#include “as2_msgs/srv/set_origin.hpp”

Set origin implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí Javier Melero Deza

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file takeoff_action.hpp
#include “behaviortree_cpp_v3/action_node.h”
#include “as2_msgs/action/takeoff.hpp”
#include <chrono>
#include <thread>

Takeoff action implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file bt_action_node.hpp
#include <chrono>
#include <memory>
#include <string>
#include “behaviortree_cpp_v3/action_node.h”
#include “nav2_behavior_tree/bt_conversions.hpp”
#include “nav2_util/node_utils.hpp”
#include “rclcpp_action/rclcpp_action.hpp”
file bt_service_node.hpp
#include <memory>
#include <string>
#include “behaviortree_cpp_v3/action_node.h”
#include “nav2_behavior_tree/bt_conversions.hpp”
#include “nav2_util/node_utils.hpp”
#include “rclcpp/rclcpp.hpp”
file is_flying_condition.hpp
#include <string>
#include “behaviortree_cpp_v3/condition_node.h”
#include “as2_msgs/msg/platform_info.hpp”
#include “as2_msgs/msg/platform_status.hpp”
#include “rclcpp/rclcpp.hpp”

behavior tree node to check if an aircraft is flying

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file wait_for_alert.hpp
#include <string>
#include “behaviortree_cpp_v3/decorator_node.h”
#include “as2_msgs/msg/alert_event.hpp”
#include “rclcpp/rclcpp.hpp”

Wait for alert implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí Javier Melero Deza

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file wait_for_event.hpp
#include <string>
#include “behaviortree_cpp_v3/decorator_node.h”
#include “geometry_msgs/msg/pose.hpp”
#include “rclcpp/rclcpp.hpp”
#include “std_msgs/msg/string.hpp”

Wait for event implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file port_specialization.hpp
#include “behaviortree_cpp_v3/bt_factory.h”
#include “geometry_msgs/msg/point_stamped.hpp”
#include “geometry_msgs/msg/pose.hpp”
#include “geometry_msgs/msg/pose_stamped.hpp”
#include “as2_msgs/msg/pose_with_id.hpp”

List of custom ports.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file arm_service.cpp

Arm and disarm services implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file echo.cpp

Echo implementation as behavior tree node. Just for testing purpouses.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file get_origin.cpp
file go_to_action.cpp

Go to action implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file go_to_gps_action.cpp
#include “rclcpp/rclcpp.hpp”

Go to gps action implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí Javier Melero Deza

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file gps_to_cartesian.cpp
file land_action.cpp

Land action implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file offboard_service.cpp

Offboard service implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file send_event.cpp

Send event implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file set_origin.cpp
file takeoff_action.cpp

Takeoff action implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file is_flying_condition.cpp

behavior tree node to check if an aircraft is flying

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file wait_for_alert.cpp

Wait for alert implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí Javier Melero Deza

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file wait_for_event.cpp

Wait for event implementation as behavior tree node.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file as2_behavior_tree_node.cpp
#include <chrono>
#include <thread>
#include “behaviortree_cpp_v3/bt_factory.h”
#include “rclcpp/rclcpp.hpp”
#include <behaviortree_cpp_v3/loggers/bt_zmq_publisher.h>
#include “behaviortree_cpp_v3/loggers/bt_cout_logger.h”

ROS2 entrypoint for launching a node to run a behavior tree.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Functions

int main(int argc, char *argv[])
file follow_path_emulator.hpp
#include “as2_msgs/action/follow_path.hpp”
file go_to_emulator.hpp
#include “as2_msgs/action/go_to_waypoint.hpp”

Go to emulator class definition.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file goto_emulator.hpp
#include “as2_msgs/action/go_to_waypoint.hpp”
file land_emulator.hpp
#include “as2_msgs/action/land.hpp”

Land emulator class definition.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file platform_emulator.hpp

Platform emulator class definition.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file takeoff_emulator.hpp
#include “as2_msgs/action/takeoff.hpp”

Takeoff emulator class definition.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file follow_path_emulator.cpp

Functions

int main(int argc, char *argv[])
file go_to_emulator.cpp

Functions

int main(int argc, char *argv[])
file land_emulator.cpp

Functions

int main(int argc, char *argv[])
file platform_emulator.cpp

Functions

int main(int argc, char *argv[])
file takeoff_emulator.cpp

Functions

int main(int argc, char *argv[])
file port.cpp
#include “behaviortree_cpp_v3/bt_factory.h”
#include “behaviortree_cpp_v3/loggers/bt_cout_logger.h”

Functions

int main()

Variables

static const char * xml_text  = R"(<root main_tree_to_execute = "MainTree" ><BehaviorTree ID="MainTree"><Sequence name="root"><CalculateGoal   goal="{GoalPosition}" /><PrintTarget     target="{GoalPosition}" /><SetBlackboard   output_key="OtherGoal" value="-1;3" /><PrintTargettarget="{OtherGoal}" /></Sequence></BehaviorTree></root>)"

The tree is a Sequence of 4 actions

1) Store a value of Position2D in the entry “GoalPosition” using the action CalculateGoal.

2) Call PrintTarget. The input “target” will be read from the Blackboard entry “GoalPosition”.

3) Use the built-in action SetBlackboard to write the key “OtherGoal”. A conversion from string to Position2D will be done under the hood.

4) Call PrintTarget. The input “goal” will be read from the Blackboard entry “OtherGoal”.

file port_pose.cpp
#include “behaviortree_cpp_v3/bt_factory.h”
#include “geometry_msgs/msg/point_stamped.hpp”
#include “geometry_msgs/msg/pose.hpp”
#include “behaviortree_cpp_v3/loggers/bt_cout_logger.h”

Functions

int main()

Variables

static const char * xml_text  = R"(<root main_tree_to_execute = "MainTree" ><BehaviorTree ID="MainTree"><Sequence name="root"><CalculateGoal   goal="{GoalPosition}" /><PrintTarget     target="{GoalPosition}" /><SetBlackboard   output_key="OtherGoal" value="-1;-2;-3" /><PrintTargettarget="{OtherGoal}" /></Sequence></BehaviorTree></root>)"

The tree is a Sequence of 4 actions

1) Store a value of Position2D in the entry “GoalPosition” using the action CalculateGoal.

2) Call PrintTarget. The input “target” will be read from the Blackboard entry “GoalPosition”.

3) Use the built-in action SetBlackboard to write the key “OtherGoal”. A conversion from string to Position2D will be done under the hood.

4) Call PrintTarget. The input “goal” will be read from the Blackboard entry “OtherGoal”.

file behavior_server__class.hpp
#include <as2_core/node.hpp>
#include <rclcpp/rclcpp.hpp>
#include <rclcpp/service.hpp>
#include <rclcpp_action/rclcpp_action.hpp>
#include <rclcpp_action/server.hpp>
file behavior_server__impl.hpp
file as2_basic_behavior.hpp
#include <chrono>
#include <cmath>
#include <memory>
#include <string>
#include “as2_core/node.hpp
#include “as2_core/sensor.hpp
#include “as2_msgs/msg/thrust.hpp”
#include “geometry_msgs/msg/pose_stamped.hpp”
#include “geometry_msgs/msg/twist_stamped.hpp”
#include “nav_msgs/msg/odometry.hpp”
#include “rclcpp_action/rclcpp_action.hpp”
#include “sensor_msgs/msg/battery_state.hpp”
#include “sensor_msgs/msg/imu.hpp”

Aerostack2 basic behavior virtual class header file.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file as2_basic_behavior.hpp
#include <chrono>
#include <cmath>
#include <memory>
#include <string>
#include “as2_core/node.hpp
#include “as2_core/sensor.hpp
#include “as2_msgs/msg/thrust.hpp”
#include “geometry_msgs/msg/pose_stamped.hpp”
#include “geometry_msgs/msg/twist_stamped.hpp”
#include “nav_msgs/msg/odometry.hpp”
#include “rclcpp_action/rclcpp_action.hpp”
#include “sensor_msgs/msg/battery_state.hpp”
#include “sensor_msgs/msg/imu.hpp”

Aerostack2 basic behavior virtual class header file.

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

file behavior_server.hpp
file behavior_utils.hpp
#include <as2_msgs/msg/behavior_status.hpp>
#include <rclcpp/rclcpp.hpp>
#include <std_srvs/srv/trigger.hpp>
#include <string>
file behavior_client.cpp
#include “behavior_client.hpp”
file behavior_server.cpp
#include “behavior_server.hpp
file follow_path_base.hpp
#include <Eigen/Dense>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <rclcpp_action/rclcpp_action.hpp>
#include “as2_msgs/action/follow_path.hpp”
#include “as2_msgs/msg/platform_info.hpp”
#include “as2_msgs/msg/platform_status.hpp”

follow_path_base header file

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file follow_path_behavior.hpp
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <pluginlib/class_loader.hpp>
#include <rclcpp_action/rclcpp_action.hpp>
#include “as2_msgs/action/follow_path.hpp”
#include “as2_msgs/msg/platform_info.hpp”
#include “follow_path_base.hpp

follow_path_behavior header file

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file follow_path_plugin_position.cpp
#include “as2_msgs/msg/yaw_mode.hpp”
#include “std_msgs/msg/header.hpp”
#include <pluginlib/class_list_macros.hpp>

This file contains the implementation of the follow path behavior position plugin.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file follow_path_plugin_trajectory.cpp
#include <geometry_msgs/msg/point.hpp>
#include <std_msgs/msg/header.hpp>
#include <std_srvs/srv/trigger.hpp>
#include “as2_msgs/action/generate_polynomial_trajectory.hpp”
#include “as2_msgs/msg/pose_with_id.hpp”
#include “as2_msgs/msg/yaw_mode.hpp”
#include “rclcpp/rclcpp.hpp”
#include “rclcpp_action/rclcpp_action.hpp”
#include <pluginlib/class_list_macros.hpp>

This file contains the implementation of the go to behavior trajectory plugin.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file follow_path_behavior.cpp
#include “rclcpp_components/register_node_macro.hpp”

follow_path_behavior file

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file follow_path_behavior_main.cpp

Functions

int main(int argc, char *argv[])
file follow_reference_behavior.hpp
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <rclcpp_action/rclcpp_action.hpp>
#include “as2_msgs/action/follow_reference.hpp”
#include “as2_msgs/msg/platform_info.hpp”
#include “as2_msgs/msg/platform_status.hpp”

Follow reference behavior class header file.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Javier Melero Deza Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file follow_reference_behavior.cpp
#include “rclcpp_components/register_node_macro.hpp”

Follow reference behavior file.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Javier Melero Deza Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file follow_reference_behavior_main.cpp

Follow reference behavior node main file.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Javier Melero Deza Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Functions

int main(int argc, char *argv[])
file go_to_base.hpp
#include <Eigen/Dense>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <rclcpp_action/rclcpp_action.hpp>
#include “as2_msgs/action/go_to_waypoint.hpp”
#include “as2_msgs/msg/platform_info.hpp”
#include “as2_msgs/msg/platform_status.hpp”

Base class for go to plugins header.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file go_to_behavior.hpp
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <pluginlib/class_loader.hpp>
#include <rclcpp_action/rclcpp_action.hpp>
#include “as2_msgs/action/go_to_waypoint.hpp”
#include “as2_msgs/msg/platform_info.hpp”
#include “go_to_base.hpp

Go to behavior class header file.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file go_to_plugin_position.cpp
#include <pluginlib/class_list_macros.hpp>

This file contains the implementation of the go to behavior position plugin.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file go_to_plugin_trajectory.cpp
#include <geometry_msgs/msg/point.hpp>
#include <std_msgs/msg/header.hpp>
#include <std_srvs/srv/trigger.hpp>
#include “as2_msgs/action/generate_polynomial_trajectory.hpp”
#include “as2_msgs/msg/pose_with_id.hpp”
#include “as2_msgs/msg/yaw_mode.hpp”
#include “rclcpp/rclcpp.hpp”
#include “rclcpp_action/rclcpp_action.hpp”
#include <pluginlib/class_list_macros.hpp>

This file contains the implementation of the go to behavior trajectory plugin.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file go_to_behavior.cpp
#include “rclcpp_components/register_node_macro.hpp”

Go to behavior file.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file go_to_behavior_main.cpp

Functions

int main(int argc, char *argv[])
file land_base.hpp
#include <Eigen/Dense>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <rclcpp_action/rclcpp_action.hpp>
#include “as2_core/node.hpp
#include “as2_msgs/action/land.hpp”
#include “as2_msgs/msg/platform_info.hpp”
#include “as2_msgs/msg/platform_status.hpp”

Base class for land plugins header.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file land_behavior.hpp
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <pluginlib/class_loader.hpp>
#include <std_srvs/srv/set_bool.hpp>
#include “as2_msgs/action/land.hpp”
#include “as2_msgs/msg/platform_info.hpp”
#include “as2_msgs/srv/set_platform_state_machine_event.hpp”
#include “land_base.hpp
#include “rclcpp/rclcpp.hpp”

Land behavior class header file.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file land_plugin_platform.cpp
#include <chrono>
#include <std_srvs/srv/set_bool.hpp>
#include <pluginlib/class_list_macros.hpp>

This file contains the implementation of the land behavior platform plugin.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file land_plugin_speed.cpp
#include <pluginlib/class_list_macros.hpp>

This file contains the implementation of the land behavior speed plugin.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file land_plugin_trajectory.cpp
#include <geometry_msgs/msg/point.hpp>
#include <std_msgs/msg/header.hpp>
#include <std_srvs/srv/trigger.hpp>
#include “as2_msgs/action/generate_polynomial_trajectory.hpp”
#include “as2_msgs/msg/pose_with_id.hpp”
#include “as2_msgs/msg/yaw_mode.hpp”
#include “rclcpp/rclcpp.hpp”
#include “rclcpp_action/rclcpp_action.hpp”
#include <pluginlib/class_list_macros.hpp>

This file contains the implementation of the land behavior trajectory plugin.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file land_behavior.cpp
#include “rclcpp_components/register_node_macro.hpp”

land_behavior file

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file land_behavior_main.cpp

Functions

int main(int argc, char *argv[])
file takeoff_base.hpp
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <rclcpp_action/rclcpp_action.hpp>
#include “as2_msgs/action/takeoff.hpp”
#include “as2_msgs/msg/platform_info.hpp”
#include “as2_msgs/msg/platform_status.hpp”

Base class for takeoff plugins.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file takeoff_behavior.hpp
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <pluginlib/class_loader.hpp>
#include <rclcpp_action/rclcpp_action.hpp>
#include “as2_msgs/action/takeoff.hpp”
#include “as2_msgs/msg/platform_info.hpp”
#include “as2_msgs/srv/set_platform_state_machine_event.hpp”
#include “takeoff_base.hpp

Takeoff behavior class header file.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file takeoff_plugin_platform.cpp
#include <chrono>
#include <std_srvs/srv/set_bool.hpp>
#include <pluginlib/class_list_macros.hpp>

This file contains the implementation of the take off behavior platform plugin.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file takeoff_plugin_position.cpp
#include <geometry_msgs/msg/point.hpp>
#include <pluginlib/class_list_macros.hpp>
file takeoff_plugin_speed.cpp
#include <pluginlib/class_list_macros.hpp>

This file contains the implementation of the take off behavior speed plugin.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file takeoff_plugin_trajectory.cpp
#include <geometry_msgs/msg/point.hpp>
#include <std_msgs/msg/header.hpp>
#include “as2_msgs/action/generate_polynomial_trajectory.hpp”
#include “as2_msgs/msg/pose_with_id.hpp”
#include “as2_msgs/msg/yaw_mode.hpp”
#include “rclcpp/rclcpp.hpp”
#include “rclcpp_action/rclcpp_action.hpp”
#include <pluginlib/class_list_macros.hpp>
file takeoff_behavior.cpp
#include “rclcpp_components/register_node_macro.hpp”

Takeoff behavior class source file.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file takeoff_behavior_main.cpp

Functions

int main(int argc, char *argv[])
file detect_aruco_markers_behavior.hpp
#include <cv_bridge/cv_bridge.h>
#include <tf2/LinearMath/Quaternion.h>
#include <Eigen/Dense>
#include <memory>
#include <string>
#include <vector>
#include <rclcpp/rclcpp.hpp>
#include “as2_core/node.hpp
#include “as2_core/sensor.hpp
#include “as2_msgs/action/detect_aruco_markers.hpp”
#include “as2_msgs/msg/pose_stamped_with_id.hpp”
#include “sensor_msgs/image_encodings.hpp”
#include “sensor_msgs/msg/image.hpp”
#include <image_transport/image_transport.hpp>
#include <opencv2/aruco.hpp>
#include <opencv2/calib3d.hpp>

Aruco detector header file.

Authors

David Perez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

Functions

std::string targetIds2string(const std::vector<uint16_t> &target_ids)
file detect_aruco_markers_behavior.cpp

Aruco detector implementation file.

Authors

David Perez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

Functions

std::string targetIds2string(const std::vector<uint16_t> &target_ids)
file detect_aruco_markers_behavior_node.cpp
#include <rclcpp/rclcpp.hpp>

Aruco detector node file.

Authors

David Perez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

Functions

int main(int argc, char *argv[])
file point_gimbal_behavior.hpp
#include <string>
#include <memory>
#include <rclcpp/rclcpp.hpp>
#include “as2_core/node.hpp
#include <rclcpp_action/rclcpp_action.hpp>
#include “as2_msgs/action/point_gimbal.hpp”
#include “as2_msgs/msg/gimbal_control.hpp”
#include “geometry_msgs/msg/quaternion_stamped.hpp”
#include “geometry_msgs/msg/vector3.hpp”
#include “geometry_msgs/msg/vector3_stamped.hpp”

Point Gimbal behavior header file.

Authors

Pedro Arias-Perez, Rafael Perez-Segui

Copyright

Copyright (c) 2024 Universidad Politécnica de Madrid All Rights Reserved

file point_gimbal_behavior.cpp

Point Gimbal behavior implementation file.

Authors

Pedro Arias-Perez, Rafael Perez-Segui

Copyright

Copyright (c) 2024 Universidad Politécnica de Madrid All Rights Reserved

file point_gimbal_behavior_node.cpp
#include <rclcpp/rclcpp.hpp>

Point Gimbal node file.

Authors

Pedro Arias-Perez

Copyright

Copyright (c) 2024 Universidad Politécnica de Madrid All Rights Reserved

Functions

int main(int argc, char *argv[])
file set_arming_state_behavior.hpp
#include “as2_msgs/action/set_arming_state.hpp”
#include “std_srvs/srv/set_bool.hpp”
file set_offboard_mode_behavior.hpp
#include “as2_msgs/action/set_offboard_mode.hpp”
#include “std_srvs/srv/set_bool.hpp”
file set_arming_state_behavior_main.cpp
#include <rclcpp/rclcpp.hpp>

Functions

int main(int argc, char **argv)
file set_offboard_mode_behavior_main.cpp
#include <rclcpp/rclcpp.hpp>

Functions

int main(int argc, char **argv)
file generate_polynomial_trajectory_behavior.hpp
#include <tf2/LinearMath/Quaternion.h>
#include <rclcpp/clock.hpp>
#include <rclcpp/rclcpp.hpp>
#include <std_srvs/srv/set_bool.hpp>
#include “as2_core/node.hpp
#include “as2_msgs/action/generate_polynomial_trajectory.hpp”
#include “as2_msgs/srv/set_speed.hpp”
#include “dynamic_trajectory_generator/dynamic_trajectory.hpp”
#include “dynamic_trajectory_generator/dynamic_waypoint.hpp”
#include “as2_msgs/msg/pose_stamped_with_id.hpp”
#include “as2_msgs/msg/pose_with_id.hpp”
#include “as2_msgs/msg/traj_gen_info.hpp”
#include <Eigen/Dense>
#include <geometry_msgs/msg/point.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <nav_msgs/msg/odometry.hpp>
#include <nav_msgs/msg/path.hpp>
#include <std_msgs/msg/float32.hpp>
#include <visualization_msgs/msg/marker.hpp>

Defines

PATH_DEBUG_TOPIC
REF_TRAJ_TOPIC

Functions

void generateDynamicPoint(const as2_msgs::msg::PoseWithID &msg, dynamic_traj_generator::DynamicWaypoint &dynamic_point)

Auxiliar Functions

file generate_polynomial_trajectory_behavior.cpp
#include “rclcpp_components/register_node_macro.hpp”

Functions

void generateDynamicPoint(const as2_msgs::msg::PoseWithID &msg, dynamic_traj_generator::DynamicWaypoint &dynamic_point)

Auxiliar Functions

file generate_polynomial_trajectory_behavior_node.cpp

Functions

int main(int argc, char *argv[])
file aerial_platform.hpp
#include <chrono>
#include <functional>
#include <memory>
#include <string>
#include <vector>
#include “as2_msgs/msg/alert_event.hpp”
#include “as2_msgs/msg/control_mode.hpp”
#include “as2_msgs/msg/platform_info.hpp”
#include “as2_msgs/msg/platform_status.hpp”
#include “as2_msgs/msg/thrust.hpp”
#include “as2_msgs/msg/trajectory_point.hpp”
#include “as2_msgs/srv/list_control_modes.hpp”
#include “as2_msgs/srv/set_control_mode.hpp”
#include “geometry_msgs/msg/pose_stamped.hpp”
#include “geometry_msgs/msg/twist_stamped.hpp”
#include “nav_msgs/msg/odometry.hpp”
#include “as2_core/node.hpp
#include “rclcpp/publisher.hpp”
#include “rclcpp/publisher_options.hpp”
#include “rclcpp/rclcpp.hpp”
#include “std_srvs/srv/set_bool.hpp”
#include “utils/yaml_utils.hpp

Aerostack2 Aerial Platformm class header file.

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

file core_functions.hpp
#include <memory>
#include “as2_core/node.hpp
#include “as2_core/rate.hpp
#include “rclcpp/publisher.hpp”
#include “rclcpp/publisher_options.hpp”
#include “rclcpp/rclcpp.hpp”
#include “rclcpp_lifecycle/lifecycle_node.hpp”

Aerostack2 core functions header file.

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

file actions.hpp
#include <rclcpp/rclcpp.hpp>

This file contains the definition of the actions that can be performed in aerostack2.

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

file services.hpp
#include <rclcpp/rclcpp.hpp>

This file contains the definitions of the services used in aerostack2.

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

file topics.hpp
#include <rclcpp/rclcpp.hpp>
file node.hpp
#include <chrono>
#include <exception>
#include <functional>
#include <memory>
#include <string>
#include <utility>
#include <rclcpp/create_timer.hpp>
#include <rclcpp/timer.hpp>
#include “as2_core/rate.hpp
#include “rclcpp/publisher.hpp”
#include “rclcpp/publisher_options.hpp”
#include “rclcpp/rclcpp.hpp”
#include “rclcpp_lifecycle/lifecycle_node.hpp”

Aerostack2 node header file.

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

Defines

AS2_RCLCPP_NODE
AS2_LIFECYLCE_NODE
AS2_NODE_FATHER
AS2_NODE_FATHER_TYPE
file platform_state_machine.hpp
#include <functional>
#include <string>
#include <vector>
#include <memory>
#include “as2_core/node.hpp
#include “as2_msgs/msg/platform_state_machine_event.hpp”
#include “as2_msgs/msg/platform_status.hpp”
#include “as2_msgs/srv/set_platform_state_machine_event.hpp”

Aerostack2 Platform State Machine Header file.

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

file rate.hpp
#include <chrono>
#include <memory>
#include <thread>
#include “rclcpp/macros.hpp”
#include “rclcpp/utilities.hpp”
#include “rclcpp/visibility_control.hpp”

ROS2 rate class modified to work with the as2_core namespace and add more functionalities.

Authors

Miguel Fernández Cortizas

file sensor.hpp
#include <cv_bridge/cv_bridge.h>
#include <tf2_ros/static_transform_broadcaster.h>
#include <tf2_ros/transform_broadcaster.h>
#include <chrono>
#include <functional>
#include <memory>
#include <string>
#include <opencv2/opencv.hpp>
#include <image_transport/image_transport.hpp>
#include <rclcpp/publisher.hpp>
#include <rclcpp/publisher_options.hpp>
#include <rclcpp/rclcpp.hpp>
#include <sensor_msgs/msg/battery_state.hpp>
#include <sensor_msgs/msg/camera_info.hpp>
#include <sensor_msgs/msg/fluid_pressure.hpp>
#include <sensor_msgs/msg/image.hpp>
#include <sensor_msgs/msg/imu.hpp>
#include <sensor_msgs/msg/laser_scan.hpp>
#include <sensor_msgs/msg/magnetic_field.hpp>
#include <sensor_msgs/msg/nav_sat_fix.hpp>
#include <sensor_msgs/msg/range.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <geometry_msgs/msg/quaternion_stamped.hpp>
#include <nav_msgs/msg/odometry.hpp>
#include “as2_core/custom/tf2_geometry_msgs.hpp”
#include “as2_core/node.hpp

Sensor class for AS2 header file.

Authors

Rafael Pérez Seguí David Pérez Saura Miguel Fernández Cortizas Pedro Arias Pérez

file synchronous_service_client.hpp
#include <memory>
#include <string>
#include “as2_core/node.hpp
#include “rclcpp/rclcpp.hpp”

Class for handling synchronous service clients in ROS2 without taking care about the spin() method.

Authors

Miguel Fernández Cortizas Pedro Arias Pérez

file control_mode_utils.hpp
#include <yaml-cpp/yaml.h>
#include <bitset>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include “as2_msgs/msg/control_mode.hpp”
#include “rclcpp/logging.hpp”

Utility functions for handling control modes over the aerostack2 framework.

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

Defines

MATCH_ALL
MATCH_CONTROL_MODE
MATCH_YAW_MODE
MATCH_REFERENCE_FRAME
UNSET_MODE_MASK
HOVER_MODE_MASK
file frame_utils.hpp
#include <math.h>
#include <Eigen/Geometry>
#include “as2_core/custom/tf2_geometry_msgs.hpp”
#include <geometry_msgs/msg/quaternion.hpp>

Aerostack2 frame utils header file.

Authors

Rafael Pérez Seguí Pedro Arias Pérez

file gps_utils.hpp
#include <string>
#include <GeographicLib/LocalCartesian.hpp>
#include “geographic_msgs/msg/geo_pose_stamped.hpp”
#include “geometry_msgs/msg/pose_stamped.hpp”
#include “sensor_msgs/msg/nav_sat_fix.hpp”
file tf_utils.hpp
#include <tf2/convert.h>
#include <tf2/time.h>
#include <tf2_ros/create_timer_ros.h>
#include <string>
#include <utility>
#include <memory>
#include <geometry_msgs/msg/point_stamped.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/transform_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <geometry_msgs/msg/vector3_stamped.hpp>
#include <nav_msgs/msg/path.hpp>
#include “as2_core/custom/tf2_geometry_msgs.hpp”
#include “as2_core/node.hpp
#include “tf2_ros/buffer.h”
#include “tf2_ros/transform_listener.h”

Tranform utilities library header file.

Authors

David Perez Saura Miguel Fernandez Cortizas Rafael Perez Segui

Defines

TF_TIMEOUT
file yaml_utils.hpp
#include <yaml-cpp/yaml.h>
#include <bitset>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <algorithm>
file _as2_core_pybind11.cpp
#include <pybind11/pybind11.h>

Functions

PYBIND11_MODULE(as2_names, m)
file aerial_platform.cpp

Aerostack2 Aerial Platformm class implementation file.

Authors

Miguel Fernandez Cortizas

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

file core_functions.cpp
#include “core_functions.hpp

Aerostack2 core functions implementation file.

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

file node.cpp
#include “as2_core/node.hpp

Aerostack2 node implementation file.

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

file platform_state_machine.cpp

Aerostack2 Platform State Machine implementation file.

Authors

Miguel Fernandez Cortizas

file rate.cpp
#include “as2_core/rate.hpp

ROS2 rate class modified to work with the as2_core namespace and add more functionalities.

Authors

Miguel Fernández Cortizas

file sensor.cpp
#include “as2_core/sensor.hpp

Sensor class for AS2 implementation file.

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

file control_mode_utils.cpp
#include <rclcpp/logger.hpp>
#include <rclcpp/logging.hpp>

Utility functions for handling control modes over the aerostack2 framework.

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

file frame_utils.cpp

Aerostack2 frame utils functions implementation file.

Authors

Rafael Pérez Seguí Pedro Arias Pérez

file gps_utils.cpp
file tf_utils.cpp

Tranform utilities library implementation file.

Authors

David Perez Saura

file yaml_utils.cpp

Utils for loading YAML files in Aerostack2 implementation.

Authors

Miguel Fernández Cortizas

file as2_realsense_interface.hpp
#include <rclcpp/rclcpp.hpp>
#include “as2_core/node.hpp
#include “as2_core/sensor.hpp
#include <tf2_ros/static_transform_broadcaster.h>
#include <librealsense2/rs.hpp>
#include <geometry_msgs/msg/transform_stamped.hpp>
#include <geometry_msgs/msg/vector3.hpp>
#include “nav_msgs/msg/odometry.hpp”
#include “sensor_msgs/msg/imu.hpp”

Realsense camera interface header file.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

David Perez Saura

Copyright

Copyright (c) 2021 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file as2_realsense_interface.cpp

Realsense camera interface implementation file.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

David Perez Saura

Copyright

Copyright (c) 2021 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file as2_realsense_interface_node.cpp

Functions

int main(int argc, char *argv[])
file as2_usb_camera_interface.hpp
#include <rclcpp/rclcpp.hpp>
#include “as2_core/node.hpp
#include “as2_core/sensor.hpp
#include <tf2/LinearMath/Quaternion.h>
#include “sensor_msgs/image_encodings.hpp”
#include “sensor_msgs/msg/image.hpp”
#include <cv_bridge/cv_bridge.h>
#include <image_transport/image_transport.hpp>
#include <memory>
#include <opencv2/calib3d.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/opencv.hpp>
#include <vector>
file as2_usb_camera_interface.cpp
file as2_usb_camera_interface_node.cpp

Functions

int main(int argc, char *argv[])
file controller_base.hpp
#include <string>
#include <vector>
#include <rclcpp/rclcpp.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include “as2_core/node.hpp
#include “as2_msgs/msg/control_mode.hpp”
#include “as2_msgs/msg/thrust.hpp”
#include “as2_msgs/msg/trajectory_point.hpp”

Declares the as2_motion_controller_plugin_base class which is the base class for all controller plugins.

Authors

Miguel Fernández Cortizas Rafael Pérez Seguí

file controller_handler.hpp
#include <rcl/time.h>
#include <tf2/time.h>
#include <message_filters/subscriber.h>
#include <message_filters/sync_policies/approximate_time.h>
#include <message_filters/time_synchronizer.h>
#include <memory>
#include <algorithm>
#include <chrono>
#include <cstdint>
#include <fstream>
#include <vector>
#include <string>
#include <rclcpp/clock.hpp>
#include <rclcpp/logging.hpp>
#include <rclcpp/rate.hpp>
#include <rclcpp/service.hpp>
#include <rclcpp/timer.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include “as2_core/node.hpp
#include “as2_msgs/msg/control_mode.hpp”
#include “as2_msgs/msg/platform_info.hpp”
#include “as2_msgs/msg/thrust.hpp”
#include “as2_msgs/msg/trajectory_point.hpp”
#include “as2_msgs/srv/list_control_modes.hpp”
#include “as2_msgs/srv/set_control_mode.hpp”
#include “controller_base.hpp

Controller handler class definition.

Authors

Miguel Fernández Cortizas Rafael Pérez Seguí

Defines

MATCH_ALL
MATCH_MODE_AND_FRAME
MATCH_MODE
MATCH_MODE_AND_YAW
UNSET_MODE_MASK
HOVER_MODE_MASK
file controller_manager.hpp
#include <memory>
#include <chrono>
#include <filesystem>
#include <pluginlib/class_loader.hpp>
#include <rclcpp/logging.hpp>
#include “as2_core/node.hpp
#include “as2_msgs/msg/controller_info.hpp”
#include “controller_handler.hpp

Controller manager class definition.

Authors

Miguel Fernández Cortizas Rafael Pérez Seguí

file differential_flatness_controller.hpp
#include <Eigen/Dense>
#include <Eigen/Geometry>
#include <vector>
#include <string>
#include <rclcpp/logging.hpp>
#include <rclcpp/rclcpp.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include “as2_msgs/msg/thrust.hpp”
#include “as2_msgs/msg/trajectory_point.hpp”

Declares the controller plugin differential flatness.

Authors

Miguel Fernández Cortizas Rafael Pérez Seguí

file differential_flatness_controller.cpp
#include <pluginlib/class_list_macros.hpp>

Differential flatness controller plugin for the Aerostack framework.

Authors

Miguel Fernández Cortizas Rafael Pérez Seguí

file pid_speed_controller.hpp
#include <chrono>
#include <string>
#include <vector>
#include <memory>
#include <rclcpp/logging.hpp>
#include <rclcpp/rclcpp.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include “as2_msgs/msg/thrust.hpp”
#include “as2_msgs/msg/trajectory_point.hpp”
#include “pid_controller/pid.hpp”
#include “pid_controller/pid_1d.hpp”
file pid_speed_controller.cpp
#include “pid_speed_controller.hpp
#include <pluginlib/class_list_macros.hpp>
file controller_handler.cpp

Controller handler class implementation.

Authors

Miguel Fernández Cortizas Rafael Pérez Seguí

file controller_manager.cpp

Controller manager class implementation.

Authors

Miguel Fernández Cortizas Rafael Pérez Seguí

file controller_manager_node.cpp

Controller manager node main file.

Authors

Miguel Fernández Cortizas Rafael Pérez Seguí

Functions

int main(int argc, char *argv[])
file basic_motion_references.hpp
#include <as2_msgs/msg/control_mode.hpp>
#include <as2_msgs/msg/controller_info.hpp>
#include <functional>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <memory>
#include <string>
#include <thread>
#include “as2_core/node.hpp
#include “as2_msgs/msg/trajectory_point.hpp”
#include “as2_msgs/srv/set_control_mode.hpp”
#include “rclcpp/rclcpp.hpp”

Virtual class for basic motion references headers.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file hover_motion.hpp
#include <functional>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <memory>
#include <thread>
#include “as2_core/node.hpp

This file contains the definition of the HoverMotion class.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file position_motion.hpp
#include <functional>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <memory>
#include <thread>
#include “as2_core/node.hpp

This file contains the definition of the SpeedMotion class.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file speed_in_a_plane_motion.hpp
#include <functional>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <memory>
#include <thread>
#include “as2_core/node.hpp

This file contains the definition of the SpeedInAPlaneMotion class.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file speed_motion.hpp
#include <functional>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <memory>
#include <thread>
#include “as2_core/node.hpp

This file contains the definition of the SpeedMotion class.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file trajectory_motion.hpp
#include <Eigen/Dense>
#include “as2_core/node.hpp

this file contains the implementation of the TrajectoryMotion class

this file contains the definition of the TrajectoryMotion class

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file basic_motion_references.cpp

Virtual class for basic motion references implementations.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file hover_motion.cpp

This file contains the implementation of the HoverMotion class.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file position_motion.cpp

This file contains the implementation of the take off behavior position plugin.

This file contains the implementation of the PositionMotion class.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Rafael Pérez Seguí Pedro Arias Pérez Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file speed_in_a_plane_motion.cpp

This file contains the implementation of the SpeedInAPlaneMotion class.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file speed_motion.cpp

This file contains the implementation of the SpeedMotion class.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas Pedro Arias Pérez David Pérez Saura Rafael Pérez Seguí

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file trajectory_motion.cpp
file SuctionGripper.cc
#include <gz/plugin/Register.hh>
#include <gz/transport/Node.hh>
#include <gz/msgs/contacts.pb.h>
#include <gz/msgs.hh>
#include <gz/gazebo/components.hh>
#include <gz/gazebo/Model.hh>
#include “SuctionGripper.hh
file SuctionGripper.hh
#include <memory>
#include <gz/gazebo/System.hh>
file azimuth_bridge.cpp
#include <iostream>
#include <memory>
#include <string>
#include <math.h>
#include “rclcpp/publisher.hpp”
#include “rclcpp/rclcpp.hpp”
#include <gz/msgs.hh>
#include <gz/transport.hh>
#include <ros_gz_bridge/convert.hpp>
#include <std_msgs/msg/float32.hpp>

Functions

int main(int argc, char *argv[])
file gimbal_bridge.cpp
#include <iostream>
#include <memory>
#include <string>
#include <math.h>
#include <gz/msgs.hh>
#include <gz/transport.hh>
#include <rclcpp/clock.hpp>
#include <ros_gz_bridge/convert.hpp>
#include “as2_msgs/msg/gimbal_control.hpp”
#include “rclcpp/publisher.hpp”
#include “rclcpp/rclcpp.hpp”

Functions

int main(int argc, char *argv[])
file gps_bridge.cpp
#include <iostream>
#include <memory>
#include <string>
#include <gz/msgs.hh>
#include <gz/transport.hh>
#include <ros_gz_bridge/convert.hpp>
#include “rclcpp/rclcpp.hpp”
#include “sensor_msgs/msg/nav_sat_fix.hpp”

Ignition bridge gps implementation file.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Rafael Pérez Seguí Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Functions

int main(int argc, char *argv[])
file ground_truth_bridge.cpp
#include <iostream>
#include <memory>
#include <string>
#include “rclcpp/publisher.hpp”
#include “rclcpp/rclcpp.hpp”
#include “geometry_msgs/msg/pose_stamped.hpp”
#include “geometry_msgs/msg/twist_stamped.hpp”
#include <gz/msgs.hh>
#include <gz/transport.hh>
#include <ros_gz_bridge/convert.hpp>

Ignition bridge ground truth implementation file.

Gazebo bridge ground truth implementation file.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Javier Melero Deza Pedro Arias Pérez

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Pedro Arias Pérez Rafael Pérez Seguí Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Functions

int main(int argc, char *argv[])
file object_tf_broadcaster.cpp
#include <geometry_msgs/msg/transform_stamped.hpp>
#include <geometry_msgs/msg/transform_stamped.h>
#include <tf2_msgs/msg/tf_message.h>
#include <tf2_ros/static_transform_broadcaster.h>
#include <tf2_ros/transform_broadcaster.h>
#include <gz/msgs.hh>
#include <gz/transport.hh>
#include <rclcpp/clock.hpp>
#include <rclcpp/rclcpp.hpp>
#include <ros_gz_bridge/convert.hpp>
#include <iostream>
#include <memory>
#include <string>

Ignition bridge tf broadcaster implementation file.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Javier Melero Deza Pedro Arias Pérez Rafael Pérez Seguí Miguel Fernández Cortizas David Pérez Saura

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Functions

int main(int argc, char *argv[])
file plugin_base.hpp
#include <tf2_ros/buffer.h>
#include <tf2_ros/buffer_interface.h>
#include <tf2_ros/static_transform_broadcaster.h>
#include <tf2_ros/transform_broadcaster.h>
#include <as2_core/node.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <nav_msgs/msg/odometry.hpp>
#include <rclcpp/rclcpp.hpp>
#include <rclcpp/subscription_base.hpp>

An state estimation plugin base for AeroStack2.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí Pedro Arias Pérez

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file state_estimator.hpp
#include <tf2_ros/buffer.h>
#include <tf2_ros/static_transform_broadcaster.h>
#include <tf2_ros/transform_broadcaster.h>
#include <tf2_ros/transform_listener.h>
#include <filesystem>
#include <pluginlib/class_loader.hpp>
#include “plugin_base.hpp
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <rclcpp/rclcpp.hpp>
#include “as2_core/node.hpp
#include “nav_msgs/msg/odometry.hpp”

An state estimation server for AeroStack2.

An state estimation implementation for AeroStack2.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí Pedro Arias Pérez

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file ground_truth.hpp
#include <as2_msgs/srv/get_origin.hpp>
#include <as2_msgs/srv/set_origin.hpp>
#include <geographic_msgs/msg/geo_point.hpp>
#include <regex>

An state estimation plugin ground truth for AeroStack2.

An state estimation plugin ground truth implementation for AeroStack2.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí Pedro Arias Pérez

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file ground_truth.cpp
#include “ground_truth.hpp
#include <pluginlib/class_list_macros.hpp>
file mocap_pose.hpp
#include <tf2/LinearMath/Quaternion.h>
#include <tf2/LinearMath/Vector3.h>
#include <mocap4r2_msgs/msg/rigid_bodies.hpp>
#include <rclcpp/duration.hpp>

An state estimation plugin mocap_pose for AeroStack2.

An state estimation plugin mocap_pose implementation for AeroStack2.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí Pedro Arias Pérez

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file mocap_pose.cpp
#include “mocap_pose.hpp
#include <pluginlib/class_list_macros.hpp>
file raw_odometry.hpp
#include <as2_msgs/srv/get_origin.hpp>
#include <as2_msgs/srv/set_origin.hpp>
#include <geographic_msgs/msg/geo_point.hpp>
#include “geometry_msgs/msg/transform_stamped.hpp”

An state estimation plugin external odom for AeroStack2.

An state estimation plugin external odom implementation for AeroStack2.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Authors

Miguel Fernández Cortizas David Pérez Saura Rafael Pérez Seguí Pedro Arias Pérez

Copyright

Copyright (c) 2022 Universidad Politécnica de Madrid All Rights Reserved

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file raw_odometry.cpp
#include “raw_odometry.hpp
#include <pluginlib/class_list_macros.hpp>
file state_estimator.cpp
file state_estimator_node.cpp
#include <rclcpp/executors.hpp>
#include <rclcpp/rclcpp.hpp>

Functions

int main(int argc, char **argv)
file alphanumeric_viewer.hpp
#include <curses.h>
#include <math.h>
#include <stdio.h>
#include <tf2/utils.h>
#include <iostream>
#include <sstream>
#include <string>
#include <rclcpp/rclcpp.hpp>
#include “as2_core/node.hpp
#include “as2_msgs/msg/controller_info.hpp”
#include “as2_msgs/msg/platform_info.hpp”
#include “as2_msgs/msg/thrust.hpp”
#include “geometry_msgs/msg/pose_stamped.hpp”
#include “geometry_msgs/msg/twist_stamped.hpp”
#include “sensor_msgs/msg/battery_state.hpp”
#include “sensor_msgs/msg/imu.hpp”
#include “sensor_msgs/msg/nav_sat_fix.hpp”
#include “sensor_msgs/msg/temperature.hpp”

Defines

ASCII_KEY_UP
ASCII_KEY_DOWN
ASCII_KEY_RIGHT
ASCII_KEY_LEFT
file alphanumeric_viewer.cpp
#include “alphanumeric_viewer.hpp

Typedefs

using CallbackReturn = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
file alphanumeric_viewer_node.cpp
#include “alphanumeric_viewer.hpp

Functions

int main(int argc, char *argv[])
file README.md
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behavior/include/as2_behavior/__detail
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behavior/include/as2_behavior/__impl
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behavior_tree/plugins/action
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behavior_tree/include/as2_behavior_tree/action
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_aerial_platforms
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_user_interfaces/as2_alphanumeric_viewer/include/as2_alphanumeric_viewer
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_user_interfaces/as2_alphanumeric_viewer
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behavior
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behavior/include/as2_behavior
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behavior_tree
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behavior_tree/include/as2_behavior_tree
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_perception
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_platform/include/as2_behaviors_platform
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_platform
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_trajectory_generation
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_core/include/as2_core
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_core
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_simulation_assets/as2_gazebo_assets
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_hardware_drivers
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_motion_controller
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_motion_controller/include/as2_motion_controller
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_motion_reference_handlers
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_motion_reference_handlers/include/as2_motion_reference_handlers
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_aerial_platforms/as2_platform_gazebo
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_aerial_platforms/as2_platform_gazebo/include/as2_platform_gazebo
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_aerial_platforms/as2_platform_multirotor_simulator
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_aerial_platforms/as2_platform_multirotor_simulator/include/as2_platform_multirotor_simulator
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_hardware_drivers/as2_realsense_interface
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_hardware_drivers/as2_realsense_interface/include/as2_realsense_interface
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_simulation_assets
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_state_estimator/include/as2_state_estimator
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_state_estimator
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_hardware_drivers/as2_usb_camera_interface
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_hardware_drivers/as2_usb_camera_interface/include/as2_usb_camera_interface
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_user_interfaces
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behavior_tree/plugins/condition
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behavior_tree/include/as2_behavior_tree/condition
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behavior_tree/plugins/decorator
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behavior_tree/include/as2_behavior_tree/decorator
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_perception/detect_aruco_markers_behavior/include/detect_aruco_markers_behavior
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_perception/detect_aruco_markers_behavior
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_motion_controller/plugins/differential_flatness_controller
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_motion_controller/plugins/differential_flatness_controller/include/differential_flatness_controller
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/follow_path_behavior/include/follow_path_behavior
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/follow_path_behavior
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/follow_reference_behavior/include/follow_reference_behavior
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/follow_reference_behavior
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_trajectory_generation/generate_polynomial_trajectory_behavior/include/generate_polynomial_trajectory_behavior
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_trajectory_generation/generate_polynomial_trajectory_behavior
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/go_to_behavior
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/go_to_behavior/include/go_to_behavior
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_state_estimator/plugins/ground_truth
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_motion_controller/plugins/differential_flatness_controller/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_perception/point_gimbal_behavior/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_trajectory_generation/generate_polynomial_trajectory_behavior/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_platform/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_motion_controller/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_motion_reference_handlers/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_motion_controller/plugins/pid_speed_controller/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_hardware_drivers/as2_usb_camera_interface/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_hardware_drivers/as2_realsense_interface/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_perception/detect_aruco_markers_behavior/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behavior_tree/test/node_emulators/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_state_estimator/plugins/raw_odometry/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behavior/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_core/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_state_estimator/plugins/mocap_pose/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/follow_path_behavior/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behavior_tree/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/follow_reference_behavior/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_state_estimator/plugins/ground_truth/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/go_to_behavior/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_user_interfaces/as2_alphanumeric_viewer/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/land_behavior/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_aerial_platforms/as2_platform_multirotor_simulator/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/takeoff_behavior/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_state_estimator/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_aerial_platforms/as2_platform_gazebo/include
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/land_behavior
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/land_behavior/include/land_behavior
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_state_estimator/plugins/mocap_pose
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_core/include/as2_core/names
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behavior_tree/test/node_emulators/include/node_emulators
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behavior_tree/test/node_emulators
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_motion_controller/plugins/pid_speed_controller/include/pid_speed_controller
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_motion_controller/plugins/pid_speed_controller
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_motion_controller/plugins
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_simulation_assets/as2_gazebo_assets/plugins
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behavior_tree/plugins
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/follow_path_behavior/plugins
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/go_to_behavior/plugins
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/land_behavior/plugins
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_state_estimator/plugins
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/takeoff_behavior/plugins
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_perception/point_gimbal_behavior
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_perception/point_gimbal_behavior/include/point_gimbal_behavior
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_state_estimator/plugins/raw_odometry
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/land_behavior/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_motion_controller/plugins/differential_flatness_controller/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/go_to_behavior/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/follow_reference_behavior/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_state_estimator/plugins/ground_truth/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/follow_path_behavior/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behavior/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_state_estimator/plugins/mocap_pose/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behavior_tree/test/node_emulators/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_state_estimator/plugins/raw_odometry/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_state_estimator/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behavior_tree/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_aerial_platforms/as2_platform_multirotor_simulator/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_aerial_platforms/as2_platform_gazebo/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_user_interfaces/as2_alphanumeric_viewer/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_trajectory_generation/generate_polynomial_trajectory_behavior/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_hardware_drivers/as2_usb_camera_interface/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_hardware_drivers/as2_realsense_interface/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_core/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_motion_controller/plugins/pid_speed_controller/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_motion_controller/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_platform/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_motion_reference_handlers/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_perception/point_gimbal_behavior/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_perception/detect_aruco_markers_behavior/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_simulation_assets/as2_gazebo_assets/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/takeoff_behavior/src
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/takeoff_behavior
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behaviors/as2_behaviors_motion/takeoff_behavior/include/takeoff_behavior
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_behavior_tree/test
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_core/include/as2_core/utils
dir /__w/aerostack2.github.io/aerostack2.github.io/main/docs/_09_development/_api_documentation/aerostack2/as2_core/src/utils
page index

Aerostack2

Aerostack2 is a ROS 2 framework developed to create autonomous multi-aerial-robots systems in an easy and powerful way.

https://github.com/aerostack2/aerostack2/actions/workflows/build-humble.yaml/badge.svg

Currently is currently developed and tested over ROS 2 humble (over Ubuntu 22.04)

Versions below 1.0.9 were also developed and tested over ROS 2 galactic (over Ubuntu 20.04), can be found in the branch EOL/galactic.

We also have docker images with Aerostack2 preinstalled in ROS 2 Humble, check it out at Aerostack2 Dockerhub.

Most important features:

  • Natively developed on ROS 2

  • Complete modularity, allowing elements to be changed or interchanged without affecting the rest of the system

  • Independence of the aerial platform. Easy Sim2Real deployment.

  • Project-oriented, allowing to install and use only the necessary packages for the application to be developed.

  • Swarming orientation.

Please visit the [Aerostack2 Documentation] for a complete documentation.

Installation instructions can be found [here].

https://user-images.githubusercontent.com/35956525/231999883-e491aa08-2835-47a9-9c68-5b2936e8594e.mp4

Credits

If you use the code in the academic context, please cite: