[][src]Struct rustros_tf::TfListener

pub struct TfListener { /* fields omitted */ }

This struct tries to be the same as the C++ version of TransformListener. Use this struct to lookup transforms.

Example usage:

This example is not tested
fn main() {
    rosrust::init("listener");
    let listener = TfListener::new();
    
    let rate = rosrust::rate(1.0);
    while rosrust::is_ok() {
        let tf = listener.lookup_transform("camera", "base_link", ros::Time::now());
        println!("{:?}", tf);
        rate.sleep();
    }
}

Do note that unlike the C++ variant of the TfListener, only one TfListener can be created at a time. Like its C++ counterpart, it must be scoped to exist through the lifetime of the program. One way to do this is using an Arc or RwLock.

Methods

impl TfListener[src]

pub fn new() -> Self[src]

Create a new TfListener

pub fn lookup_transform(
    &self,
    from: &str,
    to: &str,
    time: Time
) -> Result<TransformStamped, TfError>
[src]

Looks up a transform within the tree at a given time.

pub fn lookup_transform_with_time_travel(
    &self,
    from: &str,
    time1: Time,
    to: &str,
    time2: Time,
    fixed_frame: &str
) -> Result<TransformStamped, TfError>
[src]

Looks up a transform within the tree at a given time.

Auto Trait Implementations

impl RefUnwindSafe for TfListener

impl Send for TfListener

impl Sync for TfListener

impl Unpin for TfListener

impl UnwindSafe for TfListener

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]