Crates.io | tf_rosrust |
lib.rs | tf_rosrust |
version | 0.1.0 |
source | src |
created_at | 2021-07-01 02:45:41.101049 |
updated_at | 2023-03-20 01:54:45.307853 |
description | This is a rust port of the [ROS tf library](http://wiki.ros.org/tf). It is intended for being used in robots to help keep track of multiple coordinate frames and is part of a larger suite of rust libraries that provide support for various robotics related functionality. |
homepage | https://github.com/smilerobotics/tf_rosrust |
repository | https://github.com/smilerobotics/tf_rosrust |
max_upload_size | |
id | 417186 |
size | 112,473 |
This project is forked from arjo129 rustros_tf,MaxiMaerz rustros_tf.
This is a rust port of the ROS tf library. It is intended for being used in robots to help keep track of multiple coordinate frames and is part of a larger suite of rust libraries that provide support for various robotics related functionality.
So far the only the following have been implemented:
TfListener
with lookup_transform
and time traversal.TfBroadcaster
to publish /tf
I am still working on the following:
unwrap()
sCurrently only Ubuntu 18.04 running ROS Melodic on x86_64 is tested. It should work on any linux based system with a proper ROS installation.
Install ROS first. On ubuntu, this can be done like so:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
curl -sSL 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xC1CF6E31E6BADE8868B172B4F42ED6FBAB17C654' | sudo apt-key add -
sudo apt update
sudo apt install ros-melodic-desktop
After installing ROS, you may simply add this crate as a dependency to your cargo project:
[dependencies]
tf_rosrust = "0.0.5"
This product includes copies and modifications of software developed by third parties:
ros_msgs
includes copies and modifications of msg packages by ros and tf2_msgs, licensed under the 2-Clause BSD License.See the license files included in these directories for more details.
The following example shows a simple lookup.
use tf_rosrust::TfListener;
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", rosrust::Time::new());
println!("{tf:?}");
rate.sleep();
}
}