Skip to content

Vberenz/o80 robot ball #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

vincentberenz
Copy link
Contributor

Description

So far, ball trajectories could be added to a hdf5 file only from "older" json files (recorded in the past by Dieter and Simon) or by tennicam files (record of ball trajectories by tennicam).

This pull requests allows to add ball and robot trajectories recorded at the same time and dumped into files by o80_pam / o80_robot_ball_logger

How I Tested

Recorded ball / robot trajectories are replayed them

Do not merge before

  • link to dependent pull request

I fulfilled the following requirements

  • All new code is formatted according to our style guide (for C++ run clang-format, for Python, run flake8 and fix all warnings).
  • All new functions/classes are documented and existing documentation is updated according to changes.
  • No commented code from testing/debugging is kept (unless there is a good reason to keep it).

Copy link
Member

@luator luator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few comments but nothing critical.
Apart from this, there are some flake8 and mypy errors in the new code (see annotations in the diff). I think it would be good to fix them before merging.

@@ -83,6 +90,9 @@ def to_stamped_trajectory(input: DurationTrajectory) -> StampedTrajectory:
return stamps, positions


def _p(l):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function could have a more descriptive name.

The number of trajectories added to the file.
"""

def _read_trajectory(o80_robot_ball_file: pathlib.Path) -> StampedTrajectory:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The amount of nested functions here makes it a bit difficult to follow the code. Maybe it would make sense to move them to a separate module?

List all the file in tennicam_path that have the tennicam_ prefix,
parse them and returns the corresponding list of stamped trajectories.
"""
files = _list_files(o80_robot_ball_path, prefix="o80_robot_ball_")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be a mismatch between the prefix mentioned in the docstring and the one actually used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants