diff --git a/.gitignore b/.gitignore index 5f762743f6afcdf7443b26c2a4ee3288102fa82b..3825a6ab5a89436ea58a3513859272e88abee742 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ dist .coverage report.xml htmlcov -docs +html env !tests/resources/*.hdf5 diff --git a/README.md b/README.md index 5da734e05530add0c7ef723c9990f3634dbcd57f..d421dc1ed1f2045f66d41efd34628a8d2f09d5e8 100644 --- a/README.md +++ b/README.md @@ -9,59 +9,61 @@ [](https://git.imp.fu-berlin.de/bioroboticslab/robofish/io/commits/master) # Robofish IO -This repository implements an easy to use interface, to create, save, load, and work [specification-compliant](https://git.imp.fu-berlin.de/bioroboticslab/robofish/track_format) hdf5 files, containing 2D swarm data. This repository should be used by the different swarm projects to generate comparable standardized files. +This repository implements an easy to use interface, to create, save, load, and work with [specification-compliant](https://git.imp.fu-berlin.de/bioroboticslab/robofish/track_format) hdf5 files, containing 2D swarm data. This repository should be used by the different swarm projects to generate comparable standardized files. ## Installation -Quick variant: -``` -pip3 install robofish-trackviewer robofish-io --extra-index-url https://git.imp.fu-berlin.de/api/v4/projects/6392/packages/pypi/simple +Add our [Artifacts repository](https://git.imp.fu-berlin.de/bioroboticslab/robofish/artifacts) to your pip config and install the packagage. + +```bash +python3 -m pip config set global.extra-index-url https://git.imp.fu-berlin.de/api/v4/projects/6392/packages/pypi/simple +python3 -m pip install robofish-io ``` -Better variant: -- Follow instructions at [Artifacts repository](https://git.imp.fu-berlin.de/bioroboticslab/robofish/artifacts) -- ```pip3 install robofish-io``` ## Usage We show a simple example below. More examples can be found in ```examples/``` ```python -import robofish.io -import numpy as np - - # Create a new robofish io file f = robofish.io.File(world_size_cm=[100, 100], frequency_hz=25.0) f.attrs["experiment_setup"] = "This is a simple example with made up data." -# Create a new robot entity. Positions and orientations are passed -# separately in this example. Since the orientations have two columns, -# unit vectors are assumed (orientation_x, orientation_y) +# Create a new robot entity with 10 timesteps. +# Positions and orientations are passed separately in this example. +# Since the orientations have two columns, unit vectors are assumed +# (orientation_x, orientation_y) f.create_entity( category="robot", name="robot", - positions=np.zeros((100, 2)), - orientations=np.ones((100, 2)) * [0, 1], + positions=np.zeros((10, 2)), + orientations=np.ones((10, 2)) * [0, 1], ) -# Create a new fish entity. +# Create a new fish entity with 10 timesteps. # In this case, we pass positions and orientations together (x, y, rad). # Since it is a 3 column array, orientations in radiants are assumed. -poses = np.zeros((100, 3)) -poses[:, 0] = np.arange(-50, 50) -poses[:, 1] = np.arange(-50, 50) -poses[:, 2] = np.arange(0, 2 * np.pi, step=2 * np.pi / 100) +poses = np.zeros((10, 3)) +poses[:, 0] = np.arange(-5, 5) +poses[:, 1] = np.arange(-5, 5) +poses[:, 2] = np.arange(0, 2 * np.pi, step=2 * np.pi / 10) fish = f.create_entity("fish", poses=poses) fish.attrs["species"] = "My rotating spaghetti fish" fish.attrs["fish_standard_length_cm"] = 10 -# Show and save the file -print(f) -print("Poses Shape: ", f.entity_poses.shape) +# Some possibilities to access the data +print(f"The file:\n{f}") +print( + f"Poses Shape:\t{f.entity_poses_rad.shape}.\t" + + "Representing(entities, timesteps, pose dimensions (x, y, ori)" +) +print(f"The actions of one Fish, (timesteps, (speed, turn)):\n{fish.speed_turn}") +print(f"Fish poses with calculated orientations:\n{fish.poses_calc_ori_rad}") -f.save_as(path) +# Save the file +f.save_as("example.hdf5") ``` ### Evaluation diff --git a/docs/entity.md b/docs/entity.md new file mode 100644 index 0000000000000000000000000000000000000000..119880ac67ef72e7f7453284e3215f5cc663197d --- /dev/null +++ b/docs/entity.md @@ -0,0 +1,84 @@ +Tracks of entities are stored in `robofish.io.entity.Entity` objects. They are created by the `robofish.io.file.File` object. They require a category and can have a name. If no name is given, it will be created, using the category and an id. + +```python +f = robofish.io.File(world_size_cm=[100, 100], frequency_hz=25.0) +nemo = f.create_entity(category="fish", name="nemo") +``` + +The function `create_entity()` returns an entity object. It can be stored but it's not neccessary. The entity is automatically stored in the file. + +## Pose options + +The poses of an entity can be passed in multiple ways. Poses are divided into `positions` (x, y) and `orientations`. +Orientations are internally represented in unit vectors but can also be passed in rads. +The shape of the passed orientation array defines the meaning. + +```python +# Create dummy poses for 100 timesteps +pos = np.zeros((100, 2)) +ori_vec = np.zeros((100,2)) * [0, 1] +ori_rad = np.zeros((100,1)) + +# Creating an entity without orientations. Here we keep the entity object, to use it later. +f.create_entity(category="fish", positions=pos) +# Creating an entity using orientation vectors. Keeping the entity object is not neccessary, it is saved in the file. +f.create_entity(category="fish", positions=pos, orientations=ori_vec) +# Creating an entity using radiant orientations. +f.create_entity(category="fish", positions=pos, orientations=ori_rad) +``` + +The poses can be also passed in an combined array. +```python +# Create an entity using orientation vectors. +f.create_entity(category="fish", poses=np.ones((100,4)) * np.sqrt(2)) +# Create an entity using radiant orientations +f.create_entity(category="fish", poses=np.zeros((100,3))) +``` + +## Creating multiple entities at once + +Multiple entities can be created at once. +```python +# Here we create 4 fishes from poses with radiant orientation +f.create_multiple_entities(category="fish", poses=np.zeros((4,100,3))) +``` + +## Attributes + +Entities can have attributes to describe them. + +The attributes can be set like this: +```python +nemo.attrs["species"] = "Clownfish" +nemo.attrs["fish_standard_length_cm"] = 10 +``` + +Any attribute is allowed, but some cannonical attributes are prepared:<br> +`species`: str, `sex`: str, `fish_standard_length_cm`: float + + +## Properties + +As described in `robofish.io`, Files and Entities have useful properties. + +| Entity function | Description | +|--------------------------------- |------------------------------------------------------------------------------------------------------- | +| `robofish.io.entity.Entity.positions` | The positions as a (timesteps, 2 (x, y)) arary. | +| `robofish.io.entity.Entity.orientations` | The orientations as a (timesteps, 2 (ori_x, ori_y)) arary. | +| `robofish.io.entity.Entity.orientations_rad` | The orientations as a (timesteps, 1 (ori_rad)) arary. | +| `robofish.io.entity.Entity.poses` | The poses as a (timesteps, 4 (x, y, x_ori, y_ori)) array. | +| `robofish.io.entity.Entity.poses_rad` | The poses as a (timesteps, 3(x, y, ori_rad)) array. | +| `robofish.io.entity.Entity.poses_calc_ori_rad` | The poses with calculated orientations as a<br>(timesteps - 1, 3 (x, y, calc_ori_rad)) array. | +| `robofish.io.entity.Entity.speed_turn` | The speed and turn as a (timesteps - 2, 2 (speed_cm/s, turn_rad/s)) array. | + +### Calculated orientations and speeds. + + + +The image shows, how the orientations are calculated (`robofish.io.entity.Entity.poses_calc_ori_rad`), the orientations always show away from the last position. In this way, the first position does not have an orientation and the shape of the resulting array is `(timesteps - 1, 3 (x, y, calc_ori_rad))`. + +The meaning of the `robofish.io.entity.Entity.speed_turn` can also be explained with the image. The turn is the angle, the agent has to turn, to orientate towards the next position. The speed is the calculated, using the distance between two positions. The resulting turn and speed is converted to `[rad/s]` and `[cm/s]`. The first and last position don't have any action which results in an array shape of `(timesteps - 2, 2 (speed, turn))`. + +--- + +⚠️ Try this out by extending the example of the main doc, so that a new teleporting fish with random positions [-50, 50] is generated. How does that change the output and speed histogram `robofish-io-evaluate speed example.hdf5`? Try writing some attributes. diff --git a/docs/file.md b/docs/file.md new file mode 100644 index 0000000000000000000000000000000000000000..3c5e7fdc6dbb152a6f8189fc8c4b5922db087408 --- /dev/null +++ b/docs/file.md @@ -0,0 +1,48 @@ +`robofish.io.file.File` objects are the root of the project. The object contains all information about the environment, entities, and time. + +In the simplest form we define a new File with a world size in cm and a frequency in hz. Afterwards, we can save it with a path. + +```python +import robofish.io + +# Create a new robofish io file +f = robofish.io.File(world_size_cm=[100, 100], frequency_hz=25.0) +f.save_as("test.hdf5") +``` + +--- + +The File object can also be generated, with a given path. In this case, we work on the file directly. The `with` block ensures, that the file is validated after the block. + +```python +with robofish.io.File( + "test.hdf5", mode="x", world_size_cm=[100, 100], frequency_hz=25.0 +) as f: + # Use file f here +``` + +When opening a file with a path, a mode should be specified to describe how the file should be opened. + +| Mode | Description | +|------ |---------------------------------------- | +| r | Readonly, file must exist (default) | +| r+ | Read/write, file must exist | +| w | Create file, truncate if exists | +| x | Create file, fail if exists | +| a | Read/write if exists, create otherwise | + +--- + +Attributes of the file can be added, to describe the contents. +The attributes can be set like this: +```python +f.attrs["experiment_setup"] = "This file comes from the tutorial." +f.attrs["experiment_issues"] = "All data in this file is made up." +``` + +Any attribute is allowed, but some cannonical attributes are prepared:<br> +`publication_url, video_url, tracking_software_name, tracking_software_version, tracking_software_url, experiment_setup, experiment_issues` + +--- + +All file functions and their documentation can be found at `robofish.io.file.File`. \ No newline at end of file diff --git a/docs/img/calc_ori_speed_turn.md b/docs/img/calc_ori_speed_turn.md new file mode 100644 index 0000000000000000000000000000000000000000..7d08ae60623017c37698ba93096de374e4d7f78a --- /dev/null +++ b/docs/img/calc_ori_speed_turn.md @@ -0,0 +1 @@ +testtesttest \ No newline at end of file diff --git a/docs/img/calc_ori_speed_turn.png b/docs/img/calc_ori_speed_turn.png new file mode 100644 index 0000000000000000000000000000000000000000..439d4c95455a2c2ee8f30ee616ccf2420277a5e3 Binary files /dev/null and b/docs/img/calc_ori_speed_turn.png differ diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000000000000000000000000000000000000..ae143c8e6ef6359fe947122a32fca8c0f6524905 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,141 @@ +This package provides you: + +- Creation, storing, loading, modifying, inspecting of io-files. +- Preprocessing (orientation calculation, action calculation, raycasting, ...) +- Quick and easy evaluation of behavior +- Data, which is interchangable between labs and tools. No conversions required, since units and coordinate systems are standardized. +- No custom data import, but just `include robofish.io` + +Features coming up: + +- Interface for unified behavior models +- Pytorch Datasets directly from `robofish.io` files. + + +## Installation +Add our [Artifacts repository](https://git.imp.fu-berlin.de/bioroboticslab/robofish/artifacts) to your pip config and install the packagage. + +```bash +python3 -m pip config set global.extra-index-url https://git.imp.fu-berlin.de/api/v4/projects/6392/packages/pypi/simple +python3 -m pip install robofish-io robofish-trackviewer +``` + +## Usage + +This documentation is structured to increase in complexity. +First we'll execute the example from the README. More examples can be found in ```examples/```. + +```python +# Create a new robofish io file +f = robofish.io.File(world_size_cm=[100, 100], frequency_hz=25.0) +f.attrs["experiment_setup"] = "This is a simple example with made up data." + +# Create a new robot entity with 10 timesteps. +# Positions and orientations are passed separately in this example. +# Since the orientations have two columns, unit vectors are assumed +# (orientation_x, orientation_y) +f.create_entity( + category="robot", + name="robot", + positions=np.zeros((10, 2)), + orientations=np.ones((10, 2)) * [0, 1], +) + +# Create a new fish entity with 10 timesteps. +# In this case, we pass positions and orientations together (x, y, rad). +# Since it is a 3 column array, orientations in radiants are assumed. +poses = np.zeros((10, 3)) +poses[:, 0] = np.arange(-5, 5) +poses[:, 1] = np.arange(-5, 5) +poses[:, 2] = np.arange(0, 2 * np.pi, step=2 * np.pi / 10) +fish = f.create_entity("fish", poses=poses) +fish.attrs["species"] = "My rotating spaghetti fish" +fish.attrs["fish_standard_length_cm"] = 10 + +# Some possibilities to access the data +print(f"The file:\n{f}") +print( + f"Poses Shape:\t{f.entity_poses_rad.shape}.\t" + + "Representing(entities, timesteps, pose dimensions (x, y, ori)" +) +print(f"The actions of one Fish, (timesteps, (speed, turn)):\n{fish.speed_turn}") +print(f"Fish poses with calculated orientations:\n{fish.poses_calc_ori_rad}") + +# Save the file +f.save_as("example.hdf5") +``` + +⚠️ Please try out the example on your computer and read the output. + +We created an `robofish.io.file.File` object, then we added two `robofish.io.entity.Entity` objects. +Afterwards we read some properties of the file and printed them *(more info in [Reading Properties](#reading-properties))*. +Lastly, we saved the file to `example.hdf5`. +Congrats, you created your first io file. We'll continue working with it. + +--- + +We can examine the file now by using commandline tools. These are some examples, more details in [Commandline Tools](## Commandline Tools) + +```bash +robofish-io-print example.hdf5 +``` +Checking out the file content. + +```bash +robofish-io-evaluate speed example.hdf5 +``` +Show a histogram of speeds in the file. For more evaluation options check `robofish-io-evaluate --help` + +```bash +robofish-trackviewer example.hdf5 +``` +View a video of the track in an interactive window. + +Further details about the commandline tools can be found in `robofish.io.app`. + +## Accessing real data +Until now, we only worked with dummy data. Data from different sources is available in the Trackdb. It is currently stored at the FU Box. + +⚠️ If you don't have access to the Trackdb yet, please text Andi by Mail or Mattermost (andi.gerken@gmail.com) + + +## Reading properties + +Files and entities have usefull properties to access their content. In this way, positions, orientations, speeds, and turns can be accessed easily. + +All shown property functions can be called from a file or on one entity. +The function names are identical but have a `entity_` prefix. + +```python +f = robofish.io.File(world_size_cm=[100, 100], frequency_hz=25.0) +nemo = f.create_entity(category='fish', name='nemo', poses=np.zeros((10,3))) +dori = f.create_entity(category='fish', name='dori', poses=np.zeros((10,3))) + + +# Get the poses of nemo. Resulting in a (10,3) array +print(nemo.poses_rad) + +# Get the poses of all entities. Resulting in a (2,10,3) array. +print(f.entity_poses_rad) +``` + +In the same scheme the following properties are available: + + +| File/ Entity function | Description | +|--------------------------------- |------------------------------------------------------------------------------------------------------- | +| *entity_*positions | The positions as a (*entities*, timesteps, 2 (x, y)) arary. | +| *entity_*orientations | The orientations as a (*entities*, timesteps, 2 (ori_x, ori_y)) arary. | +| *entity_*orientations_rad | The orientations as a (*entities*, timesteps, 1 (ori_rad)) arary. | +| *entity_*poses | The poses as a (*entities*, timesteps, 4 (x, y, x_ori, y_ori)) array. | +| *entity_*poses_rad | The poses as a (*entities*, timesteps, 3(x, y, ori_rad)) array. | +| *entity_*poses_calc_ori_rad | The poses with calculated orientations as a<br>(*entities*, timesteps - 1, 3 (x, y, calc_ori_rad)) array. | +| *entity_*speed_turn | The speed and turn as a (*entities*, timesteps - 2, 2 (speed_cm/s, turn_rad/s)) array. | + +The functions `robofish.io.entity.Entity.poses_calc_ori_rad` and `robofish.io.entity.Entity.speed_turn` are described in detail in `robofish.io.entity` + +## Where to continue? +We recommend continuing to read advanced options for `robofish.io.file`s and `robofish.io.entity`s. +Create some files, validate them, look at them in the trackviewer, evaluate them. + +If you find bugs or get stuck somewhere, please text `Andi` on Mattermost or by mail (andi.gerken@gmail.com) \ No newline at end of file diff --git a/examples/example_readme.py b/examples/example_readme.py index 197ada6ca723871aaa24aaa87b3aed6469311d28..6798f9dd2e6916cc8b9354f8f68898247f858f37 100644 --- a/examples/example_readme.py +++ b/examples/example_readme.py @@ -7,32 +7,38 @@ def create_example_file(path): f = robofish.io.File(world_size_cm=[100, 100], frequency_hz=25.0) f.attrs["experiment_setup"] = "This is a simple example with made up data." - # Create a new robot entity. Positions and orientations are passed - # separately in this example. Since the orientations have two columns, - # unit vectors are assumed (orientation_x, orientation_y) - circle_rad = np.linspace(0, 2 * np.pi, num=100) + # Create a new robot entity with 10 timesteps. + # Positions and orientations are passed separately in this example. + # Since the orientations have two columns, unit vectors are assumed + # (orientation_x, orientation_y) f.create_entity( category="robot", name="robot", - positions=np.stack((np.cos(circle_rad), np.sin(circle_rad))).T * 40, - orientations=np.stack((-np.sin(circle_rad), np.cos(circle_rad))).T, + positions=np.zeros((10, 2)), + orientations=np.ones((10, 2)) * [0, 1], ) - # Create a new fish entity. + # Create a new fish entity with 10 timesteps. # In this case, we pass positions and orientations together (x, y, rad). # Since it is a 3 column array, orientations in radiants are assumed. - poses = np.zeros((100, 3)) - poses[:, 0] = np.arange(-50, 50) - poses[:, 1] = np.arange(-50, 50) - poses[:, 2] = np.arange(0, 2 * np.pi, step=2 * np.pi / 100) + poses = np.zeros((10, 3)) + poses[:, 0] = np.arange(-5, 5) + poses[:, 1] = np.arange(-5, 5) + poses[:, 2] = np.arange(0, 2 * np.pi, step=2 * np.pi / 10) fish = f.create_entity("fish", poses=poses) fish.attrs["species"] = "My rotating spaghetti fish" fish.attrs["fish_standard_length_cm"] = 10 - # Show and save the file - print(f) - print("Poses Shape: ", f.entity_poses.shape) + # Some possibilities to access the data + print(f"The file:\n{f}") + print( + f"Poses Shape:\t{f.entity_poses_rad.shape}.\t" + + "Representing(entities, timesteps, pose dimensions (x, y, ori)" + ) + print(f"The actions of one Fish, (timesteps, (speed, turn)):\n{fish.speed_turn}") + print(f"Fish poses with calculated orientations:\n{fish.poses_calc_ori_rad}") + # Save the file f.save_as(path) diff --git a/src/robofish/evaluate/app.py b/src/robofish/evaluate/app.py index 4d603f33ff39fd4b591ce33c8c607a55aa75c979..0b9f3bdd0cbd554001ac7f5c6785c5d5bff0c991 100644 --- a/src/robofish/evaluate/app.py +++ b/src/robofish/evaluate/app.py @@ -11,6 +11,7 @@ Functions available to be used in the commandline to evaluate robofish.io files. import robofish.evaluate import argparse +import string def function_dict(): @@ -41,24 +42,26 @@ def evaluate(args=None): fdict = function_dict() + longest_name = max([len(k) for k in fdict.keys()]) + parser = argparse.ArgumentParser( - description="This function can be called from the commandline to evaluate files.\ - Different evaluation methods can be called, which generate graphs from the given files. \ - \ - With the first argument 'analysis_type', the type of analysis is chosen." + description="This function can be called from the commandline to evaluate files.\n" + + "Different evaluation methods can be called, which generate graphs from the given files.\n" + + "With the first argument 'analysis_type', the type of analysis is chosen.", + formatter_class=argparse.RawTextHelpFormatter, ) parser.add_argument( "analysis_type", type=str, choices=fdict.keys(), - help="The type of analysis.\ - speed - A histogram of speeds\ - turn - A histogram of angular velocities\ - tank_positions - A heatmap of the positions in the tank\ - trajectories - A plot of all the trajectories\ - follow_iid - A plot of the follow metric in relation to iid (inter individual distance)\ - ", + help="The type of analysis.\n" + + "\n".join( + [ + f"{key}{' ' * (longest_name - len(key))} - {func.__doc__.splitlines()[0]}" + for key, func in fdict.items() + ] + ), ) parser.add_argument( "paths", diff --git a/src/robofish/io/__init__.py b/src/robofish/io/__init__.py index 5e84ac01da5eccb45e7879027dc2589f851895e7..994b49fef96738939fb64b8c138693f342651270 100644 --- a/src/robofish/io/__init__.py +++ b/src/robofish/io/__init__.py @@ -1,5 +1,12 @@ # SPDX-License-Identifier: LGPL-3.0-or-later +""" +The Python package `robofish.io` provides a simple interface to create, load, modify, and inspect files containing tracks of swarms. +The files are saved in the `.hdf5` format and following the [track_format specification](https://git.imp.fu-berlin.de/bioroboticslab/robofish/track_format/uploads/f76d86e7a629ca38f472b8f23234dbb4/RoboFish_Track_Format_-_1.0.pdf). + +.. include:: ../../../docs/index.md +""" + import sys import logging diff --git a/src/robofish/io/entity.py b/src/robofish/io/entity.py index 3759ceaf57d6565808d407ff66f93dad67d45ea5..52cfbe45a8e81a75379bebbab7141ad7d6280a07 100644 --- a/src/robofish/io/entity.py +++ b/src/robofish/io/entity.py @@ -1,3 +1,7 @@ +""" +.. include:: ../../../docs/entity.md +""" + import robofish.io import robofish.io.utils as utils @@ -137,6 +141,14 @@ class Entity(h5py.Group): return np.tile([1, 0], (self.positions.shape[0], 1)) return self["orientations"] + @property + def orientations_rad(self): + ori_rad = utils.limit_angle_range( + np.arctan2(self.orientations[:, 1], self.orientations[:, 0]), + _range=(0, 2 * np.pi), + ) + return ori_rad[:, np.newaxis] + @property def poses_calc_ori_rad(self): # Diff between positions [t - 1, 2] @@ -160,12 +172,7 @@ class Entity(h5py.Group): @property def poses_rad(self): - poses = self.poses - # calculate the angles from the orientation vectors, write them to the third row and delete the fourth row - ori_rad = utils.limit_angle_range( - np.arctan2(poses[:, 3], poses[:, 2]), _range=(0, 2 * np.pi) - ) - return np.concatenate([poses[:, :2], ori_rad[:, np.newaxis]], axis=1) + return np.concatenate([self.positions, self.orientations_rad], axis=1) @property def speed_turn(self): diff --git a/src/robofish/io/file.py b/src/robofish/io/file.py index 616eb9257b9628379f78fbda46cbe5b82df14713..94512f9129181f7f9a41da1faec90b419cdbf1eb 100644 --- a/src/robofish/io/file.py +++ b/src/robofish/io/file.py @@ -1,13 +1,14 @@ # -*- coding: utf-8 -*- +""" +.. include:: ../../../docs/file.md +""" + # ----------------------------------------------------------- # Utils functions for reading, validating and writing hdf5 files according to # Robofish track format (1.0 Draft 7). The standard is available at # https://git.imp.fu-berlin.de/bioroboticslab/robofish/track_format -# -# The term track is used to describe a dictionary, describing the track in a dict. -# To distinguish between attributes, dictionaries and groups, a prefix is used -# (a_ for attribute, d_ for dictionary, and g_ for groups). + # # Dec 2020 Andreas Gerken, Berlin, Germany # Released under GNU 3.0 License @@ -325,7 +326,6 @@ class File(h5py.File): assert poses.ndim == 3 assert poses.shape[2] in [3, 4] agents = poses.shape[0] - timesteps = poses.shape[1] entity_names = [] for i in range(agents): @@ -361,9 +361,23 @@ class File(h5py.File): for name in self.entity_names ] + @property + def entity_positions(self): + return self.select_entity_property(None, entity_property=Entity.positions) + + @property + def entity_orientations(self): + return self.select_entity_property(None, entity_property=Entity.orientations) + + @property + def entity_orientations_rad(self): + return self.select_entity_property( + None, entity_property=Entity.orientations_rad + ) + @property def entity_poses(self): - return self.select_entity_property(None) + return self.select_entity_property(None, entity_property=Entity.poses) @property def entity_poses_rad(self):