Struct tf_rosrust::TfListener[][src]

pub struct TfListener { /* fields omitted */ }
Expand description

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

Example usage:

use tf_rosrust::TfListener;

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", rosrust::Time::new());
    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.

Implementations

Create a new TfListener

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

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

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Get the TypeId of this object.