Skip to content

Conversation

@Flova
Copy link
Member

@Flova Flova commented May 29, 2025

Summary

Use the python jazzy events executor for all suitable nodes

Profiling

  • After:
    image

  • Before:
    image

Related issues

Closes #682

Checklist

  • Run colcon build
  • Write documentation
  • Test on your machine
  • Test on the robot
  • Create issues for future work
  • Triage this PR and label it

@github-project-automation github-project-automation bot moved this to 🆕 New in Software May 29, 2025
@Flova Flova moved this from 🆕 New to 👀 In review in Software May 29, 2025
@Flova Flova added the misc label May 29, 2025
@Flova Flova requested review from ayin21, Copilot, jaagut and texhnolyze May 29, 2025 16:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates multiple Python nodes to use the experimental EventsExecutor instead of the MultiThreadedExecutor. The key changes include replacing the executor instantiation and spin logic across various nodes, and in some cases adding a try/except block for graceful shutdown handling.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
bitbots_robot_filter/filter.py Replaces MultiThreadedExecutor with EventsExecutor.
bitbots_ball_filter/ball_filter.py Updates executor usage to EventsExecutor.
bitbots_vision/vision.py Adopts EventsExecutor with try/except for spin.
bitbots_team_communication/bitbots_team_communication/bitbots_team_communication.py Switches to EventsExecutor and adds keyboard interrupt logging.
bitbots_simulation/bitbots_webots_sim/scripts/start_webots_ros_supervisor.py Changes executor usage in threaded spin for supervision.
bitbots_simulation/bitbots_webots_sim/scripts/start_single.py Replaces the executor call by using EventsExecutor in a thread.
bitbots_simulation/bitbots_webots_sim/scripts/start_simulator.py Updates executor and threading for simulation startup.
bitbots_simulation/bitbots_robocup_api/bitbots_robocup_api/command_proxy.py Changes executor creation and integrates a try/except block.
bitbots_navigation/bitbots_path_planning/bitbots_path_planning/path_planning.py Updates executor logic with keyboard interrupt handling.
bitbots_navigation/bitbots_localization_handler/bitbots_localization_handler/localization_handler.py Replaces MultiThreadedExecutor with EventsExecutor (with a naming note).
bitbots_motion/bitbots_hcm/bitbots_hcm/humanoid_control_module.py Uses EventsExecutor in a dedicated spin thread.
bitbots_misc/bitbots_tts/bitbots_tts/tts.py Updates executor to use EventsExecutor.
bitbots_misc/bitbots_teleop/bitbots_teleop/joy_node.py Switches to EventsExecutor and adds logging on shutdown.
Comments suppressed due to low confidence (2)

bitbots_navigation/bitbots_localization_handler/bitbots_localization_handler/localization_handler.py:70

  • [nitpick] Consider renaming the variable 'multi_executor' to 'executor' for clarity since the type of executor has changed, improving code readability and consistency with other files.
multi_executor = EventsExecutor()

bitbots_simulation/bitbots_webots_sim/scripts/start_webots_ros_supervisor.py:41

  • The explicit call to rclpy.shutdown() has been removed; please confirm that the new EventsExecutor-based shutdown process properly terminates all nodes to avoid potential resource leaks.
    # rclpy.shutdown()

Copy link
Member

@jaagut jaagut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On KeyboardInterrupt, sometimes you log something, sometimes not. The log-messages also vary a lot. Please unify this.

@github-project-automation github-project-automation bot moved this from 👀 In review to 🏗 In progress in Software Jun 4, 2025
@Flova Flova requested a review from jaagut June 8, 2025 18:54
@github-project-automation github-project-automation bot moved this from 🏗 In progress to 👀 In review in Software Jun 8, 2025
@Flova Flova merged commit fb3a6ae into main Jun 8, 2025
2 checks passed
@Flova Flova deleted the feature/python_events_executore branch June 8, 2025 19:57
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Software Jun 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Test and use rclpy events executor

3 participants