Class WaypointTaskExecutor

Class Documentation

class WaypointTaskExecutor

Base class for creating a plugin in order to perform a specific task at waypoint arrivals.

Public Functions

inline WaypointTaskExecutor()

Construct a new Simple Task Execution At Waypoint Base object.

inline virtual ~WaypointTaskExecutor()

Destroy the Simple Task Execution At Waypoint Base object.

virtual void initialize(const rclcpp_lifecycle::LifecycleNode::WeakPtr &parent, const std::string &plugin_name) = 0

Override this to setup your pub, sub or any ros services that you will use in the plugin.

Parameters:
  • parent – parent node that plugin will be created within(for an example see nav_waypoint_follower)

  • plugin_name – plugin name comes from parameters in yaml file

virtual bool processAtWaypoint(const geometry_msgs::msg::PoseStamped &curr_pose, const int &curr_waypoint_index) = 0

Override this to define the body of your task that you would like to execute once the robot arrived to waypoint.

Parameters:
  • curr_pose – current pose of the robot

  • curr_waypoint_index – current waypoint, that robot just arrived

Returns:

true if task execution was successful

Returns:

false if task execution failed