Castable 2D ray. More...
#include <raycasting.hpp>
Public Member Functions | |
std::optional< double > | cast (const Sophus::SO2d &bearing) const |
Casts ray along a given direction. More... | |
Ray2d (const OccupancyGrid &grid, Algorithm algorithm, const Sophus::SE2d &source_pose, double max_range) noexcept | |
Constructs 2D ray with an specific ray tracing algorithm. More... | |
Ray2d (const OccupancyGrid &grid, const Sophus::SE2d &source_pose, double max_range) noexcept | |
Constructs 2D ray with default ray tracing algorithm. More... | |
auto | trace (const Sophus::SO2d &bearing) const |
Computes ray trace along a given direction. More... | |
Private Attributes | |
const Algorithm | algorithm_ |
const OccupancyGrid & | grid_ |
const double | max_range_ |
const Eigen::Vector2i | source_cell_ |
const Sophus::SE2d | source_pose_in_local_frame_ |
Castable 2D ray.
OccupancyGrid | A 2D occupancy grid |
Algorithm | A callable type, taking start and end grid cells for a ray and returning the full trace. |
Definition at line 44 of file include/beluga/algorithm/raycasting.hpp.
|
inlineexplicitnoexcept |
Constructs 2D ray with default ray tracing algorithm.
See Ray2d(const OccupancyGrid &, Algorithm, const Sophus::SE2d&, double) for further reference on constructor arguments.
Definition at line 51 of file include/beluga/algorithm/raycasting.hpp.
|
inlineexplicitnoexcept |
Constructs 2D ray with an specific ray tracing algorithm.
grid | Grid on which to perform ray casting. |
algorithm | Ray tracing algorithm implementation. |
source_pose | Pose of the source of the ray in the same frame as that on which the grid origin is defined. |
max_range | Maximum range for the ray, in meters. |
Definition at line 62 of file include/beluga/algorithm/raycasting.hpp.
|
inline |
Casts ray along a given direction.
Distances are measured from cell centroid to cell centroid.
bearing | Direction for ray casting. |
Definition at line 97 of file include/beluga/algorithm/raycasting.hpp.
|
inline |
Computes ray trace along a given direction.
bearing | Direction for ray tracing. |
Definition at line 79 of file include/beluga/algorithm/raycasting.hpp.
|
private |
Definition at line 111 of file include/beluga/algorithm/raycasting.hpp.
|
private |
Definition at line 110 of file include/beluga/algorithm/raycasting.hpp.
|
private |
Definition at line 114 of file include/beluga/algorithm/raycasting.hpp.
|
private |
Definition at line 113 of file include/beluga/algorithm/raycasting.hpp.
|
private |
Definition at line 112 of file include/beluga/algorithm/raycasting.hpp.