def start_gui(self, gui=True):
    'start physics engine (client) with or without gui'
    if gui:
        self.get_logger().info('Running pybullet with gui')
        self.get_logger().info('-------------------------')
        gui_options = self.get_parameter('gui_options').value
        return self.pb.connect(self.pb.GUI, options=gui_options)
    else:
        self.get_logger().info('Running pybullet without gui')
        self.get_logger().info('-------------------------')
        return self.pb.connect(self.pb.DIRECT)
start physics engine (client) with or without gui
def start_gui(self, gui=True):
    
    if gui:
        self.get_logger().info('Running pybullet with gui')
        self.get_logger().info('-------------------------')
        gui_options = self.get_parameter('gui_options').value
        return self.pb.connect(self.pb.GUI, options=gui_options)
    else:
        self.get_logger().info('Running pybullet without gui')
        self.get_logger().info('-------------------------')
        return self.pb.connect(self.pb.DIRECT)