MoveIt Pro API
Core Behaviors for MoveIt Pro
Loading...
Searching...
No Matches
moveit_studio::behaviors::SwitchUIPrimaryView Class Referencefinal

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

#include <switch_ui_primary_view.hpp>

Inheritance diagram for moveit_studio::behaviors::SwitchUIPrimaryView:
Collaboration diagram for moveit_studio::behaviors::SwitchUIPrimaryView:

Public Member Functions

 SwitchUIPrimaryView (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)
 
BT::NodeStatus tick () override
 Publishes the requested view name to the UI topic.
 
- Public Member Functions inherited from moveit_studio::behaviors::SharedResourcesNode< BT::SyncActionNode >
 SharedResourcesNode (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)
 Constructor for SharedResourcesNode. Called by BT::BehaviorTreeFactory when creating a new behavior tree containing this node.
 

Static Public Member Functions

static BT::PortsList providedPorts ()
 Required implementation of the static providedPorts function.
 
static BT::KeyValueVector metadata ()
 Adds metadata, such as description and subcategory, to the Behavior.
 

Additional Inherited Members

- Protected Attributes inherited from moveit_studio::behaviors::SharedResourcesNode< BT::SyncActionNode >
std::shared_ptr< BehaviorContextshared_resources_
 

Detailed 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.

Note
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 Name Port Type Object Type
primary_view_name input std::string

Constructor & Destructor Documentation

◆ SwitchUIPrimaryView()

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

Member Function Documentation

◆ metadata()

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

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

◆ providedPorts()

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

Required implementation of the static providedPorts function.

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

◆ tick()

BT::NodeStatus moveit_studio::behaviors::SwitchUIPrimaryView::tick ( )
override

Publishes the requested view name to the UI topic.

Returns
SUCCESS after publishing, FAILURE if input port is invalid.

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