Skip to content

Commit e50eebe

Browse files
authored
fix(world_model_capsule): use correct Time implementation for message (#779)
2 parents 329a031 + 295f080 commit e50eebe

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/bitbots_behavior/bitbots_blackboard/bitbots_blackboard/capsules/world_model_capsule.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ def __init__(self, node, blackboard):
5858
self.map_margin: float = self._node.get_parameter("map_margin").value
5959

6060
# Ball state
61+
# The ball in the map frame (default to the center of the field if ball is not seen yet)
6162
self._ball: PointStamped = PointStamped(
62-
header=Header(stamp=Time(clock_type=ClockType.ROS_TIME), frame_id=self.map_frame)
63-
) # The ball in the map frame (default to the center of the field if ball is not seen yet)
63+
header=Header(stamp=Time(clock_type=ClockType.ROS_TIME).to_msg(), frame_id=self.map_frame)
64+
)
6465
self._ball_covariance: np.ndarray = np.zeros((2, 2)) # Covariance of the ball
6566

6667
# Publisher for visualization in RViZ

0 commit comments

Comments
 (0)