Skip to main content

SwitchUIPrimaryView Class

Switches the primary view in the MoveIt Studio Developer Tool. More...

Declaration

class moveit_pro::behaviors::SwitchUIPrimaryView { ... }

Included Headers

#include <switch_ui_primary_view.hpp>

Base class

classSharedResourcesNode<BehaviorTreeNodeT>

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

Public Constructors Index

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

Public Member Functions Index

BT::NodeStatustick () override

Publishes the requested view name to the UI topic. More...

Private Member Attributes Index

rclcpp::Publisher< std_msgs::msg::String >::SharedPtrpublisher_

Publisher for the primary view request topic. More...

Public Static Functions Index

static BT::PortsListprovidedPorts ()

Required implementation of the static providedPorts function. More...

static BT::KeyValueVectormetadata ()

Adds metadata, such as description and subcategory, to the Behavior. More...

Description

Switches the primary view in the MoveIt Studio Developer Tool.

This can be "Visualization", "Behavior Tree", or the name of any valid camera topic available in the view dropdown menu in the UI.

This behavior publishes the requested view name to a topic, allowing the frontend to update when ready. This is a fire-and-forget operation - the behavior returns SUCCESS immediately after publishing.

info

The behavior cannot detect or report errors if the view name is invalid or does not exist in the UI. SUCCESS is returned regardless of whether the UI can successfully switch to the requested view.

Data Port NamePort TypeObject Type
primary_view_nameinputstd::string

Definition at line 32 of file switch_ui_primary_view.hpp.

Public Constructors

SwitchUIPrimaryView()

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

Declaration at line 35 of file switch_ui_primary_view.hpp, definition at line 35 of file switch_ui_primary_view.cpp.

Public Member Functions

tick()

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

Publishes the requested view name to the UI topic.

Returns

SUCCESS after publishing, FAILURE if input port is invalid.

Declaration at line 53 of file switch_ui_primary_view.hpp, definition at line 54 of file switch_ui_primary_view.cpp.

Private Member Attributes

publisher_

rclcpp::Publisher<std_msgs::msg::String>::SharedPtr moveit_pro::behaviors::SwitchUIPrimaryView::publisher_

Publisher for the primary view request topic.

Definition at line 57 of file switch_ui_primary_view.hpp.

Public Static Functions

metadata()

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

Adds metadata, such as description and subcategory, to the Behavior.

Declaration at line 47 of file switch_ui_primary_view.hpp, definition at line 49 of file switch_ui_primary_view.cpp.

providedPorts()

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

Required implementation of the static providedPorts function.

Returns

The list of input and output ports used by this Behavior.

Declaration at line 42 of file switch_ui_primary_view.hpp, definition at line 43 of file switch_ui_primary_view.cpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.