From 112644857f45be7483558369bea2619c7478acd8 Mon Sep 17 00:00:00 2001 From: Andrew Best Date: Mon, 29 Aug 2022 11:57:22 -0700 Subject: [PATCH] Adjust topic defaults to include pseudoactor type --- carla_ros_bridge/src/carla_ros_bridge/pseudo_actor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/carla_ros_bridge/src/carla_ros_bridge/pseudo_actor.py b/carla_ros_bridge/src/carla_ros_bridge/pseudo_actor.py index 6cdfa0f9..7a70f13a 100644 --- a/carla_ros_bridge/src/carla_ros_bridge/pseudo_actor.py +++ b/carla_ros_bridge/src/carla_ros_bridge/pseudo_actor.py @@ -87,10 +87,10 @@ def get_prefix(self): :return: prefix :rtype: string """ - if self.parent is not None: - return self.parent.get_prefix() + "/" + self.name - else: - return self.name + class_name = self.__class__.__name__ + prefix = "" if self.parent is None else self.parent.get_prefix() + "/" + prefix += "{}{}/{}".format(prefix, class_name, self.name) + return prefix def get_topic_prefix(self): """