|
Nav2 Navigation Stack - kilted
kilted
ROS 2 Navigation Stack
|
An object to contain docks and docking plugins. More...
#include <nav2_docking/opennav_docking/include/opennav_docking/dock_database.hpp>

Public Member Functions | |
| DockDatabase (std::shared_ptr< std::mutex > mutex=std::make_shared< std::mutex >()) | |
| A constructor for opennav_docking::DockDatabase. | |
| bool | initialize (const rclcpp_lifecycle::LifecycleNode::WeakPtr &parent, std::shared_ptr< tf2_ros::Buffer > tf) |
| A setup function to populate database. More... | |
| ~DockDatabase () | |
| A destructor for opennav_docking::DockDatabase. | |
| void | activate () |
| An activation method. | |
| void | deactivate () |
| An deactivation method. | |
| Dock * | findDock (const std::string &dock_id) |
| Find a dock instance & plugin in the databases from ID. More... | |
| ChargingDock::Ptr | findDockPlugin (const std::string &type) |
| Find a dock plugin to use for a given type. More... | |
| unsigned int | instance_size () const |
| Get the number of docks in the database. More... | |
| unsigned int | plugin_size () const |
| Get the number of dock types in the database. More... | |
Protected Member Functions | |
| bool | getDockPlugins (const rclcpp_lifecycle::LifecycleNode::SharedPtr &node, std::shared_ptr< tf2_ros::Buffer > tf) |
| Populate database of dock type plugins. More... | |
| bool | getDockInstances (const rclcpp_lifecycle::LifecycleNode::SharedPtr &node) |
| Populate database of dock instances. More... | |
| Dock * | findDockInstance (const std::string &dock_id) |
| Find a dock instance in the database from ID. More... | |
| void | reloadDbCb (const std::shared_ptr< rmw_request_id_t > request_header, const std::shared_ptr< nav2_msgs::srv::ReloadDockDatabase::Request > request, std::shared_ptr< nav2_msgs::srv::ReloadDockDatabase::Response > response) |
| Service request to reload database of docks. More... | |
Protected Attributes | |
| rclcpp_lifecycle::LifecycleNode::WeakPtr | node_ |
| std::shared_ptr< std::mutex > | mutex_ |
| DockPluginMap | dock_plugins_ |
| DockMap | dock_instances_ |
| pluginlib::ClassLoader< opennav_docking_core::ChargingDock > | dock_loader_ |
| nav2_util::ServiceServer< nav2_msgs::srv::ReloadDockDatabase, std::shared_ptr< rclcpp_lifecycle::LifecycleNode > >::SharedPtr | reload_db_service_ |
An object to contain docks and docking plugins.
Definition at line 40 of file dock_database.hpp.
| Dock * opennav_docking::DockDatabase::findDock | ( | const std::string & | dock_id | ) |
Find a dock instance & plugin in the databases from ID.
| dock_id | Id of dock to find |
Definition at line 111 of file dock_database.cpp.
References findDockInstance(), and findDockPlugin().

|
protected |
Find a dock instance in the database from ID.
| dock_id | Id of dock to find |
Definition at line 128 of file dock_database.cpp.
Referenced by findDock().

| ChargingDock::Ptr opennav_docking::DockDatabase::findDockPlugin | ( | const std::string & | type | ) |
Find a dock plugin to use for a given type.
| type | Dock type to find plugin for |
Definition at line 137 of file dock_database.cpp.
Referenced by findDock().

|
protected |
Populate database of dock instances.
| Node | Node to get values from |
Definition at line 191 of file dock_database.cpp.
Referenced by initialize().

|
protected |
Populate database of dock type plugins.
| Node | Node to get values from |
| tf | TF buffer |
Definition at line 151 of file dock_database.cpp.
Referenced by initialize().

| bool opennav_docking::DockDatabase::initialize | ( | const rclcpp_lifecycle::LifecycleNode::WeakPtr & | parent, |
| std::shared_ptr< tf2_ros::Buffer > | tf | ||
| ) |
A setup function to populate database.
| parent | Weakptr to the node to use to get interances and parameters |
| tf | TF buffer |
Definition at line 32 of file dock_database.cpp.
References getDockInstances(), getDockPlugins(), and reloadDbCb().

| unsigned int opennav_docking::DockDatabase::instance_size | ( | ) | const |
Get the number of docks in the database.
Definition at line 238 of file dock_database.cpp.
| unsigned int opennav_docking::DockDatabase::plugin_size | ( | ) | const |
Get the number of dock types in the database.
Definition at line 233 of file dock_database.cpp.
|
protected |
Service request to reload database of docks.
| request | Service request |
| response | Service response |
Definition at line 85 of file dock_database.cpp.
Referenced by initialize().
