Coder Social home page Coder Social logo

open-tracking-tools's Introduction

This library contains a set of tools for tracking objects through GPS data real-time.
Specifically, it contains implementations of Bayesian particle filters for on-road and off-road 2D motion and state-parameter estimation.

The generic api uses a graph and some observations to produce sequential filtered results, which infer the true location, velocity, their variances, the street it's on/the path it took. Extensions in this library include the ability to estimate parameters, like GPS and acceleration errors. See https://github.com/openplans/open-tracking-tools/wiki for a better description.

To get started, you can build an OpenTripPlanner graph by specifying coordinate boundaries for OpenStreetMap data, then running the TraceRunner in open-tracking-tools-otp over a CSV file. (See https://github.com/openplans/OpenTripPlanner/wiki/GraphBuilder for more information about OTP graph building.) An example xml build file for an OTP graph can be found in the open-tracking-tools-otp project, as well as an example TraceRunner config file.

Another example of a graph is GenericJTSGraph.java, which takes simple JTS geometry objects.

There is also a simulator that will produce observations for testing. See RoadTrackingGraphFilterTest.java for a complete example of graph construction, simulation and filtering.

open-tracking-tools's People

Contributors

asutula avatar brandonwillard avatar dependabot[bot] avatar kpwebb avatar sheldonabrown avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open-tracking-tools's Issues

Build graph builder stage for converting OTP to Cartesian space

[18:21] I think this will end up being a separate GraphBuilder stage which lives in tracking tools.
[18:23] <novalis_dt> Right now, the spherical distance functions are in DistanceLibrary, and are static
[18:23] <novalis_dt> We would just make that dynamic

short-circut overlaping paths

Problem:
[17:34] in our search for paths, where we won't return [[edge1], [edge1, edge2]]
[17:34] but instead [[edge1, edge2]]
[17:35] and in the filter, where we computations for those edges are are reused

Solution:
<novalis_dt> kpw, here's a sketch, I think.
[17:40] <novalis_dt> Insert each path into a trie-like structure
[17:41] <novalis_dt> If, when inserting a path, you stop at a node that has children, mark the current path as unused
[17:41] <novalis_dt> Store with each node a list of paths that use it
[17:41] <novalis_dt> If, when inserting a path, you go past a node that previously had no children
[17:41] <novalis_dt> then for each path in that node's list of paths, mark that path as unused.
[17:42] <novalis_dt> Pretty sure that's O(n*m), where n is the number of paths and m is the avg number of edges in a path.

Update OTP integration to use the latest OTP (and build via maven only).

The maven-pulled OTP 0.7.10 jar doesn't appear to have the necessary getters (getModes, specifically) so it won't build via maven alone. It seems to work if one pulls everything--including OTP source--into Eclipse, then adds Lombok to Eclipse and compiles.

Hopefully updating the OTP dependency will resolve some of that.

Improve throughput

Determine a throughput goal/requirement.
Inspect profiled runs and determine/prioritize where the changes need to be made.

short-circut overlaping paths

Problem:
[17:34] in our search for paths, where we won't return [[edge1], [edge1, edge2]]
[17:34] but instead [[edge1, edge2]]
[17:35] and in the filter, where we computations for those edges are are reused

Solution:
<novalis_dt> kpw, here's a sketch, I think.
[17:40] <novalis_dt> Insert each path into a trie-like structure
[17:41] <novalis_dt> If, when inserting a path, you stop at a node that has children, mark the current path as unused
[17:41] <novalis_dt> Store with each node a list of paths that use it
[17:41] <novalis_dt> If, when inserting a path, you go past a node that previously had no children
[17:41] <novalis_dt> then for each path in that node's list of paths, mark that path as unused.
[17:42] <novalis_dt> Pretty sure that's O(n*m), where n is the number of paths and m is the avg number of edges in a path.

Running TraceRunner

I need two files to run traceRunner
3905-detour-labeled_ott.csv
3905-detour-labeled_ott-filtered.json

Path Search Issues/Questions

Paths are not being found for the vehicle 861785000283626 on 2012-04-06 (2012-04-12_test_small.csv) at observation/record 61.

put a limit on search distances for paths

[13:13] <novalis_dt> The quickest fix to getPaths will be to use a max search radius
[13:14] the most direct/reasonable thing we can provide is expected distances to travel
[13:14] which i imagine works similarly
[13:18] well, we can make a reasonable upper bound from it
[13:18] it is a mean and variance
[13:18] so we can just say that we want the upper 99% of the distribution

Fix OTP path finding

The default graph in OTT is from Geotools and all the search & path code is built around that. There is old code for an A* search performed directly on the OTP graph, but it's not up to date.
There are two approaches we can take:

  • Create a Geotools graph from the OTP graph
    • Pros: might be quicker to implement and get working properly
    • Cons: will probably ignore some road constraints unless some extra checks are put in place, construction overhead (memory/time)
  • Update the old OTP path-finding code.
    • Pros: leverages existing OTP search capabilities, easier to use and include road restrictions
    • Cons: more time to convert code, which involves refactoring to consider road segments

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.