Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
io
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bioroboticslab
robofish
io
Commits
3b15ff80
Commit
3b15ff80
authored
Jun 22, 2021
by
Andi Gerken
Browse files
Options
Downloads
Patches
Plain Diff
Changed docs for actions_speeds_turns to state cm/frame and rad/frame instead of cm/s and rad/frame
parent
58b37a81
No related branches found
No related tags found
1 merge request
!18
Fixed internal issues with wrong conversions of speeds and turns.
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
docs/entity.md
+8
-8
8 additions, 8 deletions
docs/entity.md
docs/index.md
+8
-8
8 additions, 8 deletions
docs/index.md
src/robofish/io/entity.py
+2
-5
2 additions, 5 deletions
src/robofish/io/entity.py
src/robofish/io/file.py
+9
-0
9 additions, 0 deletions
src/robofish/io/file.py
with
27 additions
and
21 deletions
docs/entity.md
+
8
−
8
View file @
3b15ff80
...
@@ -64,13 +64,13 @@ As described in `robofish.io`, Files and Entities have useful properties.
...
@@ -64,13 +64,13 @@ As described in `robofish.io`, Files and Entities have useful properties.
<small>
<small>
| Entity function | Description |
| Entity function | Description |
| ------------------------------------------------ | ------------------------------------------------------------------------ |
| ------------------------------------------------ | ------------------------------------------------------------------------
--------------
|
|
`robofish.io.entity.Entity.positions`
| Positions as a
`(timesteps, 2 (x, y))`
array. |
|
`robofish.io.entity.Entity.positions`
| Positions as a
`(timesteps, 2 (x, y))`
array. |
|
`robofish.io.entity.Entity.orientations`
| Orientations as a
`(timesteps, 2 (ori_x, ori_y))`
array. |
|
`robofish.io.entity.Entity.orientations`
| Orientations as a
`(timesteps, 2 (ori_x, ori_y))`
array. |
|
`robofish.io.entity.Entity.orientations_rad`
| Orientations as a
`(timesteps, 1 (ori_rad))`
array. |
|
`robofish.io.entity.Entity.orientations_rad`
| Orientations as a
`(timesteps, 1 (ori_rad))`
array. |
|
`robofish.io.entity.Entity.poses`
| Poses as a
`(timesteps, 4 (x, y, x_ori, y_ori))`
array. |
|
`robofish.io.entity.Entity.poses`
| Poses as a
`(timesteps, 4 (x, y, x_ori, y_ori))`
array. |
|
`robofish.io.entity.Entity.poses_rad`
| Poses as a
`(timesteps, 3(x, y, ori_rad))`
array. |
|
`robofish.io.entity.Entity.poses_rad`
| Poses as a
`(timesteps, 3(x, y, ori_rad))`
array. |
|
`robofish.io.entity.Entity.actions_speeds_turns`
| Speed and turn as a
`(timesteps - 1, 2 (speed
_cm/s, turn_rad/s
))`
array. |
|
`robofish.io.entity.Entity.actions_speeds_turns`
| Speed and turn as a
`(timesteps - 1, 2 (speed
in cm/frame, turn in rad/frame
))`
array. |
</small>
</small>
...
...
This diff is collapsed.
Click to expand it.
docs/index.md
+
8
−
8
View file @
3b15ff80
...
@@ -125,13 +125,13 @@ In the same scheme the following properties are available:
...
@@ -125,13 +125,13 @@ In the same scheme the following properties are available:
<small>
<small>
| File/ Entity function | Description |
| File/ Entity function | Description |
| ----------------------------- | ------------------------------------------------------------------------------------ |
| ----------------------------- | ------------------------------------------------------------------------------------
--------------
|
|
*entity_*
positions | Positions as a
`(*entities*, timesteps, 2 (x, y))`
ar
ary.
|
|
*entity_*
positions | Positions as a
`(*entities*, timesteps, 2 (x, y))`
ar
ray.
|
|
*entity_*
orientations | Orientations as a
`(*entities*, timesteps, 2 (ori_x, ori_y))`
ar
ary.
|
|
*entity_*
orientations | Orientations as a
`(*entities*, timesteps, 2 (ori_x, ori_y))`
ar
ray.
|
|
*entity_*
orientations_rad | Orientations as a
`(*entities*, timesteps, 1 (ori_rad))`
ar
ary.
|
|
*entity_*
orientations_rad | Orientations as a
`(*entities*, timesteps, 1 (ori_rad))`
ar
ray.
|
|
*entity_*
poses | Poses as a
`(*entities*, timesteps, 4 (x, y, x_ori, y_ori))`
array. |
|
*entity_*
poses | Poses as a
`(*entities*, timesteps, 4 (x, y, x_ori, y_ori))`
array. |
|
*entity_*
poses_rad | Poses as a
`(*entities*, timesteps, 3(x, y, ori_rad))`
array. |
|
*entity_*
poses_rad | Poses as a
`(*entities*, timesteps, 3(x, y, ori_rad))`
array. |
|
*entity_*
actions_speeds_turns | Speed and turn as a
`(*entities*, timesteps - 1, 2 (speed
_cm/s, turn_rad/s
))`
array. |
|
*entity_*
actions_speeds_turns | Speed and turn as a
`(*entities*, timesteps - 1, 2 (speed
in cm/frame, turn in rad/frame
))`
array. |
</small>
</small>
...
...
This diff is collapsed.
Click to expand it.
src/robofish/io/entity.py
+
2
−
5
View file @
3b15ff80
...
@@ -241,15 +241,12 @@ class Entity(h5py.Group):
...
@@ -241,15 +241,12 @@ class Entity(h5py.Group):
def
actions_speeds_turns
(
self
):
def
actions_speeds_turns
(
self
):
"""
Calculate the speed, turn and from the recorded positions and orientations.
"""
Calculate the speed, turn and from the recorded positions and orientations.
The turn is calculated by the change of orientation.
The turn is calculated by the change of orientation
between frames
.
The speed is calculated by the distance between the points, projected on the new orientation vector.
The speed is calculated by the distance between the points, projected on the new orientation vector.
The sideway change of position cannot be represented with this method.
The sideway change of position cannot be represented with this method.
Returns:
Returns:
An array with shape (number_of_positions -1, 3).
An array with shape (number_of_positions -1, 2 (speed in cm/frame, turn in rad/frame).
The first column is the speed (distance projected on new orientation).
The second column is the turning angle.
"""
"""
ori
=
self
.
orientations
ori
=
self
.
orientations
...
...
This diff is collapsed.
Click to expand it.
src/robofish/io/file.py
+
9
−
0
View file @
3b15ff80
...
@@ -463,6 +463,15 @@ class File(h5py.File):
...
@@ -463,6 +463,15 @@ class File(h5py.File):
@property
@property
def
entity_actions_speeds_turns
(
self
):
def
entity_actions_speeds_turns
(
self
):
"""
Calculate the speed, turn and from the recorded positions and orientations.
The turn is calculated by the change of orientation between frames.
The speed is calculated by the distance between the points, projected on the new orientation vector.
The sideway change of position cannot be represented with this method.
Returns:
An array with shape (number_of_entities, number_of_positions -1, 2 (speed in cm/frame, turn in rad/frame).
"""
return
self
.
select_entity_property
(
return
self
.
select_entity_property
(
None
,
entity_property
=
Entity
.
actions_speeds_turns
None
,
entity_property
=
Entity
.
actions_speeds_turns
)
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment