Skip to main content

JointJog Class

A Behavior to forward JointJog commands to a Joint Velocity Controller. More...

Declaration​

class moveit_pro::behaviors::JointJog { ... }

Included Headers​

#include <joint_jog.hpp>

Base class​

classSharedResourcesNode<BehaviorTreeNodeT>

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

Public Constructors Index​

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

Public Member Functions Index​

BT::NodeStatusonStart () override
BT::NodeStatusonRunning () override
voidonHalted () override
std::shared_ptr< moveit_pro::planning_scene_monitor::PlanningSceneMonitor >getPlanningSceneMonitor () const
voidsetParametersFromJointVelocityController (std::string_view joint_model_group_name, const Eigen::VectorXd &controller_max_joint_acceleration, const Eigen::VectorXd &controller_max_joint_velocity)

Private Member Functions Index​

voidsceneUpdateCallback (const moveit_pro::planning_scene_monitor::PlanningSceneMonitor::SceneUpdateType &update_type)
tl::expected< void, std::string >validateInputs () const
voidstopController () const
tl::expected< void, std::string >processParameters ()
tl::expected< void, BT::NodeStatus >handleParameterProcessing ()

Private Member Attributes Index​

std::stringcontroller_name_
std::optional< double >link_padding_
std::stringlast_link_padding_deprecation_warning_
doublestop_safety_factor_ = 1.0
boolinclude_octomap_ = false
std::atomic< bool >skip_collision_checks_ = false
std::shared_ptr< rclcpp::Subscription< control_msgs::msg::JointJog > >command_subscriber_
std::shared_ptr< rclcpp::Publisher< control_msgs::msg::JointJog > >command_publisher_
control_msgs::msg::JointJoglatest_command_
rclcpp::Timetime_last_command_received_
rclcpp::Timetime_last_command_processed_
rclcpp::Timetime_last_command_forwarded_
std::shared_mutexcommand_mutex_
std::shared_ptr< rclcpp::Subscription< moveit_msgs::msg::PlanningScene > >main_scene_subscriber_
std::shared_ptr< moveit_pro::planning_scene_monitor::PlanningSceneMonitor >planning_scene_monitor_
std::atomic< bool >state_prediction_valid_ = true
std::unique_ptr< moveit_pro::base::RobotState >stop_robot_state_
std::shared_ptr< rclcpp::Client< rcl_interfaces::srv::GetParameters > >joint_velocity_controller_parameter_client
std::mutexjvc_parameter_mutex_
boolparameters_received_ = false
boolparameters_processed_ = false
std::stringjoint_model_group_name_
const moveit_pro::base::JointModelGroup *joint_model_group_ = nullptr
Eigen::VectorXdcontroller_max_joint_acceleration_
Eigen::VectorXdcontroller_max_joint_velocity_
rclcpp::Timestart_time_

Public Static Functions Index​

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

Public Static Attributes Index​

static constexpr autokPortIdControllerName = "controller_name"
static constexpr autokPortIdLinkPadding = "link_padding"
static constexpr autokPortIdStopSafetyFactor = "stop_safety_factor"
static constexpr autokPortIdIncludeOctomap = "include_octomap"
static constexpr autokPortIdSkipCollisionChecks = "skip_collision_checks"

Description​

A Behavior to forward JointJog commands to a Joint Velocity Controller.

This Behavior will subscribe to messages of type control_msgs/JointJog, and forward them to a Joint Velocity Controller for execution. The behavior acts as a bridge, forwarding commands to the controller only if they are 'safe' to execute, i.e. not predicted to cause a collision in the near future, or hit joint limits.

The planning group to control is retrieved from the Joint Velocity Controller's (JVC) parameter server, since each JVC instance is configured to control a specific planning group.

A link padding can be specified to virtually increase the size of the robot links for collision checking. A stop safety factor can be specified to increase the time horizon for the stop trajectory collision check.

Data Port NamePort TypeObject Type
controller_nameInputstd::string
collision_check_paramsInputmoveit_studio_msgs::msg::CollisionCheckParams
link_paddingInputdouble (deprecated)
stop_safety_factorInputdouble
include_octomapInputbool
skip_collision_checksInputbool

Definition at line 48 of file joint_jog.hpp.

Public Constructors​

JointJog()​

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

Declaration at line 58 of file joint_jog.hpp, definition at line 91 of file joint_jog.cpp.

Public Member Functions​

getPlanningSceneMonitor()​

std::shared_ptr< moveit_pro::planning_scene_monitor::PlanningSceneMonitor > moveit_pro::behaviors::JointJog::getPlanningSceneMonitor ()
inline

Definition at line 76 of file joint_jog.hpp.

onHalted()​

void moveit_pro::behaviors::JointJog::onHalted ()

Declaration at line 73 of file joint_jog.hpp, definition at line 551 of file joint_jog.cpp.

onRunning()​

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

Declaration at line 69 of file joint_jog.hpp, definition at line 469 of file joint_jog.cpp.

onStart()​

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

Declaration at line 66 of file joint_jog.hpp, definition at line 320 of file joint_jog.cpp.

setParametersFromJointVelocityController()​

void moveit_pro::behaviors::JointJog::setParametersFromJointVelocityController (std::string_view joint_model_group_name, const Eigen::VectorXd & controller_max_joint_acceleration, const Eigen::VectorXd & controller_max_joint_velocity)

Declaration at line 83 of file joint_jog.hpp, definition at line 309 of file joint_jog.cpp.

Private Member Functions​

handleParameterProcessing()​

tl::expected< void, BT::NodeStatus > moveit_pro::behaviors::JointJog::handleParameterProcessing ()

Declaration at line 106 of file joint_jog.hpp, definition at line 432 of file joint_jog.cpp.

processParameters()​

tl::expected< void, std::string > moveit_pro::behaviors::JointJog::processParameters ()

Declaration at line 100 of file joint_jog.hpp, definition at line 163 of file joint_jog.cpp.

sceneUpdateCallback()​

void moveit_pro::behaviors::JointJog::sceneUpdateCallback (const moveit_pro::planning_scene_monitor::PlanningSceneMonitor::SceneUpdateType & update_type)

Declaration at line 90 of file joint_jog.hpp, definition at line 183 of file joint_jog.cpp.

stopController()​

void moveit_pro::behaviors::JointJog::stopController ()

Declaration at line 96 of file joint_jog.hpp, definition at line 154 of file joint_jog.cpp.

validateInputs()​

tl::expected< void, std::string > moveit_pro::behaviors::JointJog::validateInputs ()

Declaration at line 93 of file joint_jog.hpp, definition at line 97 of file joint_jog.cpp.

Private Member Attributes​

command_mutex_​

std::shared_mutex moveit_pro::behaviors::JointJog::command_mutex_
mutable

Definition at line 134 of file joint_jog.hpp.

command_publisher_​

std::shared_ptr<rclcpp::Publisher<control_msgs::msg::JointJog> > moveit_pro::behaviors::JointJog::command_publisher_

Definition at line 125 of file joint_jog.hpp.

command_subscriber_​

std::shared_ptr<rclcpp::Subscription<control_msgs::msg::JointJog> > moveit_pro::behaviors::JointJog::command_subscriber_

Definition at line 124 of file joint_jog.hpp.

controller_max_joint_acceleration_​

Eigen::VectorXd moveit_pro::behaviors::JointJog::controller_max_joint_acceleration_

Definition at line 159 of file joint_jog.hpp.

controller_max_joint_velocity_​

Eigen::VectorXd moveit_pro::behaviors::JointJog::controller_max_joint_velocity_

Definition at line 160 of file joint_jog.hpp.

controller_name_​

std::string moveit_pro::behaviors::JointJog::controller_name_

Definition at line 109 of file joint_jog.hpp.

include_octomap_​

bool moveit_pro::behaviors::JointJog::include_octomap_ = false

Definition at line 117 of file joint_jog.hpp.

joint_model_group_​

const moveit_pro::base::JointModelGroup* moveit_pro::behaviors::JointJog::joint_model_group_ = nullptr

Definition at line 158 of file joint_jog.hpp.

joint_model_group_name_​

std::string moveit_pro::behaviors::JointJog::joint_model_group_name_

Definition at line 157 of file joint_jog.hpp.

joint_velocity_controller_parameter_client​

std::shared_ptr<rclcpp::Client<rcl_interfaces::srv::GetParameters> > moveit_pro::behaviors::JointJog::joint_velocity_controller_parameter_client

Definition at line 151 of file joint_jog.hpp.

jvc_parameter_mutex_​

std::mutex moveit_pro::behaviors::JointJog::jvc_parameter_mutex_

Definition at line 154 of file joint_jog.hpp.

last_link_padding_deprecation_warning_​

std::string moveit_pro::behaviors::JointJog::last_link_padding_deprecation_warning_

Definition at line 115 of file joint_jog.hpp.

latest_command_​

control_msgs::msg::JointJog moveit_pro::behaviors::JointJog::latest_command_

Definition at line 128 of file joint_jog.hpp.

link_padding_​

std::optional<double> moveit_pro::behaviors::JointJog::link_padding_

Definition at line 112 of file joint_jog.hpp.

main_scene_subscriber_​

std::shared_ptr<rclcpp::Subscription<moveit_msgs::msg::PlanningScene> > moveit_pro::behaviors::JointJog::main_scene_subscriber_

Definition at line 137 of file joint_jog.hpp.

parameters_processed_​

bool moveit_pro::behaviors::JointJog::parameters_processed_ = false

Definition at line 156 of file joint_jog.hpp.

parameters_received_​

bool moveit_pro::behaviors::JointJog::parameters_received_ = false

Definition at line 155 of file joint_jog.hpp.

planning_scene_monitor_​

std::shared_ptr<moveit_pro::planning_scene_monitor::PlanningSceneMonitor> moveit_pro::behaviors::JointJog::planning_scene_monitor_

Definition at line 140 of file joint_jog.hpp.

skip_collision_checks_​

std::atomic<bool> moveit_pro::behaviors::JointJog::skip_collision_checks_ = false

Definition at line 121 of file joint_jog.hpp.

start_time_​

rclcpp::Time moveit_pro::behaviors::JointJog::start_time_

Definition at line 163 of file joint_jog.hpp.

state_prediction_valid_​

std::atomic<bool> moveit_pro::behaviors::JointJog::state_prediction_valid_ = true

Definition at line 143 of file joint_jog.hpp.

stop_robot_state_​

std::unique_ptr<moveit_pro::base::RobotState> moveit_pro::behaviors::JointJog::stop_robot_state_

Definition at line 147 of file joint_jog.hpp.

stop_safety_factor_​

double moveit_pro::behaviors::JointJog::stop_safety_factor_ = 1.0

Definition at line 116 of file joint_jog.hpp.

time_last_command_forwarded_​

rclcpp::Time moveit_pro::behaviors::JointJog::time_last_command_forwarded_

Definition at line 131 of file joint_jog.hpp.

time_last_command_processed_​

rclcpp::Time moveit_pro::behaviors::JointJog::time_last_command_processed_

Definition at line 130 of file joint_jog.hpp.

time_last_command_received_​

rclcpp::Time moveit_pro::behaviors::JointJog::time_last_command_received_

Definition at line 129 of file joint_jog.hpp.

Public Static Functions​

metadata()​

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

Declaration at line 63 of file joint_jog.hpp, definition at line 148 of file joint_jog.cpp.

providedPorts()​

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

Declaration at line 61 of file joint_jog.hpp, definition at line 116 of file joint_jog.cpp.

Public Static Attributes​

kPortIdControllerName​

constexpr auto moveit_pro::behaviors::JointJog::kPortIdControllerName = "controller_name"
constexpr static

Definition at line 52 of file joint_jog.hpp.

kPortIdIncludeOctomap​

constexpr auto moveit_pro::behaviors::JointJog::kPortIdIncludeOctomap = "include_octomap"
constexpr static

Definition at line 55 of file joint_jog.hpp.

kPortIdLinkPadding​

constexpr auto moveit_pro::behaviors::JointJog::kPortIdLinkPadding = "link_padding"
constexpr static

Definition at line 53 of file joint_jog.hpp.

kPortIdSkipCollisionChecks​

constexpr auto moveit_pro::behaviors::JointJog::kPortIdSkipCollisionChecks = "skip_collision_checks"
constexpr static

Definition at line 56 of file joint_jog.hpp.

kPortIdStopSafetyFactor​

constexpr auto moveit_pro::behaviors::JointJog::kPortIdStopSafetyFactor = "stop_safety_factor"
constexpr static

Definition at line 54 of file joint_jog.hpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.