src/control/motion_model_testing_simulator/motion_model_testing_simulator/bicycle_model.py
def evaluate_dynamics(
        self, states: BicycleState, u: BicycleCommand
    ) -> BicycleState:
        """
        Evaluate the continous-time dynamics function of the kinematic bicycle model.

        Given the current states and commands, return the derivative of
        the system state. The derivative is returned as a state object because
        every scalar state has a scalar derivative, and that way we can avoid
        introducing another type that is pretty much just a copy of
        BicycleState with renamed fields.
        """
        s = states
        lf, lr = self.parameters.lf, self.parameters.lr
        beta = np.arctan((lr * np.tan(u.steering)) / (lf + lr))
        return BicycleState(
            x=(s.v * np.cos(s.phi + beta)),
            y=(s.v * np.sin(s.phi + beta)),
            v=(u.acceleration),
            phi=(s.v / lr * np.sin(beta)),
        )

        Evaluate the continous-time dynamics function of the kinematic bicycle model.

        Given the current states and commands, return the derivative of
        the system state. The derivative is returned as a state object because
        every scalar state has a scalar derivative, and that way we can avoid
        introducing another type that is pretty much just a copy of
        BicycleState with renamed fields.
        
Evaluate the continous-time dynamics function of the kinematic bicycle model.
Given the current states and commands, return the derivative of
the system state. The derivative is returned as a state object because
every scalar state has a scalar derivative, and that way we can avoid
introducing another type that is pretty much just a copy of
BicycleState with renamed fields.
Evaluate the continous - time dynamics function of the kinematic bicycle model . Given the current states and commands return the derivative of the system state . The derivative is returned as a state object because every scalar state has a scalar derivative and that way we can avoid introducing another type that is pretty much just a copy of BicycleState with renamed fields .
def evaluate_dynamics(
        self, states: BicycleState, u: BicycleCommand
    ) -> BicycleState:
        s = states
        lf, lr = self.parameters.lf, self.parameters.lr
        beta = np.arctan((lr * np.tan(u.steering)) / (lf + lr))
        return BicycleState(
            x=(s.v * np.cos(s.phi + beta)),
            y=(s.v * np.sin(s.phi + beta)),
            v=(u.acceleration),
            phi=(s.v / lr * np.sin(beta)),
        )
def evaluate_dynamics ( self , states : BicycleState , u : BicycleCommand ) -> BicycleState : s = states lf , lr = self . parameters . lf , self . parameters . lr beta = np . arctan ( ( lr * np . tan ( u . steering ) ) / ( lf + lr ) ) return BicycleState ( x = ( s . v * np . cos ( s . phi + beta ) ) , y = ( s . v * np . sin ( s . phi + beta ) ) , v = ( u . acceleration ) , phi = ( s . v / lr * np . sin ( beta ) ) , )
Evaluate the continous-time dynamics function of the kinematic bicycle model.
Evaluate the continous - time dynamics function of the kinematic bicycle model .
"""
        Evaluate the continous-time dynamics function of the kinematic bicycle model.

        Given the current states and commands, return the derivative of
        the system state. The derivative is returned as a state object because
        every scalar state has a scalar derivative, and that way we can avoid
        introducing another type that is pretty much just a copy of
        BicycleState with renamed fields.
        """
self
states
BicycleState
u
BicycleCommand