![]() |
MoveIt Pro API
Core Behaviors for MoveIt Pro
|
Behavior for executing a pretrained diffusion policy in MoveIt Pro. More...
#include <diffusion_policy.hpp>
Public Types | |
using | DiffusionPolicyObservationRecorderInterface = moveit_pro_ml_ros::DiffusionPolicyObservationRecorderInterface |
using | JTACClientInterface = jtac_client::JTACClientInterface |
Public Member Functions | |
DiffusionPolicy (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources, std::unique_ptr< DiffusionPolicyInterface > diffusion_policy_interface=std::make_unique< DiffusionPolicyInterface >(), std::unique_ptr< DiffusionPolicyObservationRecorderInterface > observation_recorder=nullptr, std::unique_ptr< JTACClientInterface > jtac_client=nullptr) | |
Constructor for the DiffusionPolicy behavior. | |
![]() | |
AsyncBehaviorBase (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) | |
virtual | ~AsyncBehaviorBase ()=default |
BT::NodeStatus | onStart () override |
Required implementation of BT::StatefulActionNode::onStart(). | |
BT::NodeStatus | onRunning () override |
Required implementation of BT::StatefulActionNode::onRunning(). | |
void | onHalted () override |
Required implementation of BT::StatefulActionNode::onHalted(). | |
void | resetStatus () |
Resets the internal status of this node. | |
![]() | |
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 () |
Implementation of the required providedPorts() function for the DiffusionPolicy Behavior. | |
static BT::KeyValueVector | metadata () |
Implementation of the metadata() function for displaying metadata, such as Behavior description and subcategory, in the MoveIt Studio Developer Tool. | |
Additional Inherited Members | |
![]() | |
void | notifyCanHalt () |
Called when runAsync() finishes to notify onHalted() that the async process has finished. | |
![]() | |
std::shared_ptr< BehaviorContext > | shared_resources_ |
Behavior for executing a pretrained diffusion policy in MoveIt Pro.
using moveit_studio::behaviors::DiffusionPolicy::DiffusionPolicyObservationRecorderInterface = moveit_pro_ml_ros::DiffusionPolicyObservationRecorderInterface |
using moveit_studio::behaviors::DiffusionPolicy::JTACClientInterface = jtac_client::JTACClientInterface |
moveit_studio::behaviors::DiffusionPolicy::DiffusionPolicy | ( | const std::string & | name, |
const BT::NodeConfiguration & | config, | ||
const std::shared_ptr< BehaviorContext > & | shared_resources, | ||
std::unique_ptr< DiffusionPolicyInterface > | diffusion_policy_interface = std::make_unique<DiffusionPolicyInterface>() , |
||
std::unique_ptr< DiffusionPolicyObservationRecorderInterface > | observation_recorder = nullptr , |
||
std::unique_ptr< JTACClientInterface > | jtac_client = nullptr |
||
) |
Constructor for the DiffusionPolicy behavior.
name | The name of a particular instance of this Behavior. This will be set by the behavior tree factory when this Behavior is created within a new behavior tree. |
config | This contains runtime configuration info for this Behavior, such as the mapping between the Behavior's data ports on the behavior tree's blackboard. This will be set by the behavior tree factory when this Behavior is created within a new behavior tree. |
shared_resources | Provides access to common resources such as the node handle and failure logger that are shared between all the behaviors that inherit from moveit_studio::behaviors::SharedResourcesNode. |
diffusion_policy_interface | An implementation of the DiffusionPolicyInterface. The default argument uses a default-constructed DiffusionPolicyInterface. |
observation_recorder | An implementation of the DiffusionPolicyObservationRecorderInterface. If nullptr, the behavior will create a default instance of DiffusionPolicyObservationRecorder. |
jtac_client | The JTAC action client for sending the trajectories. If nullptr, the behavior will create a default instance of JTACClient. |
|
static |
Implementation of the metadata() function for displaying metadata, such as Behavior description and subcategory, in the MoveIt Studio Developer Tool.
|
static |
Implementation of the required providedPorts() function for the DiffusionPolicy Behavior.