9 #ifndef PLANNING_LOGIC_HPP 10 #define PLANNING_LOGIC_HPP 12 #include <nav_msgs/Path.h> 13 #include <nav_msgs/Odometry.h> 14 #include <geometry_msgs/PoseStamped.h> 15 #include <geometry_msgs/Pose.h> 17 #include <eigen3/Eigen/Dense> 77 void load_path(std::string file_name,
float resolution, nav_msgs::Path &path);
94 const std::vector<geometry_msgs::PoseStamped> &path,
95 const geometry_msgs::Pose &pose
Base class for a node managing high level planning logic.
void load_transition_pts(std::string file_name)
Loads the points delimiting the transitions.
bool transition_pts_loaded_
Whether the transition points have been loaded.
nav_msgs::Odometry odom_
Odometry of the robot.
std::vector< Eigen::Vector3f > transition_pts_
Points marking start and end of transition paths.
ros::ServiceClient enable_planner_client_
Client for enabling the path planner.
ros::Subscriber odom_sub_
Subscriber for robot's odometry.
void run_node()
Runs the node.
void odom_cb(const nav_msgs::Odometry msg)
Callback for the odometry.
void init_node()
Initialises the node and its parameters.
void load_path(std::string file_name, float resolution, nav_msgs::Path &path)
Loads a path from a text file.
ros::Publisher path_pub_
Publisher for a path.
bool transition_
Whether the robot is following a transition path.
ros::ServiceClient disable_planner_client_
Client for disabling the path planner.
bool odom_received_
Whether the odometry has been received.
ros::NodeHandle nh_
Node handler.
geometry_msgs::Pose find_closest(const std::vector< geometry_msgs::PoseStamped > &path, const geometry_msgs::Pose &pose)
Finds the closest pose in a path.
bool path_loaded_
Whether the path was loaded with success.
nav_msgs::Path path_
Path to publish.