Skip to main content

GetLocalizationEstimate Class

Request a no-motion localization update and capture its pose with the complete covariance. More...

Declaration​

class moveit_pro::behaviors::GetLocalizationEstimate { ... }

Included Headers​

#include <get_localization_estimate.hpp>

Base class​

classSharedResourcesNode<BehaviorTreeNodeT>

The SharedResourcesNode class provides a BehaviorContext object when constructing a BehaviorTree.Cpp node. More...

Private Member Typedefs Index​

usingUpdateClient = rclcpp::Client< std_srvs::srv::Empty >

Public Constructors Index​

GetLocalizationEstimate (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)

Public Destructor Index​

~GetLocalizationEstimate () override

Public Member Functions Index​

BT::NodeStatusonStart () override
BT::NodeStatusonRunning () override
voidonHalted () override

Private Member Functions Index​

voidclearRequest ()
BT::NodeStatusfail (const std::string &reason)

Private Member Attributes Index​

UpdateClient::SharedPtrclient_
rclcpp::Subscription< geometry_msgs::msg::PoseWithCovarianceStamped >::SharedPtrsubscription_
std::shared_ptr< ReceivedEstimate >received_
std::optional< UpdateClient::FutureAndRequestId >request_
std::chrono::steady_clock::time_pointdeadline_
std::stringtopic_
std::stringservice_
std::stringframe_
std::int64_trequest_stamp_ns_ = 0
boolupdate_completed_ = false

Public Static Functions Index​

static BT::PortsListprovidedPorts ()
static BT::KeyValueVectormetadata ()

Description​

Request a no-motion localization update and capture its pose with the complete covariance.

Requires a localizer with an Empty update service, such as AMCL. Does not command the robot or save particles.

Data Port NamePort TypeObject Type
estimate_topicinputstd::string
update_serviceinputstd::string
global_frame_idinputstd::string
timeout_secinputdouble
estimateoutputgeometry_msgs::msg::PoseWithCovarianceStamped

Definition at line 37 of file get_localization_estimate.hpp.

Private Member Typedefs​

UpdateClient​

using moveit_pro::behaviors::GetLocalizationEstimate::UpdateClient = rclcpp::Client<std_srvs::srv::Empty>

Definition at line 56 of file get_localization_estimate.hpp.

Public Constructors​

GetLocalizationEstimate()​

moveit_pro::behaviors::GetLocalizationEstimate::GetLocalizationEstimate (const std::string & name, const BT::NodeConfiguration & config, const std::shared_ptr< BehaviorContext > & shared_resources)
Parameters
name

Behavior name assigned in the Objective.

config

Behavior Tree configuration.

shared_resources

Shared logger and ROS node.

Declaration at line 45 of file get_localization_estimate.hpp, definition at line 34 of file get_localization_estimate.cpp.

Public Destructor​

~GetLocalizationEstimate()​

moveit_pro::behaviors::GetLocalizationEstimate::~GetLocalizationEstimate ()

Declaration at line 47 of file get_localization_estimate.hpp, definition at line 40 of file get_localization_estimate.cpp.

Public Member Functions​

onHalted()​

void moveit_pro::behaviors::GetLocalizationEstimate::onHalted ()

Declaration at line 53 of file get_localization_estimate.hpp, definition at line 233 of file get_localization_estimate.cpp.

onRunning()​

BT::NodeStatus moveit_pro::behaviors::GetLocalizationEstimate::onRunning ()
nodiscard

Declaration at line 52 of file get_localization_estimate.hpp, definition at line 143 of file get_localization_estimate.cpp.

onStart()​

BT::NodeStatus moveit_pro::behaviors::GetLocalizationEstimate::onStart ()
nodiscard

Declaration at line 51 of file get_localization_estimate.hpp, definition at line 87 of file get_localization_estimate.cpp.

Private Member Functions​

clearRequest()​

void moveit_pro::behaviors::GetLocalizationEstimate::clearRequest ()

Declaration at line 63 of file get_localization_estimate.hpp, definition at line 66 of file get_localization_estimate.cpp.

fail()​

BT::NodeStatus moveit_pro::behaviors::GetLocalizationEstimate::fail (const std::string & reason)
nodiscard

Declaration at line 64 of file get_localization_estimate.hpp, definition at line 80 of file get_localization_estimate.cpp.

Private Member Attributes​

client_​

UpdateClient::SharedPtr moveit_pro::behaviors::GetLocalizationEstimate::client_

Definition at line 66 of file get_localization_estimate.hpp.

deadline_​

std::chrono::steady_clock::time_point moveit_pro::behaviors::GetLocalizationEstimate::deadline_

Definition at line 70 of file get_localization_estimate.hpp.

frame_​

std::string moveit_pro::behaviors::GetLocalizationEstimate::frame_

Definition at line 73 of file get_localization_estimate.hpp.

received_​

std::shared_ptr<ReceivedEstimate> moveit_pro::behaviors::GetLocalizationEstimate::received_

Definition at line 68 of file get_localization_estimate.hpp.

request_​

std::optional<UpdateClient::FutureAndRequestId> moveit_pro::behaviors::GetLocalizationEstimate::request_

Definition at line 69 of file get_localization_estimate.hpp.

request_stamp_ns_​

std::int64_t moveit_pro::behaviors::GetLocalizationEstimate::request_stamp_ns_ = 0

Definition at line 74 of file get_localization_estimate.hpp.

service_​

std::string moveit_pro::behaviors::GetLocalizationEstimate::service_

Definition at line 72 of file get_localization_estimate.hpp.

subscription_​

rclcpp::Subscription<geometry_msgs::msg::PoseWithCovarianceStamped>::SharedPtr moveit_pro::behaviors::GetLocalizationEstimate::subscription_

Definition at line 67 of file get_localization_estimate.hpp.

topic_​

std::string moveit_pro::behaviors::GetLocalizationEstimate::topic_

Definition at line 71 of file get_localization_estimate.hpp.

update_completed_​

bool moveit_pro::behaviors::GetLocalizationEstimate::update_completed_ = false

Definition at line 75 of file get_localization_estimate.hpp.

Public Static Functions​

metadata()​

BT::KeyValueVector moveit_pro::behaviors::GetLocalizationEstimate::metadata ()
static

Declaration at line 50 of file get_localization_estimate.hpp, definition at line 61 of file get_localization_estimate.cpp.

providedPorts()​

BT::PortsList moveit_pro::behaviors::GetLocalizationEstimate::providedPorts ()
static

Declaration at line 49 of file get_localization_estimate.hpp, definition at line 45 of file get_localization_estimate.cpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.15.0.