srunner/scenariomanager/scenarioatomics/atomic_behaviors.py
def initialise(self):
        """
        Set initial parameters and get (actor, controller) pair from Blackboard.

        May throw if actor is not available as key for the ActorsWithController
        dictionary from Blackboard.
        """
        actor_dict = {}

        try:
            check_actors = operator.attrgetter("ActorsWithController")
            actor_dict = check_actors(py_trees.blackboard.Blackboard())
        except AttributeError:
            pass

        if not actor_dict or not self._actor.id in actor_dict:
            raise RuntimeError("Actor not found in ActorsWithController BlackBoard")

        self._start_time = GameTime.get_time()

        # Get the distance of the actor to its endpoint
        distance = calculate_distance(
            CarlaDataProvider.get_location(self._actor), self._actor_target.location)

        # Get the time to arrival of the reference to its endpoint
        distance_reference = calculate_distance(
            CarlaDataProvider.get_location(self._master_actor), self._master_target.location)

        velocity_reference = CarlaDataProvider.get_velocity(self._master_actor)
        if velocity_reference > 0:
            time_reference = distance_reference / velocity_reference
        else:
            time_reference = float('inf')

        # Get the required velocity of the actor
        desired_velocity = distance / time_reference
        actor_dict[self._actor.id].update_target_speed(desired_velocity, start_time=self._start_time)

        Set initial parameters and get (actor, controller) pair from Blackboard.

        May throw if actor is not available as key for the ActorsWithController
        dictionary from Blackboard.
        
Set initial parameters and get (actor, controller) pair from Blackboard.
May throw if actor is not available as key for the ActorsWithController
dictionary from Blackboard.
Set initial parameters and get ( actor controller ) pair from Blackboard . May throw if actor is not available as key for the ActorsWithController dictionary from Blackboard .
def initialise(self):
        actor_dict = {}
        try:
            check_actors = operator.attrgetter("ActorsWithController")
            actor_dict = check_actors(py_trees.blackboard.Blackboard())
        except AttributeError:
            pass
        if not actor_dict or not self._actor.id in actor_dict:
            raise RuntimeError("Actor not found in ActorsWithController BlackBoard")
        self._start_time = GameTime.get_time()
        distance = calculate_distance(
            CarlaDataProvider.get_location(self._actor), self._actor_target.location)
        distance_reference = calculate_distance(
            CarlaDataProvider.get_location(self._master_actor), self._master_target.location)
        velocity_reference = CarlaDataProvider.get_velocity(self._master_actor)
        if velocity_reference > 0:
            time_reference = distance_reference / velocity_reference
        else:
            time_reference = float('inf')
        desired_velocity = distance / time_reference
        actor_dict[self._actor.id].update_target_speed(desired_velocity, start_time=self._start_time)
def initialise ( self ) : actor_dict = { } try : check_actors = operator . attrgetter ( "ActorsWithController" ) actor_dict = check_actors ( py_trees . blackboard . Blackboard ( ) ) except AttributeError : pass if not actor_dict or not self . _actor . id in actor_dict : raise RuntimeError ( "Actor not found in ActorsWithController BlackBoard" ) self . _start_time = GameTime . get_time ( ) distance = calculate_distance ( CarlaDataProvider . get_location ( self . _actor ) , self . _actor_target . location ) distance_reference = calculate_distance ( CarlaDataProvider . get_location ( self . _master_actor ) , self . _master_target . location ) velocity_reference = CarlaDataProvider . get_velocity ( self . _master_actor ) if velocity_reference > 0 : time_reference = distance_reference / velocity_reference else : time_reference = float ( 'inf' ) desired_velocity = distance / time_reference actor_dict [ self . _actor . id ] . update_target_speed ( desired_velocity , start_time = self . _start_time )
Set initial parameters and get (actor, controller) pair from Blackboard.
Set initial parameters and get ( actor controller ) pair from Blackboard .
"""
        Set initial parameters and get (actor, controller) pair from Blackboard.

        May throw if actor is not available as key for the ActorsWithController
        dictionary from Blackboard.
        """ # Get the distance of the actor to its endpoint # Get the time to arrival of the reference to its endpoint # Get the required velocity of the actor
self