[−][src]Struct rustros_tf::TfListener
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]
&self,
from: &str,
to: &str,
time: Time
) -> Result<TransformStamped, TfError>
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]
&self,
from: &str,
time1: Time,
to: &str,
time2: Time,
fixed_frame: &str
) -> Result<TransformStamped, TfError>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn is_in_subset(&self) -> bool
[src]
unsafe fn to_subset_unchecked(&self) -> SS
[src]
fn from_subset(element: &SS) -> SP
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
[src]
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,