|
MFCPP
1.0
|
Corentin Chauvin-Hameau – 2019-2020
|
|
Coverage Path Planning for an underwater robot surveying a marine farm
|
|
Nodelet class for farm simulation. More...
#include <farm_nodelet.hpp>


Public Member Functions | |
| FarmNodelet () | |
| ~FarmNodelet () | |
| virtual void | onInit () |
| Function called at beginning of nodelet execution. More... | |
Private Member Functions | |
| void | main_cb (const ros::TimerEvent &timer_event) |
| Main callback which is called by a timer. More... | |
| void | reconfigure_cb (mf_farm_simulator::FarmSimulatorConfig &config, uint32_t level) |
| Callback for dynamic reconfigure. More... | |
| void | pub_algae () |
| Publishes the position and heatmap of the algae. More... | |
Initialisation functions | |
| void | init_cb (const ros::TimerEvent &timer_event) |
| Callback for the oneshot initialisation timer. More... | |
| void | init_algae_lines () |
| Initialise the algae lines. More... | |
| template<class T > | |
| T | rand_gaussian (T mu, T sigma) |
| Draw a random number from a Gaussian distribution. More... | |
| template<class T > | |
| T | rand_uniform (T a, T b) |
| Draw a random number from a uniform distribution. More... | |
| bool | rand_bernoulli (double p) |
| Draw a random number from a bernoulli distribution. More... | |
| void | init_anchors (AlgaeLine &line, unsigned int i) |
| Init anchors of a specific algae line. More... | |
| void | init_ropes (AlgaeLine &line) |
| Init ropes of an algae line. More... | |
| void | init_algae (AlgaeLine &line) |
| Init algae of an algae line. More... | |
Visualisation functions | |
| void | pub_rviz_markers (float duration) const |
| Displays objects by publishing Rviz markers. More... | |
| void | pop_buoys_marker (visualization_msgs::Marker &marker, MarkerArgs args) const |
| Populates a marker for displaying the buoys. More... | |
| void | pop_ropes_marker (visualization_msgs::Marker &marker, MarkerArgs args) const |
| Populates a marker for displaying the ropes. More... | |
| void | pop_algae_marker (visualization_msgs::Marker &marker, MarkerArgs args) const |
| Populates a marker for displaying the algae. More... | |
| void | pop_algae_heatmaps (visualization_msgs::Marker &marker, MarkerArgs args) const |
| Populates a marker for displaying the disease heatmaps. More... | |
| void | pop_img_marker (visualization_msgs::Marker &marker, std::vector< std::vector< float >> img, const std::vector< tf2::Vector3 > &coord) const |
| Populates a triangle marker for displaying images. More... | |
Static Private Member Functions | |
| static void | sigint_handler (int s) |
| SINGINT (Ctrl+C) callback to stop the nodelet properly. More... | |
Private Attributes | |
| ros::NodeHandle | nh_ |
| Node handler (for topics and services) More... | |
| ros::NodeHandle | private_nh_ |
| Private node handler (for parameters) More... | |
| dynamic_reconfigure::Server< mf_farm_simulator::FarmSimulatorConfig > | reconf_srv_ |
| Dynamic reconfigure server. More... | |
| ros::Publisher | rviz_pub_ |
| ROS publisher for Rviz. More... | |
| ros::Publisher | algae_pub_ |
| ROS publisher for the algae. More... | |
| std::vector< AlgaeLine > | algae_lines_ |
| Vector of all the algae in the farm. More... | |
| bool | reconfigure_initialised_ |
| Whether the dynamic reconfigure callback has been called once. More... | |
| bool | init_done_ |
| Whether the farm initialisation has been done. More... | |
| std::random_device | random_device_ |
| Seed initialiser for random number generation. More... | |
| std::mt19937 | random_generator_ |
| Random number initialiser. More... | |
| PerlinNoiseGenerator | perlin_ |
| For randomising the heatmaps. More... | |
ROS parameters | |
| float | main_loop_freq_ |
| Frequency of the main loop. More... | |
| int | random_seed_ |
| Seed for random numbers (0 for random seed) More... | |
| int | nbr_lines_ |
| Number of algae lines. More... | |
| float | offset_lines_ |
| Lateral distance (m) between each line. More... | |
| float | length_lines_ |
| Length (m) of each line. More... | |
| float | thickness_ropes_ |
| Diameter (m) of each line. More... | |
| float | depth_lines_ |
| Distance (m) between water surface and line. More... | |
| float | depth_water_ |
| Distance (m) between water surface and seafloor. More... | |
| float | anchors_diameter_ |
| Diameter (m) of the cylindrical anchors. More... | |
| float | anchors_height_ |
| Height (m) of the cylindrical anchors. More... | |
| int | nbr_buoys_ |
| Number of buoys on each floating rope. More... | |
| float | buoys_diameter_ |
| Diameter (m) of each buoy. More... | |
| bool | randomise_lines_ |
| Whether to randomise the position of each line. More... | |
| float | alga_miss_rate_ |
| Probability to have a missing alga. More... | |
| float | phi_lines_ |
| Mean of phi angle for algae line generation. More... | |
| float | theta_lines_ |
| Mean of theta angle for algae line generation. More... | |
| float | bnd_phi_lines_ |
| Bound such that phi is sampled in [mean-bnd, mean+bnd]. More... | |
| float | bnd_theta_lines_ |
| Bound such that theta is sampled in [mean-bnd, mean+bnd]. More... | |
| float | bnd_gamma_lines_ |
| Bound such that gamma is sampled in [mean-bnd, mean+bnd]. More... | |
| bool | randomise_algae_ |
| Whether to randomise size and orientation of algae. More... | |
| int | nbr_algae_ |
| Number of algae per line. More... | |
| float | width_algae_ |
| Mean of the width of an alga. More... | |
| float | length_algae_ |
| Mean of the length of an alga. More... | |
| float | thickness_algae_ |
| Thickness of an alga (for collision detection) More... | |
| float | psi_algae_ |
| Mean of the algae orientation. More... | |
| float | std_width_algae_ |
| Standard deviation on algae width. More... | |
| float | std_length_algae_ |
| Standard deviation on algae length. More... | |
| float | std_psi_algae_ |
| Standard deviation on algae orientation. More... | |
| bool | disp_disease_ |
| Whether to display the disease heatmaps. More... | |
| float | disease_ratio_ |
| Ratio of alga disease (0->fully sane, 1->fully sick) More... | |
| int | height_disease_heatmap_ |
| Height of the algae disease heatmap. More... | |
| int | width_disease_heatmap_ |
| Width of the algae disease heatmap. More... | |
| int | height_grid_heatmap_ |
| Height of the grid for perlin noise generation. More... | |
| int | width_grid_heatmap_ |
Static Private Attributes | |
| static sig_atomic_t volatile | b_sigint_ = 0 |
| Whether SIGINT signal has been received. More... | |
| static ros::Timer | init_timer_ = ros::Timer() |
| Timer callback for the init function. More... | |
| static ros::Timer | main_timer_ = ros::Timer() |
| Timer callback for the main function. More... | |
Nodelet class for farm simulation.
Definition at line 31 of file farm_nodelet.hpp.
| mfcpp::FarmNodelet::FarmNodelet | ( | ) |
Definition at line 45 of file farm_nodelet.cpp.
| mfcpp::FarmNodelet::~FarmNodelet | ( | ) |
Definition at line 46 of file farm_nodelet.cpp.
|
private |
Init algae of an algae line.
| line | Concerned algae line |
Definition at line 91 of file farm_initialisation.cpp.
|
private |
Initialise the algae lines.
Definition at line 178 of file farm_nodelet.cpp.
|
private |
Init anchors of a specific algae line.
| line | Concerned algae line |
| i | Index of the algae line |
Definition at line 19 of file farm_initialisation.cpp.
|
private |
Callback for the oneshot initialisation timer.
| timer_event | Timer event information |
Definition at line 171 of file farm_nodelet.cpp.
|
private |
Init ropes of an algae line.
| line | Concerned algae line |
Definition at line 34 of file farm_initialisation.cpp.
|
private |
Main callback which is called by a timer.
| timer_event | Timer event information |
Definition at line 132 of file farm_nodelet.cpp.
|
virtual |
Function called at beginning of nodelet execution.
Definition at line 48 of file farm_nodelet.cpp.
|
private |
Populates a marker for displaying the disease heatmaps.
| marker | Marker to populate |
| args | Common arguments to fill ROS message |
Definition at line 193 of file farm_output.cpp.
|
private |
Populates a marker for displaying the algae.
| marker | Marker to populate |
| args | Common arguments to fill ROS message |
Definition at line 141 of file farm_output.cpp.
|
private |
Populates a marker for displaying the buoys.
| marker | Marker to populate |
| args | Common arguments to fill ROS message |
Definition at line 84 of file farm_output.cpp.
|
private |
Populates a triangle marker for displaying images.
coord[3] | coord[2]
| marker | Marker to populate |
| img | Black and white image to add to the marker |
| coord | Four 3D coordinates of the corners of the image |
Definition at line 232 of file farm_output.cpp.
|
private |
Populates a marker for displaying the ropes.
| marker | Marker to populate |
| args | Common arguments to fill ROS message |
Definition at line 105 of file farm_output.cpp.
|
private |
Publishes the position and heatmap of the algae.
Definition at line 281 of file farm_output.cpp.
|
private |
Displays objects by publishing Rviz markers.
| duration | Duration of the marker (in sec) |
Definition at line 23 of file farm_output.cpp.
|
inlineprivate |
Draw a random number from a bernoulli distribution.
| p | Probability to get true |
Definition at line 284 of file farm_nodelet.hpp.
|
inlineprivate |
Draw a random number from a Gaussian distribution.
| mu | Mean of the distribution |
| sigma | Standard deviation of the distribution |
Definition at line 269 of file farm_nodelet.hpp.
|
inlineprivate |
Draw a random number from a uniform distribution.
| a | Lower bound |
| b | Upper bound |
Definition at line 277 of file farm_nodelet.hpp.
|
private |
Callback for dynamic reconfigure.
| New | configuration |
| Change | level |
Definition at line 153 of file farm_nodelet.cpp.
|
staticprivate |
SINGINT (Ctrl+C) callback to stop the nodelet properly.
Definition at line 144 of file farm_nodelet.cpp.
|
private |
Probability to have a missing alga.
Definition at line 78 of file farm_nodelet.hpp.
|
private |
Vector of all the algae in the farm.
Definition at line 54 of file farm_nodelet.hpp.
|
private |
ROS publisher for the algae.
Definition at line 53 of file farm_nodelet.hpp.
|
private |
Diameter (m) of the cylindrical anchors.
Definition at line 72 of file farm_nodelet.hpp.
|
private |
Height (m) of the cylindrical anchors.
Definition at line 73 of file farm_nodelet.hpp.
|
staticprivate |
Whether SIGINT signal has been received.
Definition at line 44 of file farm_nodelet.hpp.
|
private |
Bound such that gamma is sampled in [mean-bnd, mean+bnd].
Definition at line 83 of file farm_nodelet.hpp.
|
private |
Bound such that phi is sampled in [mean-bnd, mean+bnd].
Definition at line 81 of file farm_nodelet.hpp.
|
private |
Bound such that theta is sampled in [mean-bnd, mean+bnd].
Definition at line 82 of file farm_nodelet.hpp.
|
private |
Diameter (m) of each buoy.
Definition at line 75 of file farm_nodelet.hpp.
|
private |
Distance (m) between water surface and line.
Definition at line 70 of file farm_nodelet.hpp.
|
private |
Distance (m) between water surface and seafloor.
Definition at line 71 of file farm_nodelet.hpp.
|
private |
Ratio of alga disease (0->fully sane, 1->fully sick)
Definition at line 96 of file farm_nodelet.hpp.
|
private |
Whether to display the disease heatmaps.
Definition at line 95 of file farm_nodelet.hpp.
|
private |
Height of the algae disease heatmap.
Definition at line 97 of file farm_nodelet.hpp.
|
private |
Height of the grid for perlin noise generation.
Definition at line 99 of file farm_nodelet.hpp.
|
private |
Whether the farm initialisation has been done.
Definition at line 56 of file farm_nodelet.hpp.
|
staticprivate |
Timer callback for the init function.
Definition at line 45 of file farm_nodelet.hpp.
|
private |
Mean of the length of an alga.
Definition at line 88 of file farm_nodelet.hpp.
|
private |
Length (m) of each line.
Definition at line 68 of file farm_nodelet.hpp.
|
private |
Frequency of the main loop.
Definition at line 64 of file farm_nodelet.hpp.
|
staticprivate |
Timer callback for the main function.
Definition at line 46 of file farm_nodelet.hpp.
|
private |
Number of algae per line.
Definition at line 86 of file farm_nodelet.hpp.
|
private |
Number of buoys on each floating rope.
Definition at line 74 of file farm_nodelet.hpp.
|
private |
Number of algae lines.
Definition at line 66 of file farm_nodelet.hpp.
|
private |
Node handler (for topics and services)
Definition at line 49 of file farm_nodelet.hpp.
|
private |
Lateral distance (m) between each line.
Definition at line 67 of file farm_nodelet.hpp.
|
private |
For randomising the heatmaps.
Definition at line 59 of file farm_nodelet.hpp.
|
private |
Mean of phi angle for algae line generation.
Definition at line 79 of file farm_nodelet.hpp.
|
private |
Private node handler (for parameters)
Definition at line 50 of file farm_nodelet.hpp.
|
private |
Mean of the algae orientation.
Definition at line 90 of file farm_nodelet.hpp.
|
private |
Seed initialiser for random number generation.
Definition at line 57 of file farm_nodelet.hpp.
|
private |
Random number initialiser.
Definition at line 58 of file farm_nodelet.hpp.
|
private |
Seed for random numbers (0 for random seed)
Definition at line 65 of file farm_nodelet.hpp.
|
private |
Whether to randomise size and orientation of algae.
Definition at line 85 of file farm_nodelet.hpp.
|
private |
Whether to randomise the position of each line.
Definition at line 77 of file farm_nodelet.hpp.
|
private |
Dynamic reconfigure server.
Definition at line 51 of file farm_nodelet.hpp.
|
private |
Whether the dynamic reconfigure callback has been called once.
Definition at line 55 of file farm_nodelet.hpp.
|
private |
ROS publisher for Rviz.
Definition at line 52 of file farm_nodelet.hpp.
|
private |
Standard deviation on algae length.
Definition at line 92 of file farm_nodelet.hpp.
|
private |
Standard deviation on algae orientation.
Definition at line 93 of file farm_nodelet.hpp.
|
private |
Standard deviation on algae width.
Definition at line 91 of file farm_nodelet.hpp.
|
private |
Mean of theta angle for algae line generation.
Definition at line 80 of file farm_nodelet.hpp.
|
private |
Thickness of an alga (for collision detection)
Definition at line 89 of file farm_nodelet.hpp.
|
private |
Diameter (m) of each line.
Definition at line 69 of file farm_nodelet.hpp.
|
private |
Mean of the width of an alga.
Definition at line 87 of file farm_nodelet.hpp.
|
private |
Width of the algae disease heatmap.
Definition at line 98 of file farm_nodelet.hpp.
|
private |
Width of the grid for perlin noise generation
Definition at line 100 of file farm_nodelet.hpp.
1.8.11