def forward(self, states: lnp.ndarray, inputs: lnp.ndarray, mesh: float):
    vehicle_inputs = {k: inputs[k] for k in self.get_submodel('vehicle').get_group_names('inputs')}
    vehicle_states = {k: states[k] for k in self.get_submodel('vehicle').get_group_names('states')}
    vehicle_return = self.get_submodel('vehicle').forward(states=vehicle_states, inputs=vehicle_inputs)
    kinematic_states = {k: states[k] for k in self.get_submodel('kinematics').get_group_names('states')}
    inputs_from_vehicle = {k: vehicle_states[k] for k in ('vx', 'vy', 'yaw_rate')}
    track_inputs = {k: inputs[k] for k in ['track_curvature', 'track_heading']}
    kinematic_inputs = dict(**track_inputs, **inputs_from_vehicle)
    kinematics_return = self.get_submodel('kinematics').forward(states=kinematic_states, inputs=kinematic_inputs, mesh=mesh)
    dt_ds = kinematics_return.states_dot['time']
    states_dot = {**kinematics_return.states_dot, **{k: (v * dt_ds) for (k, v) in vehicle_return.states_dot.items()}}
    outputs = self.combine_submodel_outputs(vehicle=vehicle_return.outputs, kinematics=kinematics_return.outputs)
    residuals = vehicle_return.residuals
    return self.make_state_space_model_return(states_dot=states_dot, outputs=outputs, residuals=residuals)
def forward(self, states: lnp.ndarray, inputs: lnp.ndarray, mesh: float):
    vehicle_inputs = {k: inputs[k] for k in self.get_submodel('vehicle').get_group_names('inputs')}
    vehicle_states = {k: states[k] for k in self.get_submodel('vehicle').get_group_names('states')}
    vehicle_return = self.get_submodel('vehicle').forward(states=vehicle_states, inputs=vehicle_inputs)
    kinematic_states = {k: states[k] for k in self.get_submodel('kinematics').get_group_names('states')}
    inputs_from_vehicle = {k: vehicle_states[k] for k in ('vx', 'vy', 'yaw_rate')}
    track_inputs = {k: inputs[k] for k in ['track_curvature', 'track_heading']}
    kinematic_inputs = dict(**track_inputs, **inputs_from_vehicle)
    kinematics_return = self.get_submodel('kinematics').forward(states=kinematic_states, inputs=kinematic_inputs, mesh=mesh)
    dt_ds = kinematics_return.states_dot['time']
    states_dot = {**kinematics_return.states_dot, **{k: (v * dt_ds) for (k, v) in vehicle_return.states_dot.items()}}
    outputs = self.combine_submodel_outputs(vehicle=vehicle_return.outputs, kinematics=kinematics_return.outputs)
    residuals = vehicle_return.residuals
    return self.make_state_space_model_return(states_dot=states_dot, outputs=outputs, residuals=residuals)