Skip to content

Conversation

@ann3-dev
Copy link
Contributor

@ann3-dev ann3-dev commented Oct 8, 2021

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

@ann3-dev ann3-dev 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

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

@ann3-dev
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