Skip to content

Releases: NVlabs/trajdata

1.4.0 - Quality of life improvements, new features, and bugfixes

25 Jan 22:49
Compare
Choose a tag to compare

In this release, we:

  • Added support for fast map area queries (backed by an STRTree within trajdata's VectorMap).
  • Added quality of life improvements (additional warnings, the ability to control if maps are kept in memory, etc).
  • Fixed the format of nuPlan Lane IDs (mainly impacting traffic light queries).
  • Added the ability to cache the data index to disk (speeding up subsequent trajdata initializations for the same core arguments).

1.3.3 - Adding support for the full nuPlan dataset and bugfixes

23 Aug 01:53
Compare
Choose a tag to compare

Adding support for the nuPlan Dataset!

This release also contains bugfixes related to:

  • A typo in vector map tests.
  • Handling of scenes with only the ego vehicle present.
  • Imports related to the INTERACTION dataset.
  • A typo related to traffic light <-> lane associations.
  • Loading of traffic light data during batching and in the map API.
  • Passing information to the vector map constructor during dataset initialization.

It also adds CI that runs tests (still simple for now) per commit as well as automated publishing of releases to PyPI!

1.3.2 - Adding support for the INTERACTION and SDD datasets!

14 Jun 07:11
Compare
Choose a tag to compare

Adding support for the INTERACTION dataset and Stanford Drone Dataset (SDD), as well as improvements to a few internal utilities to better support datasets like it.

1.3.1 - Waymo Open Motion Dataset Support

22 Apr 06:43
860908a
Compare
Choose a tag to compare

Adding support for the Waymo Open Motion Dataset!

Please note, there are a few caveats with this release:

  • Traffic light colors are not yet perfectly aligned between Waymo and trajdata (we haven't had a dataset that distinguishes between yellow/caution lights and red/stop lights yet). Stay tuned for a small update in the future to fix this!
  • There are known issues with the mapping of lanes to lane boundaries (this is immediately visible when rendering Waymo scenes in trajdata). In essence, mapping lane boundaries to lanes can be quite complicated in the Waymo dataset... so we tried our best to align lanes to their respective lane boundaries.
    • For example, when there are no direct lane-to-boundary mappings provided, we subdivide lanes into chunks with the same availability of lane boundaries to their left and right (measured geometrically via projection).

1.3.0 - Interactive Visualizations with Bokeh (+ Animations!) as well as a new SceneTimeBatcher batch sampler

22 Apr 00:07
Compare
Choose a tag to compare

This version brings with it a major visualization upgrade, now with HTML-based interactive plots and animations! Additionally, we provide trajdata.utils.batch_utils.SceneTimeBatcher, a batch_sampler that can be fed into a standard torch dataloader, for use cases where one wants to loop through a whole Agent-centric dataset, but calculate statistics grouped by individual timesteps in scenes.

See the notes below for more details.

  • Users can now create interactive plots via Bokeh's HTML-based visualization library. Beyond static figures, users can also create interactive animations! Take a look at examples/visualization_example.py to see how you can use these features too!
  • SceneTimeBatcher is a batch sampler that can be fed into a standard PyTorch dataloader, e.g.,
    dataset = UnifiedDataset(
        desired_data=["nusc_mini-mini_train"],
        centric="agent"
    )

    dataloader = DataLoader(
        dataset,
        batch_sampler=SceneTimeBatcher(dataset),
        collate_fn=dataset.get_collate_fn(),
        num_workers=4,
    )

Each batch from the resulting dataset is an AgentBatch, but with each element corresponding to each agent at a particular timestep in a particular scene. An example is provided at examples/scenetimebatcher_example.py.

  • Added information about the nuPlan dataset to DATASETS.md, additional tests related to the above additions, and bugfixes.

1.2.1 - Bugfixes primarily related to StateTensor/StateArray

11 Feb 08:06
Compare
Choose a tag to compare

This release mainly brings bugfixes related to the introduction of StateTensor and StateArray. Thankfully, things seem to be much more stable now and all of trajdata's core usecases should be working fully again.

Further, lat/lon velocity components can now be requested from state arrays/tensors (new feature).

1.2.0 - New handling of state information, visualization improvements, and more!

01 Feb 00:58
Compare
Choose a tag to compare

This version brings with it a major overhaul of how tensors/arrays with state information are treated, a few extra functionalities related to lane querying, improvements to visualization (stay tuned for more improvements along this direction in the future), and bugfixes. See the notes below for more details.

  • The agent state information returned in the Agent/SceneBatch or Agent/SceneBatchElement objects now includes z information for all datasets. This is required for association with VectorMap elements which include z information.
  • Instead of state information being stored as simple torch.Tensor or np.ndarray objects in Agent/SceneBatch or Agent/SceneBatchElement objects, they are stored as a new StateTensor or StateArray objects. These types subclass Tensor or ndarray, so downstream pytorch model should work as expected. However, these subclasses allow writing code to access state-elements semantically, rather than relying on say, the x velocity appearing at index 3. This allows downstream code to be written in a more readable manner, and in a way that is robust to future changes in state order, e.g. if we need to add more 3d information, or add properties like heading rate, etc. Furthermore, moving forward, we can write general purpose state transformation utilities that operate on these State objects. See examples/state_example.py for an example.
  • Added a get_current_lane function to VectorMap which takes in xyzh of an agent, and returns a set of lanes that the agent is likely to be on. (Unlike get_closest_lane, this factors in the heading of the agent as well. Updated the examples/lane_query_example.py to use this function. The results are much better in intersections, where there are many overlapping lanes.
  • Added arguments to UnifiedDataset that allow the user to specify the desired state elements upon its construction (e.g., which derivatives do they want? do they want heading in sin/cos format or not?)
  • Improvements to visualization.
  • Bugfixes and additional tests for StateTensor propagation across a few different computations.

1.1.1 - Small set of new features, gearing up for 1.2.0 soon

09 Jan 20:20
Compare
Choose a tag to compare

This release adds a couple new features as well as bugfixes and preparation for the next big release (v1.2.0, stay tuned!).

Namely, we've added:

  • AgentBatch-SceneBatch transform utilities.
  • Batch filtering.
  • Agent metadata.
  • xyz-based lane distance querying.
  • Ability to query for the unique set of closest lanes.
  • Bugfixes related to torch distributed use, simulation arguments, and neighbor type order.

1.1.0 - New vector map API, initial (beta) support for nuPlan, refactoring code structure, and more!

18 Nov 01:22
Compare
Choose a tag to compare

Lots of new features and internal changes in this version!

Namely, we've implemented:

  • Initial (beta) support for nuPlan! So far, we've only really tested the nuPlan mini split and are waiting for the devkit to be released more widely (e.g., on PyPI) before supporting the rest of the dataset.
  • A new VectorMap object which provides users a unified interface to dataset maps (if available). It supports efficient geometric querying for nearest lanes, accessing raw polylines and polygons, traffic light status (beta, and only currently implemented for nuPlan), as well as basic utilities like interpolation and projection. We also provide new example scripts (examples/{map_api, simple_map_api, lane_query}_example.py) demonstrating some functions of the new vector map API.
    • NOTE: The way lane querying is done will change slightly in the future, currently heading is taken as an input but this will be removed explicitly in the future.
    • NOTE: While many of the typical map elements from AV datasets are included (i.e., road lanes, driveable areas, pedestrian crosswalks and walkways), not all are. Keep an eye out for future updates which address this and expand upon our map format!
  • A MapAPI object that manages and creates/loads VectorMap objects.
  • Changes to some of the UnifiedDataset init arguments to distinguish between vector map parameters and rasterized map parameters.
  • The (beta) capability to store and load already-computed batch elements for significantly faster loading later. See examples/cache_and_filter_example.py for an example of its usage.
    • NOTE: While we provide an initial implementation of this functionality, it is not very efficient right now and uses a lot of space on disk. Look out for future updates that improve upon this!
  • Internal code refactors to put utilities and other classes in more sensible locations (e.g., now all utilities live within utils/, they were more spread out before).
  • Added utilities (and associated tests) for converting between batch types.
  • Added tests for a few map functions (to be expanded).

If upgrading from a previous version, please make sure to delete your unified data cache and recreate it using this latest version of trajdata.

1.0.8 - A few extra features as well as a hotfix related to rasterized maps

06 Oct 19:43
Compare
Choose a tag to compare

The extra features are:

  • Enabling the limiting of the maximum number of neighbors included in an agent-centric batch element.
  • Enabling the returning of only ego-centric batches.

The hotfix refers to bringing back the original format of datasets' map rasterizations (prior to v1.0.7 you could choose between having RGB channels or semantic channels, e.g., nuScenes has 7, however v1.0.7 inadvertently removed the latter and so this hotfix brings it back). Users can request rasterized maps in a dataset's original format by adding "original_format": True to the map_params dict. By default, it is False.

NOTE: Changing the desired format of rasterized maps necessitates re-caching maps in the unified data cache.