From 33c799c083ae896d72deaa4f4925cf2fc26537b3 Mon Sep 17 00:00:00 2001 From: Murilo Marinho Date: Wed, 28 Oct 2026 12:31:32 +0000 Subject: [PATCH 1/2] Workspace: annotate the ROS2-derived attributes and local variables The functions are fully annotated; this finishes the other half of 'Take the (type) hint' for the ROS2 objects the examples hand around: what does create_publisher() give you, and what is that request object? - self.publisher/subscription/timer/service_client/service_server/ action_client/action_server annotated with their rclpy classes (Publisher, Subscription, Timer, Client, Service, ActionClient, ActionServer, Future); - message/service/action locals (Goal(), Request(), Feedback(), Result(), EntityWrench(), TransformStamped(), ...) annotated with their generated types; - the two service clients' self.future gets rclpy.task.Future, matching the send_goal_future/get_result_future declarations in the action clients. Types are deliberately bare (Publisher, not Publisher[AmazingQuote]): rclpy's classes are not Generic in Jazzy, and annotations on self.* targets are evaluated at runtime, so the subscript would raise TypeError. The concrete message type is visible at the call itself (create_publisher(msg_type=AmazingQuote, ...)), which keeps the annotation honest and the diff small. geometry_msgs is now a real import in the gazebo package (the transform lookup result), so package.xml declares it per 5.1. --- .../src/python_package_that_uses_gazebo/package.xml | 1 + .../control_shape_thrust_node.py | 11 +++++++---- .../send_poses_to_gazebo_node.py | 5 +++-- .../send_wrenches_to_gazebo_node.py | 5 +++-- .../create_stamped_transforms_node.py | 2 +- .../nav2_initial_pose_publisher_node.py | 5 +++-- .../nav2_navigate_to_pose_action_client_node.py | 8 ++++---- .../amazing_quote_configurable_publisher_node.py | 8 +++++--- .../tf2_broadcaster_node.py | 5 +++-- .../python_package_that_uses_tf2/tf2_listener_node.py | 6 ++++-- .../move_straight_in_2d_action_client_node.py | 7 ++++--- .../move_straight_in_2d_action_server_node.py | 8 ++++---- .../library_user_node.py | 3 ++- .../amazing_quote_publisher_node.py | 8 +++++--- .../amazing_quote_subscriber_node.py | 3 ++- .../add_points_service_client_just_once_node.py | 7 ++++--- .../add_points_service_client_node.py | 10 ++++++---- .../add_points_service_server_node.py | 3 ++- .../python_package_with_a_node/print_forever_node.py | 3 ++- 19 files changed, 65 insertions(+), 43 deletions(-) diff --git a/ros2_tutorial_workspace/src/python_package_that_uses_gazebo/package.xml b/ros2_tutorial_workspace/src/python_package_that_uses_gazebo/package.xml index c934a61..52c132a 100644 --- a/ros2_tutorial_workspace/src/python_package_that_uses_gazebo/package.xml +++ b/ros2_tutorial_workspace/src/python_package_that_uses_gazebo/package.xml @@ -8,6 +8,7 @@ TODO: License declaration rclpy + geometry_msgs ros_gz_interfaces tf2_ros diff --git a/ros2_tutorial_workspace/src/python_package_that_uses_gazebo/python_package_that_uses_gazebo/control_shape_thrust_node.py b/ros2_tutorial_workspace/src/python_package_that_uses_gazebo/python_package_that_uses_gazebo/control_shape_thrust_node.py index 00c8e0f..51250a5 100644 --- a/ros2_tutorial_workspace/src/python_package_that_uses_gazebo/python_package_that_uses_gazebo/control_shape_thrust_node.py +++ b/ros2_tutorial_workspace/src/python_package_that_uses_gazebo/python_package_that_uses_gazebo/control_shape_thrust_node.py @@ -26,6 +26,9 @@ import rclpy from rclpy.node import Node +from geometry_msgs.msg import TransformStamped +from rclpy.publisher import Publisher +from rclpy.timer import Timer from rclpy.executors import ExternalShutdownException import tf2_ros @@ -44,7 +47,7 @@ def __init__(self) -> None: self._gazebo_entity_id = 9 # Find this in Gazebo # Set up the wrench publisher - self.wrench_publisher = self.create_publisher( + self.wrench_publisher: Publisher = self.create_publisher( msg_type=EntityWrench, topic=self._wrench_topic, qos_profile=1) @@ -63,7 +66,7 @@ def __init__(self) -> None: self.child_name = self._gazebo_entity_name # It will be populated this way by Gazebo self.timer_period: float = 0.001 - self.timer = self.create_timer(self.timer_period, self.timer_callback) + self.timer: Timer = self.create_timer(self.timer_period, self.timer_callback) def compute_control_action(self, current: float, target: float, proportional_gain: float = 5.0) -> float: @@ -74,7 +77,7 @@ def compute_control_action(self, current: float, target: float, def send_force_to_gazebo(self, force: tuple[float, float, float] = (0, 0, 0)) -> None: """Basic method to send force to an entity.""" - ew = EntityWrench() + ew: EntityWrench = EntityWrench() # Add the entity id. The entity.name is currently ignored by Gazebo. ew.entity.id = self._gazebo_entity_id @@ -95,7 +98,7 @@ def timer_callback(self) -> None: """The timer callback will look up the transforms and send the next control action.""" try: - tfs = self.transform_listener_buffer.lookup_transform( + tfs: TransformStamped = self.transform_listener_buffer.lookup_transform( self.parent_name, self.child_name, rclpy.time.Time()) diff --git a/ros2_tutorial_workspace/src/python_package_that_uses_gazebo/python_package_that_uses_gazebo/send_poses_to_gazebo_node.py b/ros2_tutorial_workspace/src/python_package_that_uses_gazebo/python_package_that_uses_gazebo/send_poses_to_gazebo_node.py index 057155a..71cb7fb 100644 --- a/ros2_tutorial_workspace/src/python_package_that_uses_gazebo/python_package_that_uses_gazebo/send_poses_to_gazebo_node.py +++ b/ros2_tutorial_workspace/src/python_package_that_uses_gazebo/python_package_that_uses_gazebo/send_poses_to_gazebo_node.py @@ -26,6 +26,7 @@ import rclpy from rclpy.node import Node +from rclpy.client import Client from rclpy.executors import ExternalShutdownException from rclpy.task import Future @@ -35,7 +36,7 @@ class SendPosesToGazeboNode(Node): def __init__(self) -> None: super().__init__('send_poses_to_gazebo_node') - self.service_client = self.create_client( + self.service_client: Client = self.create_client( srv_type=SetEntityPose, srv_name='/world/shapes_with_tf2_and_wrench/set_pose') @@ -46,7 +47,7 @@ def __init__(self) -> None: def send_pose_to_gazebo(self) -> Future[SetEntityPose.Response]: """Sample method sending a pose to and entity in Gazebo.""" - request = SetEntityPose.Request() + request: SetEntityPose.Request = SetEntityPose.Request() # Add the entity name. For this one, Gazebo accepts the name. :) request.entity.name = "box" diff --git a/ros2_tutorial_workspace/src/python_package_that_uses_gazebo/python_package_that_uses_gazebo/send_wrenches_to_gazebo_node.py b/ros2_tutorial_workspace/src/python_package_that_uses_gazebo/python_package_that_uses_gazebo/send_wrenches_to_gazebo_node.py index 1f37e4d..fbb508f 100644 --- a/ros2_tutorial_workspace/src/python_package_that_uses_gazebo/python_package_that_uses_gazebo/send_wrenches_to_gazebo_node.py +++ b/ros2_tutorial_workspace/src/python_package_that_uses_gazebo/python_package_that_uses_gazebo/send_wrenches_to_gazebo_node.py @@ -26,6 +26,7 @@ import rclpy from rclpy.node import Node +from rclpy.publisher import Publisher from rclpy.executors import ExternalShutdownException class SendWrenchesToGazeboNode(Node): @@ -34,7 +35,7 @@ class SendWrenchesToGazeboNode(Node): def __init__(self) -> None: super().__init__('send_wrenches_to_gazebo_node') - self.publisher = self.create_publisher( + self.publisher: Publisher = self.create_publisher( msg_type=EntityWrench, topic='/world/shapes_with_tf2_and_wrench/wrench', qos_profile=1) @@ -46,7 +47,7 @@ def __init__(self) -> None: def send_wrench_to_gazebo(self) -> None: """Basic method publishing wrenches to Gazebo.""" - ew = EntityWrench() + ew: EntityWrench = EntityWrench() # Add the entity id. The entity.name is currently ignored by Gazebo. ew.entity.id = 9 diff --git a/ros2_tutorial_workspace/src/python_package_that_uses_geometry_msgs/python_package_that_uses_geometry_msgs/create_stamped_transforms_node.py b/ros2_tutorial_workspace/src/python_package_that_uses_geometry_msgs/python_package_that_uses_geometry_msgs/create_stamped_transforms_node.py index a1d97bc..b05568f 100644 --- a/ros2_tutorial_workspace/src/python_package_that_uses_geometry_msgs/python_package_that_uses_geometry_msgs/create_stamped_transforms_node.py +++ b/ros2_tutorial_workspace/src/python_package_that_uses_geometry_msgs/python_package_that_uses_geometry_msgs/create_stamped_transforms_node.py @@ -36,7 +36,7 @@ def __init__(self) -> None: def create_and_print_stamped_transform(self) -> None: """Basic method showing the creation of TransformStamped objects.""" - tfs = TransformStamped() + tfs: TransformStamped = TransformStamped() # Initialize header with ## Timestamp equal to the current clock time diff --git a/ros2_tutorial_workspace/src/python_package_that_uses_nav2/python_package_that_uses_nav2/nav2_initial_pose_publisher_node.py b/ros2_tutorial_workspace/src/python_package_that_uses_nav2/python_package_that_uses_nav2/nav2_initial_pose_publisher_node.py index b8ea803..67a40dd 100644 --- a/ros2_tutorial_workspace/src/python_package_that_uses_nav2/python_package_that_uses_nav2/nav2_initial_pose_publisher_node.py +++ b/ros2_tutorial_workspace/src/python_package_that_uses_nav2/python_package_that_uses_nav2/nav2_initial_pose_publisher_node.py @@ -25,6 +25,7 @@ import rclpy from rclpy.node import Node +from rclpy.publisher import Publisher from rclpy.executors import ExternalShutdownException from geometry_msgs.msg import PoseWithCovarianceStamped @@ -36,7 +37,7 @@ def __init__(self) -> None: self._topic = '/initialpose' - self.publisher = self.create_publisher( + self.publisher: Publisher = self.create_publisher( msg_type=PoseWithCovarianceStamped, topic=self._topic, qos_profile=1) @@ -53,7 +54,7 @@ def send_initial_pose_with_covariance(self) -> None: self.get_logger().info(f"Publishing pose to topic: {self._topic}.") - pwcs = PoseWithCovarianceStamped() + pwcs: PoseWithCovarianceStamped = PoseWithCovarianceStamped() pwcs.header.stamp = self.get_clock().now().to_msg() pwcs.header.frame_id = 'map' diff --git a/ros2_tutorial_workspace/src/python_package_that_uses_nav2/python_package_that_uses_nav2/nav2_navigate_to_pose_action_client_node.py b/ros2_tutorial_workspace/src/python_package_that_uses_nav2/python_package_that_uses_nav2/nav2_navigate_to_pose_action_client_node.py index 7435699..264c34d 100644 --- a/ros2_tutorial_workspace/src/python_package_that_uses_nav2/python_package_that_uses_nav2/nav2_navigate_to_pose_action_client_node.py +++ b/ros2_tutorial_workspace/src/python_package_that_uses_nav2/python_package_that_uses_nav2/nav2_navigate_to_pose_action_client_node.py @@ -37,13 +37,13 @@ class Nav2NavigateToPoseActionClient(Node): def __init__(self) -> None: super().__init__('nav2_navigate_to_pose_action_client') - self.action_client = ActionClient(self, NavigateToPose, '/navigate_to_pose') + self.action_client: ActionClient = ActionClient(self, NavigateToPose, '/navigate_to_pose') self.send_goal_future: Future # This will be used in `send_goal` self.get_result_future: Future # This will be used in 'goal_response_callback' def send_goal_async(self, desired_pose: Pose, behaviour_tree: str) -> None: - goal_msg = NavigateToPose.Goal() + goal_msg: NavigateToPose.Goal = NavigateToPose.Goal() goal_msg.pose.header.stamp = self.get_clock().now().to_msg() goal_msg.pose.header.frame_id = 'map' goal_msg.pose.pose = desired_pose @@ -85,9 +85,9 @@ def main(args: list[str] | None = None) -> None: try: rclpy.init(args=args) - node = Nav2NavigateToPoseActionClient() + node: Nav2NavigateToPoseActionClient = Nav2NavigateToPoseActionClient() - desired_pose = Pose() + desired_pose: Pose = Pose() desired_pose.position.x = 1.0 desired_pose.position.y = -1.0 desired_pose.orientation.w = 1.0 diff --git a/ros2_tutorial_workspace/src/python_package_that_uses_parameters_and_launch_files/python_package_that_uses_parameters_and_launch_files/amazing_quote_configurable_publisher_node.py b/ros2_tutorial_workspace/src/python_package_that_uses_parameters_and_launch_files/python_package_that_uses_parameters_and_launch_files/amazing_quote_configurable_publisher_node.py index 264706c..b435e82 100644 --- a/ros2_tutorial_workspace/src/python_package_that_uses_parameters_and_launch_files/python_package_that_uses_parameters_and_launch_files/amazing_quote_configurable_publisher_node.py +++ b/ros2_tutorial_workspace/src/python_package_that_uses_parameters_and_launch_files/python_package_that_uses_parameters_and_launch_files/amazing_quote_configurable_publisher_node.py @@ -23,6 +23,8 @@ """ import rclpy from rclpy.node import Node +from rclpy.publisher import Publisher +from rclpy.timer import Timer from rclpy.executors import ExternalShutdownException from package_with_interfaces.msg import AmazingQuote @@ -43,12 +45,12 @@ def __init__(self) -> None: self.declare_parameter('period', 0.5) timer_period: float = self.get_parameter('period').get_parameter_value().double_value - self.configurable_amazing_quote_publisher = self.create_publisher( + self.configurable_amazing_quote_publisher: Publisher = self.create_publisher( msg_type=AmazingQuote, topic=topic_name, qos_profile=1) - self.timer = self.create_timer(timer_period, self.timer_callback) + self.timer: Timer = self.create_timer(timer_period, self.timer_callback) self.incremental_id: int = 0 @@ -58,7 +60,7 @@ def timer_callback(self) -> None: quote: str = self.get_parameter('quote').get_parameter_value().string_value philosopher_name: str = self.get_parameter('philosopher_name').get_parameter_value().string_value - amazing_quote = AmazingQuote() + amazing_quote: AmazingQuote = AmazingQuote() amazing_quote.id = self.incremental_id amazing_quote.quote = quote amazing_quote.philosopher_name = philosopher_name diff --git a/ros2_tutorial_workspace/src/python_package_that_uses_tf2/python_package_that_uses_tf2/tf2_broadcaster_node.py b/ros2_tutorial_workspace/src/python_package_that_uses_tf2/python_package_that_uses_tf2/tf2_broadcaster_node.py index 13025b2..8309379 100644 --- a/ros2_tutorial_workspace/src/python_package_that_uses_tf2/python_package_that_uses_tf2/tf2_broadcaster_node.py +++ b/ros2_tutorial_workspace/src/python_package_that_uses_tf2/python_package_that_uses_tf2/tf2_broadcaster_node.py @@ -26,6 +26,7 @@ import rclpy from rclpy.node import Node +from rclpy.timer import Timer from rclpy.executors import ExternalShutdownException import tf2_ros @@ -45,7 +46,7 @@ def __init__(self) -> None: self.timer_period: float = 0.01 self.timer_elapsed_time: float = 0 - self.timer = self.create_timer(self.timer_period, self.timer_callback) + self.timer: Timer = self.create_timer(self.timer_period, self.timer_callback) def timer_callback(self) -> None: # We define some parameters of our trajectory. @@ -55,7 +56,7 @@ def timer_callback(self) -> None: trajectory_frequency = 0.1 # Create an instance of a TransformStamped, used by the broadcaster - tfs = TransformStamped() + tfs: TransformStamped = TransformStamped() ## Initialize header with # Timestamp equal to the current clock time diff --git a/ros2_tutorial_workspace/src/python_package_that_uses_tf2/python_package_that_uses_tf2/tf2_listener_node.py b/ros2_tutorial_workspace/src/python_package_that_uses_tf2/python_package_that_uses_tf2/tf2_listener_node.py index 2c5efc8..4bdfd0f 100644 --- a/ros2_tutorial_workspace/src/python_package_that_uses_tf2/python_package_that_uses_tf2/tf2_listener_node.py +++ b/ros2_tutorial_workspace/src/python_package_that_uses_tf2/python_package_that_uses_tf2/tf2_listener_node.py @@ -23,6 +23,8 @@ """ import rclpy from rclpy.node import Node +from geometry_msgs.msg import TransformStamped +from rclpy.timer import Timer from rclpy.executors import ExternalShutdownException import tf2_ros @@ -42,12 +44,12 @@ def __init__(self) -> None: self.child_name = "robot_1" self.timer_period: float = 0.1 - self.timer = self.create_timer(self.timer_period, self.timer_callback) + self.timer: Timer = self.create_timer(self.timer_period, self.timer_callback) def timer_callback(self) -> None: try: - tfs = self.transform_listener_buffer.lookup_transform( + tfs: TransformStamped = self.transform_listener_buffer.lookup_transform( self.parent_name, self.child_name, rclpy.time.Time()) diff --git a/ros2_tutorial_workspace/src/python_package_that_uses_the_actions/python_package_that_uses_the_actions/move_straight_in_2d_action_client_node.py b/ros2_tutorial_workspace/src/python_package_that_uses_the_actions/python_package_that_uses_the_actions/move_straight_in_2d_action_client_node.py index 956bccb..8edf86a 100644 --- a/ros2_tutorial_workspace/src/python_package_that_uses_the_actions/python_package_that_uses_the_actions/move_straight_in_2d_action_client_node.py +++ b/ros2_tutorial_workspace/src/python_package_that_uses_the_actions/python_package_that_uses_the_actions/move_straight_in_2d_action_client_node.py @@ -37,13 +37,14 @@ class MoveStraightIn2DActionClientNode(Node): def __init__(self) -> None: super().__init__('move_straight_in_2d_action_client') - self.action_client = ActionClient(self, MoveStraightIn2D, '/move_straight_in_2d') + self.action_client: ActionClient = ActionClient( + self, MoveStraightIn2D, '/move_straight_in_2d') self.send_goal_future: Future # This will be used in `send_goal` self.get_result_future: Future # This will be used in 'goal_response_callback' def send_goal_async(self, desired_position: Point) -> None: - goal_msg = MoveStraightIn2D.Goal() + goal_msg: MoveStraightIn2D.Goal = MoveStraightIn2D.Goal() goal_msg.desired_position = desired_position while not self.action_client.wait_for_server(timeout_sec=1.0): @@ -85,7 +86,7 @@ def main(args: list[str] | None = None) -> None: node = MoveStraightIn2DActionClientNode() # Send the goal once and then do nothing until the user shuts this node down. - desired_position = Point() + desired_position: Point = Point() desired_position.x = 1.0 desired_position.y = -1.0 node.send_goal_async(desired_position) diff --git a/ros2_tutorial_workspace/src/python_package_that_uses_the_actions/python_package_that_uses_the_actions/move_straight_in_2d_action_server_node.py b/ros2_tutorial_workspace/src/python_package_that_uses_the_actions/python_package_that_uses_the_actions/move_straight_in_2d_action_server_node.py index 1cdaabc..13ebc12 100644 --- a/ros2_tutorial_workspace/src/python_package_that_uses_the_actions/python_package_that_uses_the_actions/move_straight_in_2d_action_server_node.py +++ b/ros2_tutorial_workspace/src/python_package_that_uses_the_actions/python_package_that_uses_the_actions/move_straight_in_2d_action_server_node.py @@ -39,11 +39,11 @@ class MoveStraightIn2DActionServerNode(Node): def __init__(self) -> None: super().__init__('move_straight_in_2d_action_server') - self.current_position = Point() + self.current_position: Point = Point() self.MAX_ITERATIONS: int = 100 self.sampling_time: float = 0.01 - self.action_server = ActionServer( + self.action_server: ActionServer = ActionServer( self, MoveStraightIn2D, '/move_straight_in_2d', @@ -93,7 +93,7 @@ def execute_callback(self, goal: ServerGoalHandle) -> MoveStraightIn2D.Result: self.get_logger().info(f'current_position is {self.current_position}.') self.get_logger().info(f'desired_position set to {desired_position}.') - feedback_msg = MoveStraightIn2D.Feedback() + feedback_msg: MoveStraightIn2D.Feedback = MoveStraightIn2D.Feedback() # Let's limit the maximum number of iterations this can accept for i in range(self.MAX_ITERATIONS): @@ -111,7 +111,7 @@ def execute_callback(self, goal: ServerGoalHandle) -> MoveStraightIn2D.Result: # A sleep illustrating the time it would take in real life for a robot to move time.sleep(self.sampling_time) - result = MoveStraightIn2D.Result() + result: MoveStraightIn2D.Result = MoveStraightIn2D.Result() result.final_position = self.current_position return result diff --git a/ros2_tutorial_workspace/src/python_package_that_uses_the_library/python_package_that_uses_the_library/library_user_node.py b/ros2_tutorial_workspace/src/python_package_that_uses_the_library/python_package_that_uses_the_library/library_user_node.py index 89bbdef..8aa5a6e 100644 --- a/ros2_tutorial_workspace/src/python_package_that_uses_the_library/python_package_that_uses_the_library/library_user_node.py +++ b/ros2_tutorial_workspace/src/python_package_that_uses_the_library/python_package_that_uses_the_library/library_user_node.py @@ -26,6 +26,7 @@ import rclpy from rclpy.node import Node +from rclpy.timer import Timer from rclpy.executors import ExternalShutdownException from python_package_with_a_library.sample_python_library import SampleClass, sample_function_for_square_of_sum @@ -36,7 +37,7 @@ class LibraryUser(Node): def __init__(self) -> None: super().__init__('library_user') timer_period: float = 0.5 - self.timer = self.create_timer(timer_period, self.timer_callback) + self.timer: Timer = self.create_timer(timer_period, self.timer_callback) def timer_callback(self) -> None: """ diff --git a/ros2_tutorial_workspace/src/python_package_that_uses_the_messages/python_package_that_uses_the_messages/amazing_quote_publisher_node.py b/ros2_tutorial_workspace/src/python_package_that_uses_the_messages/python_package_that_uses_the_messages/amazing_quote_publisher_node.py index 1fde6ac..b07b370 100644 --- a/ros2_tutorial_workspace/src/python_package_that_uses_the_messages/python_package_that_uses_the_messages/amazing_quote_publisher_node.py +++ b/ros2_tutorial_workspace/src/python_package_that_uses_the_messages/python_package_that_uses_the_messages/amazing_quote_publisher_node.py @@ -23,6 +23,8 @@ """ import rclpy from rclpy.node import Node +from rclpy.publisher import Publisher +from rclpy.timer import Timer from rclpy.executors import ExternalShutdownException from package_with_interfaces.msg import AmazingQuote @@ -33,20 +35,20 @@ class AmazingQuotePublisherNode(Node): def __init__(self) -> None: super().__init__('amazing_quote_publisher_node') - self.amazing_quote_publisher = self.create_publisher( + self.amazing_quote_publisher: Publisher = self.create_publisher( msg_type=AmazingQuote, topic='/amazing_quote', qos_profile=1) timer_period: float = 0.5 - self.timer = self.create_timer(timer_period, self.timer_callback) + self.timer: Timer = self.create_timer(timer_period, self.timer_callback) self.incremental_id: int = 0 def timer_callback(self) -> None: """Method that is periodically called by the timer.""" - amazing_quote = AmazingQuote() + amazing_quote: AmazingQuote = AmazingQuote() amazing_quote.id = self.incremental_id amazing_quote.quote = 'Use the force, Pikachu!' amazing_quote.philosopher_name = 'Uncle Ben' diff --git a/ros2_tutorial_workspace/src/python_package_that_uses_the_messages/python_package_that_uses_the_messages/amazing_quote_subscriber_node.py b/ros2_tutorial_workspace/src/python_package_that_uses_the_messages/python_package_that_uses_the_messages/amazing_quote_subscriber_node.py index 1ab5bde..731c7be 100644 --- a/ros2_tutorial_workspace/src/python_package_that_uses_the_messages/python_package_that_uses_the_messages/amazing_quote_subscriber_node.py +++ b/ros2_tutorial_workspace/src/python_package_that_uses_the_messages/python_package_that_uses_the_messages/amazing_quote_subscriber_node.py @@ -23,6 +23,7 @@ """ import rclpy from rclpy.node import Node +from rclpy.subscription import Subscription from rclpy.executors import ExternalShutdownException from package_with_interfaces.msg import AmazingQuote @@ -32,7 +33,7 @@ class AmazingQuoteSubscriberNode(Node): def __init__(self) -> None: super().__init__('amazing_quote_subscriber_node') - self.amazing_quote_subscriber = self.create_subscription( + self.amazing_quote_subscriber: Subscription = self.create_subscription( msg_type=AmazingQuote, topic='/amazing_quote', callback=self.amazing_quote_subscriber_callback, diff --git a/ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_client_just_once_node.py b/ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_client_just_once_node.py index afea355..061dc2c 100644 --- a/ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_client_just_once_node.py +++ b/ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_client_just_once_node.py @@ -26,6 +26,7 @@ import rclpy from rclpy.task import Future from rclpy.node import Node +from rclpy.client import Client from rclpy.executors import ExternalShutdownException from package_with_interfaces.srv import AddPoints @@ -37,7 +38,7 @@ class AddPointsServiceClientJustOnceNode(Node): def __init__(self) -> None: super().__init__('add_points_service_client_just_once') - self.service_client = self.create_client( + self.service_client: Client = self.create_client( srv_type=AddPoints, srv_name='/add_points') @@ -48,7 +49,7 @@ def __init__(self) -> None: self.future: Future = None # Create service request - request = AddPoints.Request() + request: AddPoints.Request = AddPoints.Request() request.a.x = random.uniform(0, 1000) request.a.y = random.uniform(0, 1000) @@ -59,7 +60,7 @@ def __init__(self) -> None: request.b.z = random.uniform(0, 1000) # Call the service async and set the done callback - self.future = self.service_client.call_async(request) + self.future: Future = self.service_client.call_async(request) self.future.add_done_callback(self.process_response) def process_response(self, future: Future) -> None: diff --git a/ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_client_node.py b/ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_client_node.py index 77fe46c..dd1b884 100644 --- a/ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_client_node.py +++ b/ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_client_node.py @@ -26,6 +26,8 @@ import rclpy from rclpy.task import Future from rclpy.node import Node +from rclpy.client import Client +from rclpy.timer import Timer from rclpy.executors import ExternalShutdownException from package_with_interfaces.srv import AddPoints @@ -37,7 +39,7 @@ class AddPointsServiceClientNode(Node): def __init__(self) -> None: super().__init__('add_points_service_client') - self.service_client = self.create_client( + self.service_client: Client = self.create_client( srv_type=AddPoints, srv_name='/add_points') @@ -47,14 +49,14 @@ def __init__(self) -> None: self.future: Future = None timer_period: float = 0.5 - self.timer = self.create_timer( + self.timer: Timer = self.create_timer( timer_period_sec=timer_period, callback=self.timer_callback) def timer_callback(self) -> None: """Method that is periodically called by the timer.""" - request = AddPoints.Request() + request: AddPoints.Request = AddPoints.Request() request.a.x = random.uniform(0, 1000) request.a.y = random.uniform(0, 1000) @@ -68,7 +70,7 @@ def timer_callback(self) -> None: self.future.cancel() # Cancel the future. The callback will be called with Future.result == None. self.get_logger().warn("Service Future canceled. The Node took too long to process the service call." "Is the Service Server still alive?") - self.future = self.service_client.call_async(request) + self.future: Future = self.service_client.call_async(request) self.future.add_done_callback(self.process_response) def process_response(self, future: Future) -> None: diff --git a/ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_server_node.py b/ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_server_node.py index b7d6db2..9e422ae 100644 --- a/ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_server_node.py +++ b/ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_server_node.py @@ -23,6 +23,7 @@ """ import rclpy from rclpy.node import Node +from rclpy.service import Service from rclpy.executors import ExternalShutdownException from package_with_interfaces.srv import AddPoints @@ -33,7 +34,7 @@ class AddPointsServiceServerNode(Node): def __init__(self) -> None: super().__init__('add_points_service_server') - self.service_server = self.create_service( + self.service_server: Service = self.create_service( srv_type=AddPoints, srv_name='/add_points', callback=self.add_points_service_callback) diff --git a/ros2_tutorial_workspace/src/python_package_with_a_node/python_package_with_a_node/print_forever_node.py b/ros2_tutorial_workspace/src/python_package_with_a_node/python_package_with_a_node/print_forever_node.py index 4a95e95..6bc787f 100644 --- a/ros2_tutorial_workspace/src/python_package_with_a_node/python_package_with_a_node/print_forever_node.py +++ b/ros2_tutorial_workspace/src/python_package_with_a_node/python_package_with_a_node/print_forever_node.py @@ -23,6 +23,7 @@ """ import rclpy from rclpy.node import Node +from rclpy.timer import Timer from rclpy.executors import ExternalShutdownException @@ -32,7 +33,7 @@ class PrintForever(Node): def __init__(self) -> None: super().__init__('print_forever') timer_period: float = 0.5 - self.timer = self.create_timer(timer_period, self.timer_callback) + self.timer: Timer = self.create_timer(timer_period, self.timer_callback) self.print_count: int = 0 def timer_callback(self) -> None: From f48cac47199da25aebff70fbc82d414a9d80b8d1 Mon Sep 17 00:00:00 2001 From: Murilo Marinho Date: Wed, 28 Oct 2026 12:31:32 +0000 Subject: [PATCH 2/2] Docs: re-anchor literalinclude ranges for the ROS2-annotated examples The new rclpy imports and one wrapped ActionClient call shifted the example files by 1-3 lines; the 52 excerpt ranges in nine pages were re-anchored by content (HEAD block -> new position), including one emphasize-lines set in action_clients.rst that now highlights the wrapped constructor and the two future declarations. --- docs/.DS_Store | Bin 0 -> 8196 bytes docs/graphs/network.mmd.svg | 1 + docs/graphs/network.png | Bin 0 -> 21934 bytes docs/graphs/test.png | Bin 0 -> 2450 bytes docs/source/action_clients.rst | 14 +++++----- .../secret_message_decrypted.txt | 1 + docs/source/gazebo/custom_nodes.rst | 12 ++++---- docs/source/navigation/custom_nodes.rst | 4 +-- docs/source/parameters_and_launch.rst | 6 ++-- docs/source/publishers_and_subscribers.rst | 14 +++++----- docs/source/python_node_explained.rst | 14 +++++----- docs/source/service_servers_and_clients.rst | 26 +++++++++--------- docs/source/transformations/tf2.rst | 12 ++++---- docs/source/using_python_library.rst | 4 +-- 14 files changed, 55 insertions(+), 53 deletions(-) create mode 100644 docs/.DS_Store create mode 100644 docs/graphs/network.mmd.svg create mode 100644 docs/graphs/network.png create mode 100644 docs/graphs/test.png create mode 100644 docs/source/cybersecurity/secret_message_decrypted.txt diff --git a/docs/.DS_Store b/docs/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..9717f5129f7c8bb83d02f71ba5de5b8afbec1ce6 GIT binary patch literal 8196 zcmeHMU2GIp6uxI#;Epi%wm>aqNJkeGWT~YfKS9m*2M{O}*+RE1u+Hv|?S$ExvNOAj zV8bSAP%--CA1^)_j1uF6f8oU+6b)}isDIH1O$~t0nb=*WaXUY*XiBK5MG5Fn$O!Q>Wq&l|c$q6^ zM~Wx|Q3j$6L>Y)O5M|(c$N)aGd81Q2_oX%JqYOkD_+Ms#-yaM-xJ-nyBBi)>U?)ld zl)MBG4aZmq2p=PqiBMLg6t1|YtR5hAg|Nf`>5g`TPe+*uWkpKqPC&X72zQ3CLIJTm z`Wa$6frOM%A7voQz?B)`^qEeENr9MTbW;6(GBfJfe$dwT6(}{e)27d$Gw4jZCpqGk zlYto&{Z6wm#LxOX&&gEBW@eXdmD6lam*)ni?OFxlVCO8Hvb*1Qb6&aAE4n#f_$H-+ zs#Hz0rbCC?*RF{h?d_|^;>Mx1?QL;m<%(5fV=A2+yKCK!^gbu=dQZtPAiNb2ZBkfA zC&%RYr7rnRq9$35>APx7>P<6eX*cVsfz;rTwkORRN_hFbqk-+Y{w}NFqfE0pAH&>~ z_1x_Ri`)CNo>R=bewx*1O($D)%)sh!oTPow@(0ZWeb#}1kGW&E;5p8A&$s!C1F2vt zQ)#tX;CYadAIo1QoBXS>5Y%XTgp=`Y#7opG!_*UVdLJ;c@VdCl{gzCdrOn&iaG zj+Dh{s+h6&7wzET@!9naOw(fvRm$Goox>~I>gD)OIbqTD*kVeDxW21kVK3F19$$tI zW}lB2E|<`jx2r1i`}QFaq^q`SHC0(|r(6<7W;FgYD4wbBV{=6+cx<2TSm<6l1jL2kXDHZzd zs29I7TKGEab9UerLSvsWGTSZL2z&e$CHg6)vBYADy;v23v5&G9F_wvrCE7v@B`stn z*+90D49SzjNA;W2m|j=K4bHw4|jtrG;B+jvXUt+y|2yBleD35F82 zRiOTp00Q$9m?AJQaB&s9>I<|MV<(crI&hhS6S>P~aN<&qZv8fGp~0phZRF`4+7g3J zN6N_4xY24b1(_;Omm4cIR)ahgq}OK|ts0fXwc0w3)gm9&aUJQQX)Ot4ClOn88r=rt z?7D_H|C;o$p4oD)l_d*&>$iP0xgA1dG^n>sS zjKN{3z>{zkasCWE3ojzhkHIT&99|V@e+%A5w7-W~KLsDdY4{XAgU{g`_z}*-g-Iyh zIuXV2>tqy{k_FfC++oyLkw4MphCi#35j64ofBn?o|8Mv>qX41|L>ZVm15n$Y?CwPS zRQEYvYa4hxhzDi;&nTE R{$I2A-01l)Kz|){e*EnterpriseIntranet?ComputerRobot 1Robot 1Intranet \ No newline at end of file diff --git a/docs/graphs/network.png b/docs/graphs/network.png new file mode 100644 index 0000000000000000000000000000000000000000..66a449b3c06530c35fc8b1ed6c3cee1411c14bc9 GIT binary patch literal 21934 zcmdSBbzD^4zc!56QqoB3Al)rU-8hm1NQgAj-QB2wgOoG~4BgV*C?EpjfRuE1ch5X) zyzldzbDsA+zjNNt``0^vuwmGH?X|yat#4fGx^~D5B^kVXl=rZ(u<+z$p{iI|*Y9It zT}!)z4Ze|_&x!ztYtE`NQdlKFsn@Wu9%9Ks|5Eoz*_`t9A$CPc?4CUCOU<>_merrudoK~_2Npl<@!<{3 zFWOIUz%a+Z9=^u(^A7ekVsMbWeE3!b=C2Gn%OSa?jW7(^& zUmLb4Dqt6lviM4EV`? zTa_wBam;ZoGk&Hym4!Vg6ZR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R(#Qg#IBXnF(a={-lAsM;Ht}f?d8fmn=iWO4~@VEun+(JqW0TG zAHhElF%cGMIBOGJPR7W@rZ)3qpC`L$=%NyDnHf}VZ+^RS#g%3oni!|Wp83jH=ofo- z$b%xgnK>}!MkaR&M?E5yw6X4l@^G?7^7{=`kIO?r-UY0$b737$2o$L1?tl zP+7;-ICR20*l|RUoJ;;xB%YrC${2%6lv5b~*5wh=E2rR5xh?YhmzlBdXL0J8 zGu-*vp7m5VeelAk(ayW{%Tw5vfNMU!Sb5FwYs5}>Sj0)^yBsAXwg@@OzdE$MTI*48oBU@bTe6yJtgR34*FsK3Mn0#>?qC58B4MXstlFJ$g5Zqxg># z)PJ$vMx`3@6)+S^42>2=oEvc^2G~CvdY^ofLOG1yxcatvEW?pAHdY$6|D4~ZQeI!{ z&YYnIVN!a0A;aIJ67fXY7n|bnWnEiqe;^u-eabL2%ov(xbrhvn>7N11nI*{$M`}#f zY!40%U6?!*_>I#>%O{ru#a7yGut7|p1F@}hvkT^)V(ibkuyC(F{%;jX6F6L+KEAy;Mkmk zUF)1&)iB7K_~}GH-oV`s$2l=e5^?L@+@z$VyLVRFv+34S9&TzJjUom+n*NMY^%+5O z`x<|-sh#bRR}UAKCc0$S%?g%UG344cT&eLGaGQ7%32mZjSq26O8Jz>0@#~*fq zskRl2t5+~aMoDz*Fx&lU)^K?5{gbp@QNcu1mJTWY*Gl?lx&E`m{H^f*FPAT`kQ$+@ UjHc+_gZ8t+%G}m0*VHrWFO`woOaK4? literal 0 HcmV?d00001 diff --git a/docs/graphs/test.png b/docs/graphs/test.png new file mode 100644 index 0000000000000000000000000000000000000000..199bde24ab358590571aba48de8180ba7b46b39f GIT binary patch literal 2450 zcmV;D32pX?P)Px;Oi4sRRCt{2o!?IzM;^e}USqFkZDSn3HUSK{N-&U+oD_bjK&6DXNpzyQYo2=5 z-Mv-!lKWpG-SyPB>QeRPIIgLbk_%}RXv2@Fg&=B&1e2Iw_5wDxcX!rn@2>9wsh3v# z+V!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veh0kW`MC1a}({?af#7RjVbd&HFHq}i{jkxv>B=BaR``ukgr4?o{PSdRSj z?LRke-fBXdr}8rncQ*JZ_e%JT!?%BXs`fPEfGFj&sJcc||24<>XKSU^74hz4;4y1xI>*jYv~$t=L3g^0VhJ*SXt(PR)~!B{3UWg^Q1(o(|A=-BFNZmGg1;6`K&A zO~(B*NoOl?wStDXNJ8cg=p*15achO8R@v`_ and on `super() `_. @@ -45,14 +45,14 @@ To do so, have the node create it with the :code:`create_timer()` method, as fol .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_with_a_node/python_package_with_a_node/print_forever_node.py :language: python - :lines: 32-36 + :lines: 33-37 :emphasize-lines: 4 The method that is periodically called by the Timer is, in this case, as follows. We use :code:`self.get_logger().info()` to print to the terminal periodically. .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_with_a_node/python_package_with_a_node/print_forever_node.py :language: python - :lines: 38-40 + :lines: 39-41 :emphasize-lines: 1 In ROS2, the logging methods, i.e. :code:`self.get_logger().info()`, are methods of the Node itself. So, the capability to log (print to the terminal) using ROS2 Nodes is dependent on the scope in which that Node exists. @@ -66,7 +66,7 @@ Anyhow, the point is that nothing related to ROS2 will happen unless the two fol .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_with_a_node/python_package_with_a_node/print_forever_node.py :language: python - :lines: 44-59 + :lines: 45-60 :emphasize-lines: 8,12 Have a :code:`try-catch` block for :code:`KeyboardInterrupt` @@ -86,7 +86,7 @@ That is particularly important when real robots need to be gracefully shut down .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_with_a_node/python_package_with_a_node/print_forever_node.py :language: python - :lines: 44-59 + :lines: 45-60 :emphasize-lines: 7,13 .. important:: @@ -114,12 +114,12 @@ Example of a class: .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_with_a_node/python_package_with_a_node/print_forever_node.py :language: python - :lines: 29-30 + :lines: 30-31 :emphasize-lines: 2 Example of a method: .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_with_a_node/python_package_with_a_node/print_forever_node.py :language: python - :lines: 38-39 + :lines: 39-40 :emphasize-lines: 2 diff --git a/docs/source/service_servers_and_clients.rst b/docs/source/service_servers_and_clients.rst index d3e130e..8daebdd 100644 --- a/docs/source/service_servers_and_clients.rst +++ b/docs/source/service_servers_and_clients.rst @@ -146,20 +146,20 @@ The code begins with an import to the service we created. No surprise here. .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_server_node.py :language: python - :lines: 24-30 + :lines: 24-31 :emphasize-lines: 4 The Service Server must be initialised with the :code:`create_service()`, as follows, with parameters that should by now be quite obvious to us. .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_server_node.py :language: python - :lines: 36-39 + :lines: 37-40 The Service Server receives a :code:`AddPoints.Request` and returns a :code:`AddPoints.Response`. .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_server_node.py :language: python - :lines: 43-49 + :lines: 44-50 :emphasize-lines: 2,4 .. warning:: @@ -171,7 +171,7 @@ We use the members of :code:`AddPoints.Request` to calculate and populate the :c .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_server_node.py :language: python - :lines: 51-55 + :lines: 52-56 The Service Server was quite painless, but it doesn't do much. The Service Client might be a bit more on the painful side for the uninitiated. @@ -226,7 +226,7 @@ To have access to the service, we import it with :code:`from .srv impor .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_client_node.py :language: python - :lines: 24-31 + :lines: 24-33 :emphasize-lines: 8 Instantiate a Service Client @@ -236,7 +236,7 @@ We instantiate a Service Client with :code:`Node.create_client()`. The values of .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_client_node.py :language: python - :lines: 40-42 + :lines: 42-44 (Recommended) Wait for the Service Server to be available +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -257,7 +257,7 @@ As part of the :code:`async` framework, we instantiate a :code:`Future` (`More i .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_client_node.py :language: python - :lines: 47 + :lines: 49 Instantiate a Timer +++++++++++++++++++ @@ -266,13 +266,13 @@ Whenever periodic work must be done, it is recommended to use a :code:`Timer`, a .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_client_node.py :language: python - :lines: 49-52 + :lines: 51-54 The need for a callback for the :code:`Timer`, should also be no surprise. .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_client_node.py :language: python - :lines: 54-55 + :lines: 56-57 Service Clients use :code:`.Request()` +++++++++++++++++++++++++++++++++++++++++++ @@ -281,7 +281,7 @@ Given that services work in a request-response model, the Service Client must in .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_client_node.py :language: python - :lines: 57-65 + :lines: 59-67 Make service calls with :code:`call_async()` ++++++++++++++++++++++++++++++++++++++++++++ @@ -300,14 +300,14 @@ The benefit of this is that the callback will not block our resources until the .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_client_node.py :language: python - :lines: 67-72 + :lines: 69-74 :emphasize-lines: 5,6 Given that we are periodically calling the service, before replacing the class :code:`Future` with the next service call, we can check if the service call was done with :code:`Future.done()`. If it is not done, we can use :code:`Future.cancel()` so that our callback can handle this case as well. For instance, if the Service Server has been shutdown, the :code:`Future` would never be done. .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_client_node.py :language: python - :lines: 67-72 + :lines: 69-74 :emphasize-lines: 1-4 The Future callback @@ -319,7 +319,7 @@ The result of the :code:`Future` is obtained using :code:`Future.result()`. The .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_that_uses_the_services/python_package_that_uses_the_services/add_points_service_client_node.py :language: python - :lines: 74-80 + :lines: 76-82 :emphasize-lines: 1,3,4 Update the :file:`setup.py` diff --git a/docs/source/transformations/tf2.rst b/docs/source/transformations/tf2.rst index 3da19a2..fe981da 100644 --- a/docs/source/transformations/tf2.rst +++ b/docs/source/transformations/tf2.rst @@ -116,7 +116,7 @@ it persists across callback calls. .. literalinclude:: ../../../ros2_tutorial_workspace/src/python_package_that_uses_tf2/python_package_that_uses_tf2/tf2_broadcaster_node.py :language: python - :lines: 36-49 + :lines: 37-50 :emphasize-lines: 5,9,12 We add two parameters to be able to adjust the trajectory properties if desired. Again, these could be configurable @@ -124,7 +124,7 @@ parameters but we leave them hard-coded for simplicity. .. literalinclude:: ../../../ros2_tutorial_workspace/src/python_package_that_uses_tf2/python_package_that_uses_tf2/tf2_broadcaster_node.py :language: python - :lines: 51-55 + :lines: 52-56 :emphasize-lines: 4,5 We create the ``TransformStamped`` as follows. Our rotation is simple so we build Quaternion for the @@ -133,14 +133,14 @@ and ``child_frame_id`` as this robot's frame. .. literalinclude:: ../../../ros2_tutorial_workspace/src/python_package_that_uses_tf2/python_package_that_uses_tf2/tf2_broadcaster_node.py :language: python - :lines: 58-78 + :lines: 59-79 Finally, we send the transform with ``transform_broadcaster.sendTransform`` and update the local time counter for the trajectory. .. literalinclude:: ../../../ros2_tutorial_workspace/src/python_package_that_uses_tf2/python_package_that_uses_tf2/tf2_broadcaster_node.py :language: python - :lines: 80-84 + :lines: 81-85 Creating the listener --------------------- @@ -162,7 +162,7 @@ would be to make this configurable as a parameter. We do not do that here to not .. literalinclude:: ../../../ros2_tutorial_workspace/src/python_package_that_uses_tf2/python_package_that_uses_tf2/tf2_listener_node.py :language: python - :lines: 36-42 + :lines: 38-44 :emphasize-lines: 2 We then create an instance of ``Timer`` and add the callback. In the callback, we use the buffer we created in the @@ -174,7 +174,7 @@ The object created with ``rclpy.time.Time()`` is `equivalent to a time of zero < .. literalinclude:: ../../../ros2_tutorial_workspace/src/python_package_that_uses_tf2/python_package_that_uses_tf2/tf2_listener_node.py :language: python - :lines: 47-60 + :lines: 49-62 :emphasize-lines: 4-7 diff --git a/docs/source/using_python_library.rst b/docs/source/using_python_library.rst index 63ae648..3120e3d 100644 --- a/docs/source/using_python_library.rst +++ b/docs/source/using_python_library.rst @@ -96,14 +96,14 @@ Indeed, the most difficult part is to make and configure the library itself. Aft .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_that_uses_the_library/python_package_that_uses_the_library/library_user_node.py :language: python - :lines: 24-30 + :lines: 24-31 :emphasize-lines: 7 And then use the symbols we imported as we would with any other Python library. .. literalinclude:: ../../ros2_tutorial_workspace/src/python_package_that_uses_the_library/python_package_that_uses_the_library/library_user_node.py :language: python - :lines: 41-56 + :lines: 42-57 :emphasize-lines: 10, 14 Build and source