Corentin Chauvin-Hameau – 2019-2020
Coverage Path Planning for an underwater robot surveying a marine farm
Public Member Functions | Private Member Functions | Private Attributes | List of all members
mfcpp::TrajPublisherNode Class Reference

Class to publish hard-coded trajectories. More...

#include <traj_publisher.hpp>

Public Member Functions

 TrajPublisherNode ()
 
 ~TrajPublisherNode ()
 
void run_node ()
 Runs the node. More...
 

Private Member Functions

void init_node ()
 Initialises the node and its parameters. More...
 
void load_path (std::string file_name, float resolution, nav_msgs::Path &path)
 Loads a path from a text file. More...
 

Private Attributes

ros::NodeHandle nh_
 Node handler. More...
 
ros::Publisher path_pub_
 Publisher for a path. More...
 
nav_msgs::Path path_
 Path to publish. More...
 
bool path_loaded_
 Whether the path was loaded with success. More...
 
ROS parameters
float path_freq_
 

Detailed Description

Class to publish hard-coded trajectories.

Definition at line 25 of file traj_publisher.hpp.

Constructor & Destructor Documentation

mfcpp::TrajPublisherNode::TrajPublisherNode ( )

Definition at line 33 of file traj_publisher.cpp.

mfcpp::TrajPublisherNode::~TrajPublisherNode ( )

Definition at line 40 of file traj_publisher.cpp.

Member Function Documentation

void mfcpp::TrajPublisherNode::init_node ( )
private

Initialises the node and its parameters.

Definition at line 46 of file traj_publisher.cpp.

void mfcpp::TrajPublisherNode::load_path ( std::string  file_name,
float  resolution,
nav_msgs::Path &  path 
)
private

Loads a path from a text file.

The text file contains waypoints that are then interpolated by a spline.

Parameters
[in]file_nameRelative path of the file containing the waypoints
[in]resolutionSpatial resolution of the path
[out]pathLoaded path

Definition at line 86 of file traj_publisher.cpp.

void mfcpp::TrajPublisherNode::run_node ( )

Runs the node.

Definition at line 69 of file traj_publisher.cpp.

Member Data Documentation

ros::NodeHandle mfcpp::TrajPublisherNode::nh_
private

Node handler.

Definition at line 37 of file traj_publisher.hpp.

nav_msgs::Path mfcpp::TrajPublisherNode::path_
private

Path to publish.

Definition at line 39 of file traj_publisher.hpp.

float mfcpp::TrajPublisherNode::path_freq_
private

Publishing frequency of the path

Definition at line 44 of file traj_publisher.hpp.

bool mfcpp::TrajPublisherNode::path_loaded_
private

Whether the path was loaded with success.

Definition at line 40 of file traj_publisher.hpp.

ros::Publisher mfcpp::TrajPublisherNode::path_pub_
private

Publisher for a path.

Definition at line 38 of file traj_publisher.hpp.


The documentation for this class was generated from the following files: