State
Classes:
Stores the state of a given vehicle. |
- class pegasus.simulator.logic.state.State
Bases:
object
Stores the state of a given vehicle.
Note
position - A numpy array with the [x,y,z] of the vehicle expressed in the inertial frame according to an ENU convention.
orientation - A numpy array with the quaternion [qx, qy, qz, qw] that encodes the attitude of the vehicle’s FLU body frame, relative to an ENU inertial frame, expressed in the ENU inertial frame.
linear_velocity - A numpy array with [vx,vy,vz] that defines the velocity of the vehicle expressed in the inertial frame according to an ENU convention.
linear_body_velocity - A numpy array with [u,v,w] that defines the velocity of the vehicle expressed in the FLU body frame.
angular_velocity - A numpy array with [p,q,r] with the angular velocity of the vehicle’s FLU body frame, relative to an ENU inertial frame, expressed in the FLU body frame.
linear acceleration - An array with [x_ddot, y_ddot, z_ddot] with the acceleration of the vehicle expressed in the inertial frame according to an ENU convention.
Methods:
__init__
()Initialize the State object
Method that, assuming that a state is enconded in ENU-FLU standard (the Isaac Sim standard), converts the angular velocity expressed in the body frame to the NED-FRD convention used by PX4 and other onboard flight controllers
Method that, assuming that a state is encoded in ENU-FLU standard (the Isaac Sim standard), converts the attitude of the vehicle it to the NED-FRD convention used by PX4 and other onboard flight controllers
Method that, assuming that a state is enconded in ENU-FLU standard (the Isaac Sim standard), converts the linear acceleration expressed in the inertial frame to the NED convention used by PX4 and other onboard flight controllers
Method that, assuming that a state is encoded in ENU-FLU standard (the Isaac Sim standard), converts the linear body velocity of the vehicle it to the NED-FRD convention used by PX4 and other onboard flight controllers
Method that, assuming that a state is enconded in ENU-FLU standard (the Isaac Sim standard), converts the linear velocity expressed in the inertial frame to the NED convention used by PX4 and other onboard flight controllers
Method that, assuming that a state is encoded in ENU standard (the Isaac Sim standard), converts the position to the NED convention used by PX4 and other onboard flight controllers
- __init__()
Initialize the State object
- get_angular_velocity_frd()
Method that, assuming that a state is enconded in ENU-FLU standard (the Isaac Sim standard), converts the angular velocity expressed in the body frame to the NED-FRD convention used by PX4 and other onboard flight controllers
- Returns:
A numpy array with [p,q,r] with the angular velocity of the vehicle’s FRD body frame, relative to an NED inertial frame, expressed in the FRD body frame.
- Return type:
np.ndarray
- get_attitude_ned_frd()
Method that, assuming that a state is encoded in ENU-FLU standard (the Isaac Sim standard), converts the attitude of the vehicle it to the NED-FRD convention used by PX4 and other onboard flight controllers
- Returns:
A numpy array with the quaternion [qx, qy, qz, qw] that encodes the attitude of the vehicle’s FRD body frame, relative to an NED inertial frame, expressed in the NED inertial frame.
- Return type:
np.ndarray
- get_linear_acceleration_ned()
Method that, assuming that a state is enconded in ENU-FLU standard (the Isaac Sim standard), converts the linear acceleration expressed in the inertial frame to the NED convention used by PX4 and other onboard flight controllers
- Returns:
An array with [x_ddot, y_ddot, z_ddot] with the acceleration of the vehicle expressed in the inertial frame according to an NED convention.
- Return type:
np.ndarray
- get_linear_body_velocity_ned_frd()
Method that, assuming that a state is encoded in ENU-FLU standard (the Isaac Sim standard), converts the linear body velocity of the vehicle it to the NED-FRD convention used by PX4 and other onboard flight controllers
- Returns:
A numpy array with [u,v,w] that defines the velocity of the vehicle expressed in the FRD body frame.
- Return type:
np.ndarray
- get_linear_velocity_ned()
Method that, assuming that a state is enconded in ENU-FLU standard (the Isaac Sim standard), converts the linear velocity expressed in the inertial frame to the NED convention used by PX4 and other onboard flight controllers
- Returns:
A numpy array with [vx,vy,vz] that defines the velocity of the vehicle expressed in the inertial frame according to a NED convention.
- Return type:
np.ndarray
- get_position_ned()
Method that, assuming that a state is encoded in ENU standard (the Isaac Sim standard), converts the position to the NED convention used by PX4 and other onboard flight controllers
- Returns:
A numpy array with the [x,y,z] of the vehicle expressed in the inertial frame according to an NED convention.
- Return type:
np.ndarray