Skip to main content

SetInitialPose Class

Looks up the robot's current pose via TF and publishes it to the localizer's initial-pose topic (default /initialpose) to re-seed the particle filter. More...

Declaration

class moveit_pro::behaviors::SetInitialPose { ... }

Included Headers

#include <set_initial_pose.hpp>

Base class

classSharedResourcesNode<BehaviorTreeNodeT>

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

Public Constructors Index

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

Public Member Functions Index

BT::NodeStatustick () override

Private Member Attributes Index

std::shared_ptr< rclcpp::Publisher< geometry_msgs::msg::PoseWithCovarianceStamped > >publisher_

Public Static Functions Index

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

Description

Looks up the robot's current pose via TF and publishes it to the localizer's initial-pose topic (default /initialpose) to re-seed the particle filter.

Re-seeds a particle-filter localizer (e.g. beluga_amcl) at the robot's current estimated pose with a tight covariance, collapsing an over-dispersed particle cloud back onto that estimate. It does not correct a wrong position: the looked-up pose is itself derived from the current map->odom estimate. Add it at the start of any navigation Objective so each run begins from a confident localization estimate without requiring user intervention.

Data Port NamePort TypeObject Type
robot_frame_idInputstd::string
global_frame_idInputstd::string
xy_varianceInputdouble
yaw_varianceInputdouble
initial_pose_topicInputstd::string

Definition at line 53 of file set_initial_pose.hpp.

Public Constructors

SetInitialPose()

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

Declaration at line 56 of file set_initial_pose.hpp, definition at line 69 of file set_initial_pose.cpp.

Public Member Functions

tick()

BT::NodeStatus moveit_pro::behaviors::SetInitialPose::tick ()

Declaration at line 63 of file set_initial_pose.hpp, definition at line 98 of file set_initial_pose.cpp.

Private Member Attributes

publisher_

std::shared_ptr<rclcpp::Publisher<geometry_msgs::msg::PoseWithCovarianceStamped> > moveit_pro::behaviors::SetInitialPose::publisher_

Definition at line 66 of file set_initial_pose.hpp.

Public Static Functions

metadata()

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

Declaration at line 61 of file set_initial_pose.hpp, definition at line 93 of file set_initial_pose.cpp.

providedPorts()

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

Declaration at line 59 of file set_initial_pose.hpp, definition at line 77 of file set_initial_pose.cpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.