File tree Expand file tree Collapse file tree
rosbridge_library/src/rosbridge_library/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737import re
3838from base64 import standard_b64decode , standard_b64encode
3939from collections .abc import Sequence
40- from typing import TYPE_CHECKING , Any
40+ from typing import Any
4141
4242import numpy as np
4343from builtin_interfaces .msg import Duration as DurationMsg
4444from builtin_interfaces .msg import Time as TimeMsg
45- from rclpy .clock import ROSClock
45+ from rclpy .clock import Clock
46+ from rclpy .clock_type import ClockType
4647from std_msgs .msg import Header as HeaderMsg
4748
4849from rosbridge_library .internal import ros_loader
4950from rosbridge_library .internal .type_support import ROSMessage
5051
51- if TYPE_CHECKING :
52- from rclpy .clock import Clock
53-
54-
5552type_map = {
5653 "bool" : ("bool" , "boolean" ),
5754 "int" : (
@@ -157,7 +154,7 @@ def populate_instance(
157154 according to the values in msg.
158155 """
159156 if clock is None :
160- clock = ROSClock ( )
157+ clock = Clock ( clock_type = ClockType . ROS_TIME )
161158
162159 inst_type = msg_instance_type_repr (inst )
163160
@@ -300,7 +297,7 @@ def _to_inst(
300297 stack : list [str ] | None = None ,
301298) -> object :
302299 if clock is None :
303- clock = ROSClock ( )
300+ clock = Clock ( clock_type = ClockType . ROS_TIME )
304301 if stack is None :
305302 stack = []
306303
You can’t perform that action at this time.
0 commit comments