Monitors wrench messages published to topic, and returns SUCCESS if the magnitude of the wrench measurements exceeds a force threshold for a minimum number of consecutive readings.
More...
#include <force_exceeds_threshold.hpp>
|
| ForceExceedsThreshold (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) |
|
BT::NodeStatus | onStart () override |
| Initializes the wrench topic subscriber based on the provided parameters. More...
|
|
BT::NodeStatus | onRunning () override |
| Monitors the force tracking state until a terminal state is reached. More...
|
|
void | onHalted () override |
| Stops the wrench topic subscriber. More...
|
|
void | addWrenchReading (const geometry_msgs::msg::WrenchStamped::SharedPtr msg, const double force_threshold, const std::size_t minimum_consecutive_wrench_values) |
| Transforms measured wrench to the specified hand frame using tform_ft_sensor_to_hand_, compares it to the provided bounds, and sets wrench_exceeded_threshold_ to True if the measured wrench is outside the bounds. More...
|
|
| 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. More...
|
|
Monitors wrench messages published to topic, and returns SUCCESS if the magnitude of the wrench measurements exceeds a force threshold for a minimum number of consecutive readings.
Data Port Name | Port Type | Object Type |
wrench_topic_name | Input | std::string |
hand_frame_name | Input | std::string |
wrench_frame_name | Input | std::string |
minimum_consecutive_wrench_values | Input | std::size_t |
force_threshold | Input | double |
◆ ForceExceedsThreshold()
moveit_studio::behaviors::ForceExceedsThreshold::ForceExceedsThreshold |
( |
const std::string & |
name, |
|
|
const BT::NodeConfiguration & |
config, |
|
|
const std::shared_ptr< BehaviorContext > & |
shared_resources |
|
) |
| |
◆ addWrenchReading()
void moveit_studio::behaviors::ForceExceedsThreshold::addWrenchReading |
( |
const geometry_msgs::msg::WrenchStamped::SharedPtr |
msg, |
|
|
const double |
force_threshold, |
|
|
const std::size_t |
minimum_consecutive_wrench_values |
|
) |
| |
Transforms measured wrench to the specified hand frame using tform_ft_sensor_to_hand_, compares it to the provided bounds, and sets wrench_exceeded_threshold_ to True if the measured wrench is outside the bounds.
- Parameters
-
msg | Latest WrenchStamped message. |
force_threshold | The maximum force threshold to compare the measured wrench against. |
minimum_consecutive_wrench_values | The minimum consecutive number of times the measured force needs to exceed the force_threshold value and set wrench_exceeded_threshold_ to True. |
◆ metadata()
BT::KeyValueVector moveit_studio::behaviors::ForceExceedsThreshold::metadata |
( |
| ) |
|
|
static |
◆ onHalted()
void moveit_studio::behaviors::ForceExceedsThreshold::onHalted |
( |
| ) |
|
|
override |
Stops the wrench topic subscriber.
◆ onRunning()
BT::NodeStatus moveit_studio::behaviors::ForceExceedsThreshold::onRunning |
( |
| ) |
|
|
override |
Monitors the force tracking state until a terminal state is reached.
- Returns
- SUCCESS if the force has exceeded threshold for the number of specified consecutive samples, else RUNNING.
◆ onStart()
BT::NodeStatus moveit_studio::behaviors::ForceExceedsThreshold::onStart |
( |
| ) |
|
|
override |
Initializes the wrench topic subscriber based on the provided parameters.
- Returns
- RUNNING if the Behavior initialized correctly, FAILURE if it did not.
◆ providedPorts()
BT::PortsList moveit_studio::behaviors::ForceExceedsThreshold::providedPorts |
( |
| ) |
|
|
static |
The documentation for this class was generated from the following files: