Skip to content

Instantly share code, notes, and snippets.

@danielcranston
danielcranston / service_from_service.py
Created October 22, 2025 08:26 — forked from driftregion/service_from_service.py
Calling a ROS2 service from the callback of another service
import time
from threading import Event
from example_interfaces.srv import AddTwoInts
import rclpy
from rclpy.node import Node
from rclpy.callback_groups import ReentrantCallbackGroup
from rclpy.executors import MultiThreadedExecutor, SingleThreadedExecutor