maliput::api::rules

Struct BulbGroup

Source
pub struct BulbGroup<'a> {
    pub bulb_group: &'a BulbGroup,
}
Expand description

Models a group of bulbs within a traffic light. All of the bulbs within a group should share the same approximate orientation. However, this is not programmatically enforced. About the bulb group pose:

  • The position of the bulb group is defined as the linear offset of this bulb group’s frame relative to the frame of the traffic light that contains it. The origin of this bulb group’s frame should approximate the bulb group’s CoM.
  • The orientation of the bulb group is defined as the rotational offset of this bulb group’s frame relative to the frame of the traffic light that contains it. The +Z axis should align with the bulb group’s “up” direction, and the +X axis should point in the direction that the bulb group is facing. Following a right-handed coordinate frame, the +Y axis should point left when facing the +X direction.

Fields§

§bulb_group: &'a BulbGroup

Implementations§

Source§

impl BulbGroup<'_>

Source

pub fn unique_id(&self) -> UniqueBulbGroupId

Returns this BulbGroup instance’s unique identifier.

Source

pub fn id(&self) -> String

Get the id of the BulbGroup.

§Return

The id of the BulbGroup.

Source

pub fn position_traffic_light(&self) -> InertialPosition

Get the position of the BulbGroup in the traffic light.

§Return

An crate::api::InertialPosition representing the position of the BulbGroup in the traffic light.

Source

pub fn orientation_traffic_light(&self) -> Rotation

Get the orientation of the BulbGroup in the traffic light.

§Return

An crate::api::Rotation representing the orientation of the BulbGroup in the traffic light.

Source

pub fn bulbs(&self) -> Vec<Bulb<'_>>

Returns the bulbs in the bulb group.

§Return

A vector of Bulbs in the bulb group.

Source

pub fn get_bulb(&self, id: &String) -> Option<Bulb<'_>>

Get a Bulb by its id

§Arguments
  • id - The id of the Bulb.
§Return

The Bulb with the given id. If no Bulb is found with the given id, return None.

Source

pub fn traffic_light(&self) -> TrafficLight<'_>

Returns the parent TrafficLight of the bulb group.

§Return

The parent TrafficLight of the bulb group.

Auto Trait Implementations§

§

impl<'a> Freeze for BulbGroup<'a>

§

impl<'a> RefUnwindSafe for BulbGroup<'a>

§

impl<'a> !Send for BulbGroup<'a>

§

impl<'a> !Sync for BulbGroup<'a>

§

impl<'a> Unpin for BulbGroup<'a>

§

impl<'a> UnwindSafe for BulbGroup<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.