Skip to content
Michal Čáp edited this page Feb 1, 2016 · 11 revisions

Trajectory Tools

History

Alite TrajectoryTools (abbreviated as tt or TT) is a Java toolkit (a bundle of loosely-coupled classes) developed mostly within Agent Technology Center as a platform for sharing potentially reusable code between individual members working on different projects involving trajectory planning. Since the continuing development of TT is mostly a side-effect of other work we do, there has never been much effort put in cleaning the API, writing the documentation etc. This document explains the main philosophy of the toolkit and should help you with orientation in the code.

Maven Configuration

The easiest way to add TT as a dependency of your project is through Maven. The Maven artifacts are stored at a dedicated publicly-accessible repository. Add the following snippet to your pom.xml to tell Maven where it needs to search for the TT artifacts:

<repositories>
	<repository>
		<id>atg-repo</id>
		<name>atg-repo</name>
		<url>http://jones.felk.cvut.cz/artifactory/repo</url>
		<snapshots>
			<updatePolicy>always</updatePolicy>
		</snapshots>
		<releases />
	</repository>
</repositories>   

Then add this snippet to your <dependencies> section in pom.xml:

    <dependency>
        <groupId>cz.agents.alite</groupId>
        <artifactId>trajectorytools</artifactId>
        <version>2.1-SNAPSHOT</version>
    </dependency>

Naming Conventions and Packages

The TT toolkit contains utility classes that are meant to be used in various different context. E.g. a class Point may represent a point in Euclidean 2-d space or a point in a space-time. To distinguish different types of concepts according to the context (usually the type of space) in which they are meant to be used, we put them to different packages. To make mixing of identically named classes from different packages easier, we use short package names such as tt.euclid2d or tt.euclidtime3i even though they do not fully respect Java naming conventions. The following table summarizes the content of individual packages:

  • tt.continous -- Utility classes relevant for arbitrary continuous space.

  • tt.discrete -- Utility classes relevant for arbitrary discrete space.

  • tt.euclid2d -- Utility classes relevant for 2-d Euclidean space. A point is represented by a pair of doubles.

  • tt.euclid2i -- Utility classes relevant for 2-d Euclidean space. A point is represented by a pair of integers.

  • tt.euclidtime3i -- Utility classes relevant for space-time with 2 spatial dimensions and 1 time dimension. A point is represented by a triplet of integers.

  • tt.euclidyaw3d -- Utility classes relevant for planning in a configuration space with 2 spatial dimensions representing position of an agent and one dimension representing its heading (yaw). A point is represented by a triplet of doubles. Contains e.g. Dubins curve implementation.

  • tt.util -- General-purpose support classes.

  • tt.planner -- General planners. Contains e.g. RRT* implementation.

  • tt.vis -- General visualization layers for Alite visio.

  • org.jgrapht -- Classes applicable to general JGraphT graphs and following JGraphtT conventions. Contains e.g. A* implementation for JGraphT graphs.

Notes

Representing points in 2-d Euclidean space by pairs of doubles (i.e. euclid2d) can in some contexts suffer from numerical instability and thus most of the functionality is implemented using euclid2i representation that uses pairs of integers.

Getting started

The best way to get started is to examine the demos that illustrate how to combine the individual components of TT:

  • tt.euclid2i.demo.PathfindingDemo -- Illustrates how to find a shortest path on a graph.
  • tt.euclidtime3i.demo.PathfindingDemo --- Illustrates how to find a space-time trajectory avoiding moving obstacles. When the visualization window appears, press 'q'/'a' key to simulate the execution of the trajectory and move forward/backwards in time.
  • tt.euclidyaw3d.dubins.DubinsDemo -- Illustrates how to create a Dubin's curve.