srunner/scenariomanager/scenarioatomics/atomic_behaviors.py
def terminate(self, new_status):
        """
        On termination of this behavior, set the target speed to its desired one.
        This function is called several times, so the use of self._final_speed_set
        is needed to avoid interfering with other running behaviors
        """
        if not self._final_speed_set:
            try:
                check_actors = operator.attrgetter("ActorsWithController")
                actor_dict = check_actors(py_trees.blackboard.Blackboard())
            except AttributeError:
                pass

            if actor_dict and self._actor.id in actor_dict:

                if self._relative_to_master:
                    master_speed = CarlaDataProvider.get_velocity(self._master_actor)
                    if self._relative_type == 'delta':
                        final_speed = master_speed + self._final_speed
                    elif self._relative_type == 'factor':
                        final_speed = master_speed * self._final_speed
                    else:
                        print("'relative_type' must be delta or factor")
                else:
                    final_speed = self._final_speed

                actor_dict[self._actor.id].update_target_speed(final_speed)

            self._final_speed_set = True

        super(SyncArrivalOSC, self).terminate(new_status)

        On termination of this behavior, set the target speed to its desired one.
        This function is called several times, so the use of self._final_speed_set
        is needed to avoid interfering with other running behaviors
        
On termination of this behavior, set the target speed to its desired one.
This function is called several times, so the use of self._final_speed_set
is needed to avoid interfering with other running behaviors
On termination of this behavior set the target speed to its desired one . This function is called several times so the use of self . _final_speed_set is needed to avoid interfering with other running behaviors
def terminate(self, new_status):
        if not self._final_speed_set:
            try:
                check_actors = operator.attrgetter("ActorsWithController")
                actor_dict = check_actors(py_trees.blackboard.Blackboard())
            except AttributeError:
                pass
            if actor_dict and self._actor.id in actor_dict:
                if self._relative_to_master:
                    master_speed = CarlaDataProvider.get_velocity(self._master_actor)
                    if self._relative_type == 'delta':
                        final_speed = master_speed + self._final_speed
                    elif self._relative_type == 'factor':
                        final_speed = master_speed * self._final_speed
                    else:
                        print("'relative_type' must be delta or factor")
                else:
                    final_speed = self._final_speed
                actor_dict[self._actor.id].update_target_speed(final_speed)
            self._final_speed_set = True
        super(SyncArrivalOSC, self).terminate(new_status)
def terminate ( self , new_status ) : if not self . _final_speed_set : try : check_actors = operator . attrgetter ( "ActorsWithController" ) actor_dict = check_actors ( py_trees . blackboard . Blackboard ( ) ) except AttributeError : pass if actor_dict and self . _actor . id in actor_dict : if self . _relative_to_master : master_speed = CarlaDataProvider . get_velocity ( self . _master_actor ) if self . _relative_type == 'delta' : final_speed = master_speed + self . _final_speed elif self . _relative_type == 'factor' : final_speed = master_speed * self . _final_speed else : print ( "'relative_type' must be delta or factor" ) else : final_speed = self . _final_speed actor_dict [ self . _actor . id ] . update_target_speed ( final_speed ) self . _final_speed_set = True super ( SyncArrivalOSC , self ) . terminate ( new_status )
On termination of this behavior, set the target speed to its desired one.
On termination of this behavior set the target speed to its desired one .
"""
        On termination of this behavior, set the target speed to its desired one.
        This function is called several times, so the use of self._final_speed_set
        is needed to avoid interfering with other running behaviors
        """
self
new_status