Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
evaluator.formats Namespace Reference

Functions

tuple[np.ndarray, np.ndarray] format_vehicle_pose_msg (Pose msg)
 Formats the Pose message into a numpy array.
 
tuple[np.ndarray, np.ndarray] format_velocities_msg (Velocities msg)
 Formats the Velocities message into a numpy array.
 
tuple[np.ndarray, np.ndarray] format_vehicle_state_msg (VehicleState msg)
 Formats the VehicleState message into a numpy array.
 
 format_cone_array_msg (ConeArray msg)
 Formats the ConeArray message into a numpy array.
 
 get_color_number_from_rgb (r, g, b)
 
 format_marker_array_msg (MarkerArray msg)
 Formats the MarkerArray message into a numpy array.
 
np.ndarray format_transform_stamped_msg (TransformStamped msg)
 Formats the TransformStamped message into a numpy array.
 
np.ndarray format_twist_with_covariance_stamped_msg (TwistWithCovarianceStamped msg)
 Formats the TwistWithCovarianceStamped message into a numpy array.
 
tuple[np.ndarray, np.ndarray] format_car_state_msg (CarState msg)
 Formats the CarState message from eufs into a tuple of numpy arrays.
 
 format_eufs_cone_array_with_covariance_msg (ConeArrayWithCovariance msg)
 Args: msg (ConeArrayWithCovariance): cone array message from eufs.
 
tuple[np.ndarray, np.ndarray] format_nav_odometry_msg (Odometry msg)
 Formats the Odometry message into a numpy array.
 
np.ndarray format_path_point_array_msg (PathPointArray path_point_array)
 Converts a PathPointArray message into a numpy array.
 
 format_point2d_msg (msg)
 Converts a Point2D message into a numpy array.
 
np.ndarray find_closest_elements (np.ndarray arr1, np.ndarray arr2)
 
tuple[np.ndarray, np.ndarray] get_blue_and_yellow_cones_after_msg_treatment (np.ndarray arr)
 Divides the result of converting the EUFS or FSDS map message to np.ndarray into blue and yellow cones arrays, attributing orange cones into blue or yellow cones.
 

Variables

dict cone_color_dictionary
 

Function Documentation

◆ find_closest_elements()

np.ndarray evaluator.formats.find_closest_elements ( np.ndarray  arr1,
np.ndarray  arr2 
)
Find the closest elements in arr2 for each element in arr1.

Args:
    arr1 (np.ndarray): array in which each element's 2 initial values are x and y positions
    arr2 (np.ndarray): array in which each element's 2 initial values are x and y positions

Returns:
    np.ndarray: array of elements from arr2 that are the closest to at least one element in arr1

Definition at line 340 of file formats.py.

◆ format_car_state_msg()

tuple[np.ndarray, np.ndarray] evaluator.formats.format_car_state_msg ( CarState  msg)

Formats the CarState message from eufs into a tuple of numpy arrays.

Args: msg (CarState): CarState message from eufs

Returns: tuple[np.ndarray, np.ndarray]: (state, velocities)

Definition at line 195 of file formats.py.

◆ format_cone_array_msg()

evaluator.formats.format_cone_array_msg ( ConeArray  msg)

Formats the ConeArray message into a numpy array.

Args: msg (ConeArray): Cone array message.

Returns: np.ndarray: Numpy array of arrays.

Definition at line 86 of file formats.py.

◆ format_eufs_cone_array_with_covariance_msg()

evaluator.formats.format_eufs_cone_array_with_covariance_msg ( ConeArrayWithCovariance  msg)

Args: msg (ConeArrayWithCovariance): cone array message from eufs.

Returns: np.ndarray[np.ndarray]: [[x, y, color, confidence], ...]

Definition at line 231 of file formats.py.

◆ format_marker_array_msg()

evaluator.formats.format_marker_array_msg ( MarkerArray  msg)

Formats the MarkerArray message into a numpy array.

Args: msg (MarkerArray): Marker array message.

Returns: np.ndarray: Numpy array of arrays.

Definition at line 122 of file formats.py.

Here is the call graph for this function:

◆ format_nav_odometry_msg()

tuple[np.ndarray, np.ndarray] evaluator.formats.format_nav_odometry_msg ( Odometry  msg)

Formats the Odometry message into a numpy array.

Args: msg (Odometry): Odometry message.

Returns: np.ndarray: Numpy array of odometry.

Definition at line 266 of file formats.py.

◆ format_path_point_array_msg()

np.ndarray evaluator.formats.format_path_point_array_msg ( PathPointArray  path_point_array)

Converts a PathPointArray message into a numpy array.

Args: path_point_array (PathPointArray): PathPointArray message.

Returns: np.ndarray: Numpy array of path points.

Definition at line 301 of file formats.py.

◆ format_point2d_msg()

evaluator.formats.format_point2d_msg (   msg)

Converts a Point2D message into a numpy array.

Args: msg: Point2D message.

Returns: np.ndarray: Numpy array of point.

Definition at line 327 of file formats.py.

◆ format_transform_stamped_msg()

np.ndarray evaluator.formats.format_transform_stamped_msg ( TransformStamped  msg)

Formats the TransformStamped message into a numpy array.

Args: msg (TransformStamped): TransformStamped message.

Returns: np.ndarray: Numpy array of transform.

Definition at line 151 of file formats.py.

◆ format_twist_with_covariance_stamped_msg()

np.ndarray evaluator.formats.format_twist_with_covariance_stamped_msg ( TwistWithCovarianceStamped  msg)

Formats the TwistWithCovarianceStamped message into a numpy array.

Args: msg (TwistWithCovarianceStamped): TwistWithCovarianceStamped message.

Returns: np.ndarray: Numpy array of twist (used for velocities).

Definition at line 178 of file formats.py.

◆ format_vehicle_pose_msg()

tuple[np.ndarray, np.ndarray] evaluator.formats.format_vehicle_pose_msg ( Pose  msg)

Formats the Pose message into a numpy array.

Args: msg (Pose): Vehicle pose message.

Returns: np.ndarray: Numpy array of vehicle pose.

Definition at line 26 of file formats.py.

◆ format_vehicle_state_msg()

tuple[np.ndarray, np.ndarray] evaluator.formats.format_vehicle_state_msg ( VehicleState  msg)

Formats the VehicleState message into a numpy array.

Args: msg (VehicleState): Vehicle state message.

Returns: np.ndarray: Numpy array of vehicle state.

Definition at line 64 of file formats.py.

◆ format_velocities_msg()

tuple[np.ndarray, np.ndarray] evaluator.formats.format_velocities_msg ( Velocities  msg)

Formats the Velocities message into a numpy array.

Args: msg (Velocities): Vehicle velocities message.

Returns: np.ndarray: Numpy array of vehicle velocities.

Definition at line 45 of file formats.py.

◆ get_blue_and_yellow_cones_after_msg_treatment()

tuple[np.ndarray, np.ndarray] evaluator.formats.get_blue_and_yellow_cones_after_msg_treatment ( np.ndarray  arr)

Divides the result of converting the EUFS or FSDS map message to np.ndarray into blue and yellow cones arrays, attributing orange cones into blue or yellow cones.

Args: arr (np.ndarray): Array of cones with the following attributes: x, y, index, confidence, type.

Returns: tuple[np.ndarray, np.ndarray]: the first array is the array of blue cones and the second contains yellow cones.

Definition at line 368 of file formats.py.

◆ get_color_number_from_rgb()

evaluator.formats.get_color_number_from_rgb (   r,
  g,
  b 
)

Definition at line 113 of file formats.py.

Here is the caller graph for this function:

Variable Documentation

◆ cone_color_dictionary

dict evaluator.formats.cone_color_dictionary
Initial value:
1= {
2 "blue_cone": 0,
3 "blue": 0,
4 "yellow_cone": 1,
5 "yellow": 1,
6 "orange_cone": 2,
7 "large_orange_cone": 3,
8 "unknown": 4,
9}

Definition at line 15 of file formats.py.