src/control/motion_model_testing_simulator/motion_model_testing_simulator/minisim.py
def simulate_all(
        self,
        total_simulation_time,
        initial_state: SerdeInterface,
        controller: ControlInterface,
    ):
        """
        Perform a simulation for a given amount of time.

        This function is used as a "one stop shop" for doing entire simulations
        where the simulator can take control over the thread. This makes use
        of the same simulation_iteration function that is also individually
        accessible.
        """
        self.simulation_time = 0.0

        number_of_steps = int(np.floor(total_simulation_time / self.step_time))
        current_state = initial_state

        for k in range(number_of_steps):
            # Compute control and state update
            current_command = controller.compute_control(current_state)
            next_state = self.simulate_one_timestep(
                current_state, current_command, self.simulation_time
            )

            # Advance simulation state
            self.simulation_time += self.step_time
            current_state = next_state

        Perform a simulation for a given amount of time.

        This function is used as a "one stop shop" for doing entire simulations
        where the simulator can take control over the thread. This makes use
        of the same simulation_iteration function that is also individually
        accessible.
        
Perform a simulation for a given amount of time.
This function is used as a "one stop shop" for doing entire simulations
where the simulator can take control over the thread. This makes use
of the same simulation_iteration function that is also individually
accessible.
Perform a simulation for a given amount of time . This function is used as a " one stop shop " for doing entire simulations where the simulator can take control over the thread . This makes use of the same simulation_iteration function that is also individually accessible .
def simulate_all(
        self,
        total_simulation_time,
        initial_state: SerdeInterface,
        controller: ControlInterface,
    ):
        self.simulation_time = 0.0
        number_of_steps = int(np.floor(total_simulation_time / self.step_time))
        current_state = initial_state
        for k in range(number_of_steps):
            current_command = controller.compute_control(current_state)
            next_state = self.simulate_one_timestep(
                current_state, current_command, self.simulation_time
            )
            self.simulation_time += self.step_time
            current_state = next_state
def simulate_all ( self , total_simulation_time , initial_state : SerdeInterface , controller : ControlInterface , ) : self . simulation_time = 0.0 number_of_steps = int ( np . floor ( total_simulation_time / self . step_time ) ) current_state = initial_state for k in range ( number_of_steps ) : current_command = controller . compute_control ( current_state ) next_state = self . simulate_one_timestep ( current_state , current_command , self . simulation_time ) self . simulation_time += self . step_time current_state = next_state
Perform a simulation for a given amount of time.
Perform a simulation for a given amount of time .
"""
        Perform a simulation for a given amount of time.

        This function is used as a "one stop shop" for doing entire simulations
        where the simulator can take control over the thread. This makes use
        of the same simulation_iteration function that is also individually
        accessible.
        """ # Compute control and state update # Advance simulation state
self
total_simulation_time
initial_state
SerdeInterface
controller
ControlInterface