TF implementation for rosjava.
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 13 commits ahead of nickarmstrongcrews:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
rosjava_tf
rosjava_tf_core
rosjava_tf_tools
.gitignore
README.md

README.md

rosjava_tf

This package provides an implementation of TF for rosjava.

Dependencies / Installation

We use jgrapht to represent the tree of TF frames and javax.vecmath for linear algebra. All dependencies are handled via gradle. Just clone this package into your rosjava workspace and run catkin_make.

If you need cross-compile compatability for older java versions have a look at the java6 branch.

Usage

Creating a subscriber

import org.ros.rosjava.tf.Transform;
import org.ros.rosjava.tf.pubsub.TransformListener;

...

TransformListener tfl = new TransformListener(connectedNode);
long now = (long) System.currentTimeMillis() * 1000000; // nanoseconds
String from = "map";
String to = "base_link";

try {
  Transform tx = tfl.getTree().lookupTransformBetween(from, to, now);
  System.out.println(tx);
}
catch (Exception e) {
  System.err.println("Error: "+e.toString());
}

Aknowledgments

Most of this software is based on the previous works of Nick Armstrong Crews' rosjava-tf package. It has been updated to Kinetic and many unfinished and/or broken methods have been fixed.