Easy Navigation
Loading...
Searching...
No Matches
easynav Namespace Reference

Namespaces

namespace  detail
namespace  safety
namespace  testing

Classes

class  CircularBuffer
 Fixed-size circular buffer, thread-safe (mutex-based), copyable. More...
class  ControllerNode
 ROS 2 lifecycle node that manages calculating speeds for the Easy Navigation system. More...
class  DetectionsPerception
class  DetectionsPerceptionsHandler
 Handles the creation and updating of DetectionsPerceptions instances from sensor_msgs::msg::Image messages. More...
class  DummyController
 A default "dummy" implementation for the Control Method. More...
class  DummyLocalizer
 A default "do-nothing" implementation of LocalizerMethodBase. More...
class  DummyMapsManager
 A default "do-nothing" implementation of MapsManagerBase. More...
class  DummyPlanner
 A default "do-nothing" implementation of PlannerMethodBase. More...
class  FaultyController
 Controller that misbehaves on purpose, to test how EasyNav copes with it. More...
class  FaultyLocalizer
 Localizer that misbehaves on purpose, to test how EasyNav copes with it. More...
class  FaultyMapsManager
 Maps manager that misbehaves on purpose, to test how EasyNav copes with it. More...
class  FaultyPlanner
 Planner that misbehaves on purpose, to test how EasyNav copes with it. More...
class  GNSSPerception
 Represents a single GNSS perception from a sensor. More...
class  GNSSPerceptionHandler
 Handles the creation and updating of GNSSPerception instances from sensor_msgs::msg::NavSatFix messages. More...
class  GoalManager
 Handles navigation goals, their lifecycle, and command interface. More...
class  GoalManagerClient
 Client-side interface for interacting with GoalManager. More...
class  ImagePerception
 Represents a single image perception from a sensor. More...
class  ImagePerceptionHandler
 Handles the creation and updating of ImagePerception instances from sensor_msgs::msg::Image messages. More...
class  IMUPerception
 Represents a single IMU perception from a sensor. More...
class  IMUPerceptionHandler
 Handles the creation and updating of IMUPerception instances from sensor_msgs::msg::Imu messages. More...
struct  LegacyRobotGeometryNames
 Deprecated parameter names (full names on the node, "" = none) for each field. More...
class  LocalizerNode
 ROS 2 lifecycle node that manages localization in Easy Navigation. More...
class  MapsManagerNode
 ROS 2 lifecycle node that manages map-related plugins in Easy Navigation. More...
class  NavState
 A generic, type-safe, thread-safe blackboard to hold runtime state. More...
class  OdometryPerception
 Represents a single odometry perception from a sensor. More...
class  OdometryPerceptionHandler
 Handles the creation and updating of OdometryPerception instances from nav_msgs::msg::Odometry messages. More...
class  PerceptionBase
 Abstract base class for representing a single sensor perception. More...
class  PerceptionHandler
 Abstract base class for pluginlib-based sensor perception handlers. More...
class  PlannerNode
 ROS 2 lifecycle node that manages path planning in Easy Navigation. More...
class  PointPerception
 Concrete perception class for 3D point cloud data. More...
struct  PointPerceptionBufferType
class  PointPerceptionHandler
 PerceptionHandler implementation for sensors producing point-based data. More...
class  PointPerceptionsOpsView
 Provides efficient, non-destructive, chainable operations over a set of point-based perceptions. More...
struct  RobotGeometry
 The robot's shape, shared by everything that needs it. More...
class  RobotGeometryRegistry
 Shares the robot's geometry across EasyNav's nodes. More...
class  RTTFBuffer
 Provides functionality for RTTFBuffer. More...
class  SensorsNode
 ROS 2 lifecycle node that manages sensor fusion in Easy Navigation. More...
class  Singleton
class  SystemNode
 ROS 2 lifecycle node coordinating all Easy Navigation components. More...
struct  SystemNodeInfo
 Structure holding runtime information for a subnode. More...
struct  TFInfo
 Aggregated TF configuration used across EasyNav. More...
class  VelocityMux
 Decides, every RT cycle, which velocity command is sent to the robot. More...
class  VelocitySmoother
 Brings the commanded velocity towards a target within the robot limits. More...
class  YTSession
 A Yaets Tracing Session. More...

Typedefs

using CallbackReturnT = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
using DetectionsPerceptions
using GNSSPerceptions
 Alias for a vector of shared pointers to GNSSPerception objects.
using ImagePerceptions
 Alias for a vector of shared pointers to ImagePerception objects.
using IMUPerceptions
 Alias for a vector of shared pointers to IMUPerception objects.
using OdometryPerceptions
 Alias for a vector of shared pointers to OdometryPerception objects.
using PerceptionBasePtr = std::shared_ptr<PerceptionBase>
 Shared pointer alias to PerceptionBase.
using PointPerceptions
 Alias for a vector of shared pointers to PointPerception objects.

Functions

std::string backtrace_to_string (std::size_t max_frames=64, std::size_t skip=0)
double calculate_angle (const geometry_msgs::msg::Pose &pose1, const geometry_msgs::msg::Pose &pose2)
 Get the (absolute) yaw angle difference between two poses.
double calculate_distance_xy (const geometry_msgs::msg::Pose &pose1, const geometry_msgs::msg::Pose &pose2)
 Internal utility functions.
std::string check_memory_lock ()
 Whether lock_memory() is allowed (RLIMIT_MEMLOCK unlimited), without locking.
std::string check_real_time_priority (int priority)
 Whether a thread of this process can get SCHED_FIFO priority, tried on a temporary thread.
void convert (const sensor_msgs::msg::LaserScan &scan, pcl::PointCloud< pcl::PointXYZ > &pc)
 Converts a LaserScan message into a point cloud.
template<typename T, typename NodeT>
void declare_parameter_if_absent (NodeT &node, const std::string &name, const T &default_value)
 Declares name with default_value unless it already exists.
std::string demangle (const char *name)
 Demangles a C++ RTTI type name if possible.
rclcpp::Time get_latest_detections_perceptions_stamp (const DetectionsPerceptions &perceptions)
 Retrieves the latest timestamp among a set of detection-based perceptions.
rclcpp::Time get_latest_gnss_perceptions_stamp (const GNSSPerceptions &perceptions)
 Retrieves the latest timestamp among a set of GNSS perceptions.
rclcpp::Time get_latest_image_perceptions_stamp (const ImagePerceptions &perceptions)
 Retrieves the latest timestamp among a set of image-based perceptions.
rclcpp::Time get_latest_imu_perceptions_stamp (const IMUPerceptions &perceptions)
 Retrieves the latest timestamp among a set of IMU perceptions.
rclcpp::Time get_latest_odometry_perceptions_stamp (const OdometryPerceptions &perceptions)
 Retrieves the latest timestamp among a set of odometry perceptions.
rclcpp::Time get_latest_point_perceptions_stamp (const PointPerceptions &perceptions)
 Retrieves the latest timestamp among a set of point-based perceptions.
std::filesystem::path get_package_share_path (const std::string &package_name)
 Returns the share directory of package_name.
template<typename T = PerceptionBase>
std::vector< std::shared_ptr< T > > get_perceptions (const std::vector< PerceptionBasePtr > &src)
 Extracts a homogeneous collection of perceptions of type T from a heterogeneous vector.
template<typename NodeT>
RobotGeometry get_robot_geometry (NodeT &node, const LegacyRobotGeometryNames &legacy={})
 The robot's geometry ("system_node.robot_geometry.*").
std::string lock_memory ()
 Locks the process memory, current and future, so the RT cycle never page-faults.
template<class NodeT, class ListenerT = tf2_ros::TransformListener>
std::unique_ptr< ListenerT > make_transform_listener (tf2::BufferCore &buffer, const std::shared_ptr< NodeT > &node, bool spin_thread=true)
 Creates a TransformListener attached to node.
constexpr double norm_angle (const double angle)
 Angle normalization to [-pi, pi) range (in radians).
sensor_msgs::msg::PointCloud2 perception_to_rosmsg (const PointPerception &perception)
 Converts a PointPerception into a sensor_msgs::msg::PointCloud2 message.
sensor_msgs::msg::PointCloud2 points_to_rosmsg (const pcl::PointCloud< pcl::PointXYZ > &points)
 Converts a PCL point cloud into a sensor_msgs::msg::PointCloud2 message.
std::string set_real_time_priority (int priority)
 Gives the calling thread SCHED_FIFO priority.
std::string stacktrace (std::size_t skip=1, std::size_t max_frames=64)
 Captures a C/C++ stack trace as a string.

Variables

constexpr int kRealTimePriority = 80
 SCHED_FIFO priority of EasyNav's real-time cycle.
template<class C>
C * Singleton< C >::instance_ = nullptr
template<class C>
std::mutex Singleton< C >::mutex_

Typedef Documentation

◆ CallbackReturnT

using CallbackReturnT = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn

◆ DetectionsPerceptions

Initial value:
std::vector<std::shared_ptr<DetectionsPerception>>

◆ GNSSPerceptions

Initial value:
std::vector<std::shared_ptr<GNSSPerception>>

Alias for a vector of shared pointers to GNSSPerception objects.

The container can represent a time-ordered or batched collection, depending on producer logic.

◆ ImagePerceptions

Initial value:
std::vector<std::shared_ptr<ImagePerception>>

Alias for a vector of shared pointers to ImagePerception objects.

The container can represent a time-ordered or batched collection, depending on producer logic.

◆ IMUPerceptions

Initial value:
std::vector<std::shared_ptr<IMUPerception>>

Alias for a vector of shared pointers to IMUPerception objects.

The container can represent a time-ordered or batched collection, depending on producer logic.

◆ OdometryPerceptions

Initial value:
std::vector<std::shared_ptr<OdometryPerception>>

Alias for a vector of shared pointers to OdometryPerception objects.

The container can represent a time-ordered or batched collection, depending on producer logic.

◆ PerceptionBasePtr

using PerceptionBasePtr = std::shared_ptr<PerceptionBase>

Shared pointer alias to PerceptionBase.

◆ PointPerceptions

Initial value:
std::vector<std::shared_ptr<PointPerception>>

Alias for a vector of shared pointers to PointPerception objects.

Function Documentation

◆ backtrace_to_string()

std::string backtrace_to_string ( std::size_t max_frames = 64,
std::size_t skip = 0 )

◆ calculate_angle()

double calculate_angle ( const geometry_msgs::msg::Pose & pose1,
const geometry_msgs::msg::Pose & pose2 )

Get the (absolute) yaw angle difference between two poses.

Parameters
pose1First pose
pose2Second pose

◆ calculate_distance_xy()

double calculate_distance_xy ( const geometry_msgs::msg::Pose & pose1,
const geometry_msgs::msg::Pose & pose2 )

Internal utility functions.

Get the x/y distance between two poses

Parameters
pose1First pose
pose2Second pose

◆ check_memory_lock()

std::string check_memory_lock ( )

Whether lock_memory() is allowed (RLIMIT_MEMLOCK unlimited), without locking.

Returns
"" if it is, otherwise why not.

◆ check_real_time_priority()

std::string check_real_time_priority ( int priority)

Whether a thread of this process can get SCHED_FIFO priority, tried on a temporary thread.

Returns
"" if it can, otherwise why not.

◆ convert()

void convert ( const sensor_msgs::msg::LaserScan & scan,
pcl::PointCloud< pcl::PointXYZ > & pc )

Converts a LaserScan message into a point cloud.

Parameters
scanInput laser scan message.
pcOutput point cloud (XYZ).

◆ declare_parameter_if_absent()

template<typename T, typename NodeT>
void declare_parameter_if_absent ( NodeT & node,
const std::string & name,
const T & default_value )

Declares name with default_value unless it already exists.

A plugin may be initialized again on the same node (EasyNav reconfigured), possibly after a plugin of another type under the same name that shared some of its parameters: each parameter must be checked on its own, never assumed to be declared along with others.

◆ demangle()

std::string demangle ( const char * name)

Demangles a C++ RTTI type name if possible.

Parameters
nameMangled type name (from typeid(T).name()).
Returns
Readable (demangled) type name if available; otherwise returns name.

◆ get_latest_detections_perceptions_stamp()

rclcpp::Time get_latest_detections_perceptions_stamp ( const DetectionsPerceptions & perceptions)

Retrieves the latest timestamp among a set of detection-based perceptions.

Parameters
perceptionsContainer of detection-based perceptions.
Returns
The most recent timestamp found in perceptions, or a default-constructed rclcpp::Time if perceptions is empty.

◆ get_latest_gnss_perceptions_stamp()

rclcpp::Time get_latest_gnss_perceptions_stamp ( const GNSSPerceptions & perceptions)

Retrieves the latest timestamp among a set of GNSS perceptions.

Parameters
perceptionsContainer of GNSS perceptions.
Returns
The most recent timestamp found in perceptions, or a default-constructed rclcpp::Time if perceptions is empty.

◆ get_latest_image_perceptions_stamp()

rclcpp::Time get_latest_image_perceptions_stamp ( const ImagePerceptions & perceptions)

Retrieves the latest timestamp among a set of image-based perceptions.

Parameters
perceptionsContainer of image-based perceptions.
Returns
The most recent timestamp found in perceptions, or a default-constructed rclcpp::Time if perceptions is empty.

◆ get_latest_imu_perceptions_stamp()

rclcpp::Time get_latest_imu_perceptions_stamp ( const IMUPerceptions & perceptions)

Retrieves the latest timestamp among a set of IMU perceptions.

Parameters
perceptionsContainer of IMU perceptions.
Returns
The most recent timestamp found in perceptions, or a default-constructed rclcpp::Time if perceptions is empty.

◆ get_latest_odometry_perceptions_stamp()

rclcpp::Time get_latest_odometry_perceptions_stamp ( const OdometryPerceptions & perceptions)

Retrieves the latest timestamp among a set of odometry perceptions.

Parameters
perceptionsContainer of odometry perceptions.
Returns
The most recent timestamp found in perceptions, or a default-constructed rclcpp::Time if perceptions is empty.

◆ get_latest_point_perceptions_stamp()

rclcpp::Time get_latest_point_perceptions_stamp ( const PointPerceptions & perceptions)

Retrieves the latest timestamp among a set of point-based perceptions.

Parameters
perceptionsContainer of point-based perceptions.
Returns
The most recent timestamp found in perceptions, or a default-constructed rclcpp::Time if perceptions is empty.

◆ get_package_share_path()

std::filesystem::path get_package_share_path ( const std::string & package_name)

Returns the share directory of package_name.

Exceptions
ament_index_cpp::PackageNotFoundErrorif the package is not found.

◆ get_perceptions()

template<typename T = PerceptionBase>
std::vector< std::shared_ptr< T > > get_perceptions ( const std::vector< PerceptionBasePtr > & src)

Extracts a homogeneous collection of perceptions of type T from a heterogeneous vector.

This helper iterates the input vector of PerceptionBasePtr and attempts a std::dynamic_pointer_cast<T> and includes only those perceptions that match (homogeneous view).

Template Parameters
TTarget perception type. Must inherit from PerceptionBase. Defaults to PerceptionBase.
Parameters
srcSource vector containing pointers to heterogeneous perceptions ( PerceptionBasePtr ).
Returns
A vector of std::shared_ptr<T> containing the matching perceptions, in the same order as src.

◆ get_robot_geometry()

template<typename NodeT>
RobotGeometry get_robot_geometry ( NodeT & node,
const LegacyRobotGeometryNames & legacy = {} )

The robot's geometry ("system_node.robot_geometry.*").

A deprecated parameter of node listed in legacy still applies, with a warning, when it is configured (in the parameter files, or declared by a previous instance) and "robot_geometry" does not configure that field; otherwise it is ignored, with a warning too.

Parameters
nodeNode holding the deprecated parameters.
legacyFull names of the deprecated parameters.

◆ lock_memory()

std::string lock_memory ( )

Locks the process memory, current and future, so the RT cycle never page-faults.

Requires an unlimited RLIMIT_MEMLOCK: with a finite one, later allocations could fail.

Returns
"" on success, otherwise why not.

◆ make_transform_listener()

template<class NodeT, class ListenerT = tf2_ros::TransformListener>
std::unique_ptr< ListenerT > make_transform_listener ( tf2::BufferCore & buffer,
const std::shared_ptr< NodeT > & node,
bool spin_thread = true )

Creates a TransformListener attached to node.

Up to Kilted, tf2_ros takes the node as a pointer; from Lyrical, as NodeInterfaces (the pointer form is deprecated in Lyrical and removed in Rolling).

◆ norm_angle()

double norm_angle ( const double angle)
constexpr

Angle normalization to [-pi, pi) range (in radians).

◆ perception_to_rosmsg()

sensor_msgs::msg::PointCloud2 perception_to_rosmsg ( const PointPerception & perception)

Converts a PointPerception into a sensor_msgs::msg::PointCloud2 message.

Parameters
perceptionPerception to convert.
Returns
The resulting ROS PointCloud2 message.

◆ points_to_rosmsg()

sensor_msgs::msg::PointCloud2 points_to_rosmsg ( const pcl::PointCloud< pcl::PointXYZ > & points)

Converts a PCL point cloud into a sensor_msgs::msg::PointCloud2 message.

Parameters
pointsInput point cloud.
Returns
The resulting ROS PointCloud2 message.

◆ set_real_time_priority()

std::string set_real_time_priority ( int priority)

Gives the calling thread SCHED_FIFO priority.

Returns
"" on success, otherwise why not.

◆ stacktrace()

std::string stacktrace ( std::size_t skip = 1,
std::size_t max_frames = 64 )

Captures a C/C++ stack trace as a string.

Parameters
skipNumber of initial frames to skip (e.g., the stacktrace frame itself).
max_framesMaximum number of frames to capture.
Returns
A multi-line string with one frame per line.

Variable Documentation

◆ kRealTimePriority

int kRealTimePriority = 80
constexpr

SCHED_FIFO priority of EasyNav's real-time cycle.

◆ Singleton< C >::instance_

template<class C>
C* Singleton< C >::instance_ = nullptr

◆ Singleton< C >::mutex_

template<class C>
std::mutex Singleton< C >::mutex_