The BehaviorContext struct contains shared resources that are common between all instances of Behaviors that inherit from moveit_pro::behaviors::SharedResourcesNode.
More...
#include <behavior_context.hpp>
The BehaviorContext struct contains shared resources that are common between all instances of Behaviors that inherit from moveit_pro::behaviors::SharedResourcesNode.
The BehaviorContext struct won't load a robot model by default. This is to avoid the cost of loading the robot model when it's not actually needed (e.g. tests), or needing to consume a timeout waiting for the model to be available. If a robot model is needed (e.g. when running on an actual robot), set load_robot_model=true when constructing the BehaviorContext. If load_robot_model=true and the robot model fails to load, the BehaviorContext will throw an exception and the program will terminate.
◆ BehaviorContext() [1/4]
| moveit_pro::behaviors::BehaviorContext::BehaviorContext |
( |
const std::shared_ptr< rclcpp::Node > & |
node_in, |
|
|
bool |
tf2_spin_thread = true, |
|
|
bool |
load_robot_model = false |
|
) |
| |
|
explicit |
◆ BehaviorContext() [2/4]
◆ BehaviorContext() [3/4]
◆ BehaviorContext() [4/4]
| moveit_pro::behaviors::BehaviorContext::BehaviorContext |
( |
BehaviorContext && |
| ) |
|
|
delete |
◆ getModelFrameOrDefault()
| std::string moveit_pro::behaviors::BehaviorContext::getModelFrameOrDefault |
( |
| ) |
const |
The robot model's root frame, or "world" when no robot model was loaded.
Behaviors default their visualization and IK frames to this so they stay correct on robots whose model is not rooted at "world" (e.g. mobile bases rooted at "odom").
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ callback_group_mutually_exclusive
| const std::shared_ptr<rclcpp::CallbackGroup> moveit_pro::behaviors::BehaviorContext::callback_group_mutually_exclusive |
A const shared pointer mutually-exclusive callback group.
Marked const to prevent Behaviors that can access BehaviorContext from changing it.
◆ logger
A const unique pointer to a logger for reporting messages to the UI.
Marked const to prevent Behaviors that can access BehaviorContext from changing it.
◆ node
| const std::shared_ptr<rclcpp::Node> moveit_pro::behaviors::BehaviorContext::node |
A const shared pointer to a RCLCPP Node. This points to an instance of a Node provided when constructing the BehaviorContext.
Marked const to prevent Behaviors that can access BehaviorContext from changing it.
◆ persistent_publishers
Cache of publishers (e.g. UI point-cloud snapshots) whose latched samples must outlive the Behavior instance that published them, so a UI that reconnects or reloads after the Objective still receives them.
◆ reentrant_callback_group
| const std::shared_ptr<rclcpp::CallbackGroup> moveit_pro::behaviors::BehaviorContext::reentrant_callback_group |
A const shared pointer reentrant callback group.
Marked const to prevent Behaviors that can access BehaviorContext from changing it.
◆ robot_model
| std::shared_ptr<moveit_pro::base::RobotModel> moveit_pro::behaviors::BehaviorContext::robot_model |
The robot model, may be nullptr if the BehaviorContext was created with load_robot_model=false.
if load_robot_model=true, this is guaranteed to be a valid pointer.
◆ transform_broadcaster_ptr
| std::shared_ptr<tf2_ros::TransformBroadcaster> moveit_pro::behaviors::BehaviorContext::transform_broadcaster_ptr |
◆ transform_buffer_ptr
| std::shared_ptr<tf2_ros::Buffer> moveit_pro::behaviors::BehaviorContext::transform_buffer_ptr |
Transform buffer, listener, and broadcaster to interface with TF.
◆ transform_listener_ptr
| std::shared_ptr<tf2_ros::TransformListener> moveit_pro::behaviors::BehaviorContext::transform_listener_ptr |
The documentation for this struct was generated from the following files: