Skip to content
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

Feature/playback get imu sample #150

Merged

Conversation

annStein
Copy link
Contributor

@annStein annStein commented Oct 8, 2021

For playback.py I added the method to get the next imu sample.

@annStein annStein changed the base branch from master to develop October 8, 2021 11:12
@lpasselin
Copy link
Collaborator

Sorry, I did not notice this PR until today! Thanks for the contribution, this looks well done.

@shagren it seems perfect but could you test?

Copy link
Contributor

@shagren shagren left a comment

Choose a reason for hiding this comment

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

Great!
Just two small changes for better quality

@@ -178,6 +178,12 @@ def get_previouse_capture(self):
thread_safe=self.thread_safe,
)

def get_next_imu_sample(self) -> Optional["ImuSample"]:
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add

from .pyk4a import ImuSample

before

from .results import Result, StreamResult

pyk4a/pyk4a.cpp Outdated
Comment on lines 1334 to 1337
imu_sample.acc_sample.xyz.x, imu_sample.acc_sample.xyz.y, imu_sample.acc_sample.xyz.z,
"acc_timestamp", imu_sample.acc_timestamp_usec, "gyro_sample", imu_sample.gyro_sample.xyz.x,
imu_sample.gyro_sample.xyz.y, imu_sample.gyro_sample.xyz.z, "gyro_timestamp",
imu_sample.gyro_timestamp_usec);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
imu_sample.acc_sample.xyz.x, imu_sample.acc_sample.xyz.y, imu_sample.acc_sample.xyz.z,
"acc_timestamp", imu_sample.acc_timestamp_usec, "gyro_sample", imu_sample.gyro_sample.xyz.x,
imu_sample.gyro_sample.xyz.y, imu_sample.gyro_sample.xyz.z, "gyro_timestamp",
imu_sample.gyro_timestamp_usec);
imu_sample.acc_sample.xyz.x, imu_sample.acc_sample.xyz.y, imu_sample.acc_sample.xyz.z,
"acc_timestamp", imu_sample.acc_timestamp_usec, "gyro_sample", imu_sample.gyro_sample.xyz.x,
imu_sample.gyro_sample.xyz.y, imu_sample.gyro_sample.xyz.z, "gyro_timestamp",
imu_sample.gyro_timestamp_usec);

Just remove 2 spaces on these lines

@annStein
Copy link
Contributor Author

Sorry, now I didn't see your comments for a long time. Hopefully this can be closed soon now. :)

Copy link
Contributor

@shagren shagren left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Jan 18, 2022

Codecov Report

Merging #150 (b05a626) into develop (c442ea0) will increase coverage by 0.14%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #150      +/-   ##
===========================================
+ Coverage    81.23%   81.38%   +0.14%     
===========================================
  Files           12       12              
  Lines          762      768       +6     
===========================================
+ Hits           619      625       +6     
  Misses         143      143              
Impacted Files Coverage Δ
pyk4a/playback.py 95.93% <100.00%> (+0.20%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c442ea0...b05a626. Read the comment docs.

@lpasselin lpasselin merged commit 2168d78 into etiennedub:develop Jan 18, 2022
lpasselin added a commit that referenced this pull request May 27, 2022
* Feature/playback get imu sample (#150)

* feat(playback-imu-sample): add "get_next_imu_sample" to playback

* fix(playback-imu-sample): PR changes, add correct indentation, add import in playback.py

* add info related to conda and DLL not found error

* update black version (fix click bug) (#168)

* update black version (fix click bug)

* black reformat

* fix typo

Co-authored-by: Louis-Philippe Asselin <lpasselin@users.noreply.github.com>
Co-authored-by: annStein <43335656+annStein@users.noreply.github.com>
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.

3 participants