kitti_carla_simulator icon indicating copy to clipboard operation
kitti_carla_simulator copied to clipboard

Code improvement

Open RaviBeagle opened this issue 2 years ago • 0 comments

The self.set_attributes is a method in the sub-class. Is this a good design ? Perhaps the super class should only do a basic setup and actual setup should be sub-classes ?

class Sensor:
    initial_ts = 0.0
    initial_loc = carla.Location()
    initial_rot = carla.Rotation()

    def __init__(self, vehicle, world, actor_list, output_folder, transform):
        self.queue = queue.Queue()
        self.bp = self.set_attributes(world.get_blueprint_library())

RaviBeagle avatar Aug 05 '22 05:08 RaviBeagle