Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does Trajectory Execution Manager use MultiThreadedExecutor? #2880

Closed
CihatAltiparmak opened this issue Jun 24, 2024 · 2 comments
Closed
Labels
bug Something isn't working stale Inactive issues and PRs are marked as stale and may be closed automatically.

Comments

@CihatAltiparmak
Copy link
Member

CihatAltiparmak commented Jun 24, 2024

Description

While trying to integrate rmw_zenoh to MoveIt, i have seen that MoveGroup server uses MultiThreadedExecutor. rmw_zenoh doesn't work at the moment because of MultiThreadedExecutor. My aim here is not to report a bug, but to start a discussion about whether it's really necessary to use MultiThreadedExecutor here.

// The default callback group for rclcpp::Node is MutuallyExclusive which means we cannot call
// receiveEvent while processing a different callback. To fix this we create a new callback group (the type is not
// important since we only use it to process one callback) and associate event_topic_subscriber_ with this callback group
auto callback_group = node_->create_callback_group(rclcpp::CallbackGroupType::MutuallyExclusive);
auto options = rclcpp::SubscriptionOptions();
options.callback_group = callback_group;
event_topic_subscriber_ = node_->create_subscription<std_msgs::msg::String>(
EXECUTION_EVENT_TOPIC, rclcpp::SystemDefaultsQoS(),
[this](const std_msgs::msg::String::ConstSharedPtr& event) { return receiveEvent(event); }, options);

rclcpp::executors::MultiThreadedExecutor executor;
move_group::MoveGroupExe mge(moveit_cpp, default_planning_pipeline, debug);
bool monitor_dynamics;
if (nh->get_parameter("monitor_dynamics", monitor_dynamics) && monitor_dynamics)
{
RCLCPP_INFO(nh->get_logger(), "MoveGroup monitors robot dynamics (higher load)");
planning_scene_monitor->getStateMonitor()->enableCopyDynamics(true);
}
planning_scene_monitor->publishDebugInformation(debug);
mge.status();
executor.add_node(nh);
executor.spin();

Your environment

  • ROS Distro: Rolling
  • OS Version: Ubuntu 22.04
  • Build Type: Source
  • main
  • rmw_zenoh
@CihatAltiparmak CihatAltiparmak added the bug Something isn't working label Jun 24, 2024
@CihatAltiparmak CihatAltiparmak changed the title Why does Trajectory Execution use MultiThreadedExecutor? Why does Trajectory Execution Manager use MultiThreadedExecutor? Jun 24, 2024
Copy link

github-actions bot commented Aug 9, 2024

This issue is being labeled as stale because it has been open 45 days with no activity. It will be automatically closed after another 45 days without follow-ups.

@github-actions github-actions bot added the stale Inactive issues and PRs are marked as stale and may be closed automatically. label Aug 9, 2024
Copy link

This issue was closed because it has been stalled for 45 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 26, 2024
@github-project-automation github-project-automation bot moved this to ✅ Done in MoveIt Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale Inactive issues and PRs are marked as stale and may be closed automatically.
Projects
None yet
Development

No branches or pull requests

1 participant