Skip to main content

ResetMujocoKeyframe Class

Resets the MuJoCo simulation to a specified keyframe. More...

Declaration

class moveit_pro::behaviors::ResetMujocoKeyframe { ... }

Included Headers

#include <reset_mujoco_keyframe.hpp>

Base class

classServiceClientBehaviorBase<ServiceT>

A base class for behaviors which need to send a request to a ROS service client and wait for a result. More...

Public Constructors Index

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

Private Member Functions Index

tl::expected< std::string, std::string >getServiceName () override

Get the service name from the behavior's input ports. More...

tl::expected< moveit_studio_internal_msgs::srv::ResetMujocoKeyframe::Request, std::string >createRequest () override

Create the service request. More...

tl::expected< bool, std::string >processResponse (const moveit_studio_internal_msgs::srv::ResetMujocoKeyframe::Response &response) override

Process the service response. More...

tl::expected< std::chrono::duration< double >, std::string >getResponseTimeout () override

Get timeout for server response. More...

tl::expected< std::chrono::duration< double >, std::string >getWaitForServerAvailableTimeout () override

Get timeout for waiting for the server to be available. More...

std::shared_future< tl::expected< bool, std::string > > &getFuture () override

Classes derived from AsyncBehaviorBase must implement getFuture() so that it returns a shared_future class member. More...

Private Member Attributes Index

std::shared_future< tl::expected< bool, std::string > >future_

Classes derived from AsyncBehaviorBase must have this shared_future as a class member. More...

Public Static Functions Index

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

Description

Resets the MuJoCo simulation to a specified keyframe.

This behavior calls a service to reset the MuJoCo simulation state to a named keyframe. The keyframe must be defined in the MuJoCo scene model.

Data Port NamePort TypeObject Type
keyframe_nameinputstd::string
response_timeoutinputdouble
wait_for_server_available_timeoutinputdouble

Definition at line 27 of file reset_mujoco_keyframe.hpp.

Public Constructors

ResetMujocoKeyframe()

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

Declaration at line 30 of file reset_mujoco_keyframe.hpp, definition at line 47 of file reset_mujoco_keyframe.cpp.

Private Member Functions

createRequest()

tl::expected< moveit_studio_internal_msgs::srv::ResetMujocoKeyframe::Request, std::string > moveit_pro::behaviors::ResetMujocoKeyframe::createRequest ()
virtual

Create the service request.

Declaration at line 42 of file reset_mujoco_keyframe.hpp, definition at line 73 of file reset_mujoco_keyframe.cpp.

getFuture()

std::shared_future< tl::expected< bool, std::string > > & moveit_pro::behaviors::ResetMujocoKeyframe::getFuture ()
inline virtual

Classes derived from AsyncBehaviorBase must implement getFuture() so that it returns a shared_future class member.

Definition at line 55 of file reset_mujoco_keyframe.hpp.

getResponseTimeout()

tl::expected< std::chrono::duration< double >, std::string > moveit_pro::behaviors::ResetMujocoKeyframe::getResponseTimeout ()
virtual

Get timeout for server response.

Declaration at line 49 of file reset_mujoco_keyframe.hpp, definition at line 103 of file reset_mujoco_keyframe.cpp.

getServiceName()

tl::expected< std::string, std::string > moveit_pro::behaviors::ResetMujocoKeyframe::getServiceName ()
virtual

Get the service name from the behavior's input ports.

Declaration at line 39 of file reset_mujoco_keyframe.hpp, definition at line 67 of file reset_mujoco_keyframe.cpp.

getWaitForServerAvailableTimeout()

tl::expected< std::chrono::duration< double >, std::string > moveit_pro::behaviors::ResetMujocoKeyframe::getWaitForServerAvailableTimeout ()
virtual

Get timeout for waiting for the server to be available.

Declaration at line 52 of file reset_mujoco_keyframe.hpp, definition at line 113 of file reset_mujoco_keyframe.cpp.

processResponse()

tl::expected< bool, std::string > moveit_pro::behaviors::ResetMujocoKeyframe::processResponse (const moveit_studio_internal_msgs::srv::ResetMujocoKeyframe::Response & response)

Process the service response.

Declaration at line 46 of file reset_mujoco_keyframe.hpp, definition at line 87 of file reset_mujoco_keyframe.cpp.

Private Member Attributes

future_

std::shared_future<tl::expected<bool, std::string> > moveit_pro::behaviors::ResetMujocoKeyframe::future_

Classes derived from AsyncBehaviorBase must have this shared_future as a class member.

Definition at line 62 of file reset_mujoco_keyframe.hpp.

Public Static Functions

metadata()

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

Declaration at line 35 of file reset_mujoco_keyframe.hpp, definition at line 62 of file reset_mujoco_keyframe.cpp.

providedPorts()

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

Declaration at line 33 of file reset_mujoco_keyframe.hpp, definition at line 53 of file reset_mujoco_keyframe.cpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.