Skip to main content

PublishVelocityForceCommand Class

Publishes a velocity force command to the velocity force controller at a fixed rate. More...

Declaration

class moveit_pro::behaviors::PublishVelocityForceCommand { ... }

Included Headers

#include <publish_velocity_force_command.hpp>

Base class

classSharedResourcesNode<BehaviorTreeNodeT>

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

Public Member Typedefs Index

usingVelocityForceCommand = moveit_pro_controllers_msgs::msg::VelocityForceCommand

Public Constructors Index

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

Public Member Functions Index

BT::NodeStatusonStart () override
BT::NodeStatusonRunning () override
voidonHalted () override

Private Member Functions Index

voidpublishCommand ()
std::optional< std::string >updateCommand ()

Private Member Attributes Index

std::mutexcommand_mutex_
rclcpp::TimerBase::SharedPtrtimer_
VelocityForceCommandcommand_
std::shared_ptr< rclcpp::Publisher< moveit_pro_controllers_msgs::msg::VelocityForceCommand > >command_publisher_
boolwarned_twist_stamped_deprecated_ = false
boolwarned_wrench_stamped_deprecated_ = false

Public Static Functions Index

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

Description

Publishes a velocity force command to the velocity force controller at a fixed rate.

By default the controller interprets the twist and wrench in its configured ee_frame (see the velocity_force_controller config). Set control_frame_id to a robot-model link (e.g. the world or base link) to express the references in that frame instead, for world-relative motion that stays fixed as the end-effector rotates; this Behavior does not transform between frames itself. Wire either the unstamped twist / wrench ports (recommended) or the legacy twist_stamped / wrench_stamped ports (deprecated, header.frame_id is ignored). Use UnpackTwistStampedMessage / UnpackWrenchStampedMessage to bridge from stamped sources.

Data Port NamePort TypeObject Type
velocity_force_controller_command_topicinputstd::string
velocity_controlled_axesinputstd::vector<int>
force_controlled_axesinputstd::vector<int>
wrench_gaininputdouble
twistinputgeometry_msgs::msg::Twist
wrenchinputgeometry_msgs::msg::Wrench
twist_stampedinputgeometry_msgs::msg::TwistStamped
wrench_stampedinputgeometry_msgs::msg::WrenchStamped
publish_rateinputint
control_frame_idinputstd::string

Definition at line 49 of file publish_velocity_force_command.hpp.

Public Member Typedefs

VelocityForceCommand

using moveit_pro::behaviors::PublishVelocityForceCommand::VelocityForceCommand = moveit_pro_controllers_msgs::msg::VelocityForceCommand

Definition at line 52 of file publish_velocity_force_command.hpp.

Public Constructors

PublishVelocityForceCommand()

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

Declaration at line 54 of file publish_velocity_force_command.hpp, definition at line 49 of file publish_velocity_force_command.cpp.

Public Member Functions

onHalted()

void moveit_pro::behaviors::PublishVelocityForceCommand::onHalted ()

Declaration at line 68 of file publish_velocity_force_command.hpp, definition at line 289 of file publish_velocity_force_command.cpp.

onRunning()

BT::NodeStatus moveit_pro::behaviors::PublishVelocityForceCommand::onRunning ()

Declaration at line 65 of file publish_velocity_force_command.hpp, definition at line 278 of file publish_velocity_force_command.cpp.

onStart()

BT::NodeStatus moveit_pro::behaviors::PublishVelocityForceCommand::onStart ()

Declaration at line 62 of file publish_velocity_force_command.hpp, definition at line 235 of file publish_velocity_force_command.cpp.

Private Member Functions

publishCommand()

void moveit_pro::behaviors::PublishVelocityForceCommand::publishCommand ()

Declaration at line 72 of file publish_velocity_force_command.hpp, definition at line 270 of file publish_velocity_force_command.cpp.

updateCommand()

std::optional< std::string > moveit_pro::behaviors::PublishVelocityForceCommand::updateCommand ()

Declaration at line 75 of file publish_velocity_force_command.hpp, definition at line 102 of file publish_velocity_force_command.cpp.

Private Member Attributes

command_

VelocityForceCommand moveit_pro::behaviors::PublishVelocityForceCommand::command_

Definition at line 79 of file publish_velocity_force_command.hpp.

command_mutex_

std::mutex moveit_pro::behaviors::PublishVelocityForceCommand::command_mutex_

Definition at line 77 of file publish_velocity_force_command.hpp.

command_publisher_

std::shared_ptr<rclcpp::Publisher<moveit_pro_controllers_msgs::msg::VelocityForceCommand> > moveit_pro::behaviors::PublishVelocityForceCommand::command_publisher_

Definition at line 80 of file publish_velocity_force_command.hpp.

timer_

rclcpp::TimerBase::SharedPtr moveit_pro::behaviors::PublishVelocityForceCommand::timer_

Definition at line 78 of file publish_velocity_force_command.hpp.

warned_twist_stamped_deprecated_

bool moveit_pro::behaviors::PublishVelocityForceCommand::warned_twist_stamped_deprecated_ = false

Definition at line 84 of file publish_velocity_force_command.hpp.

warned_wrench_stamped_deprecated_

bool moveit_pro::behaviors::PublishVelocityForceCommand::warned_wrench_stamped_deprecated_ = false

Definition at line 85 of file publish_velocity_force_command.hpp.

Public Static Functions

metadata()

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

Declaration at line 59 of file publish_velocity_force_command.hpp, definition at line 96 of file publish_velocity_force_command.cpp.

providedPorts()

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

Declaration at line 57 of file publish_velocity_force_command.hpp, definition at line 56 of file publish_velocity_force_command.cpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.