Skip to content

Features: set captured image resolution, set camera target, set camera position - #109

Merged
rdeits merged 5 commits into
meshcat-dev:masterfrom
Simple-Robotics:feat/set-capture-resolution
Apr 19, 2023
Merged

rdeits merged 5 commits into
meshcat-dev:masterfrom
Simple-Robotics:feat/set-capture-resolution

Conversation

@ManifoldFR

@ManifoldFR ManifoldFR commented Jan 11, 2022 •

Copy link
Copy Markdown
Contributor

This follows the PR meshcat-dev/meshcat#111. I expose the following new features from that PR:

  • setting the camera target
  • specifying the get_image() resolution

Also:

  • a convenience function for setting camera position (in right-handed coordinates)

Comment thread src/meshcat/commands.py Outdated

class SetCamTarget:
__slots__ = ["value"]
def __init__(self, value):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

value is pretty vague as a variable name. What are the expected contents, and what do they do?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's supposed to be the camera's target position, in 3D. I made this more explicit the commit I pushed just now.

@codecov-commenter

codecov-commenter commented Apr 3, 2022 •

Copy link
Copy Markdown

Codecov Report

Base: 73.39% // Head: 72.29% // Decreases project coverage by -1.10% ⚠️

Coverage data is based on head (41b5370) compared to base (cd04af4).
Patch coverage: 34.37% of modified lines in pull request are covered.

❗ Current head 41b5370 differs from pull request most recent head 6b2b9f2. Consider uploading reports for the commit 6b2b9f2 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #109      +/-   ##
==========================================
- Coverage   73.39%   72.29%   -1.10%     
==========================================
  Files          11       11              
  Lines        1075     1101      +26     
==========================================
+ Hits          789      796       +7     
- Misses        286      305      +19     
Impacted Files Coverage Δ
src/meshcat/geometry.py 88.96% <ø> (ø)
src/meshcat/servers/zmqserver.py 28.89% <0.00%> (-0.34%) ⬇️
src/meshcat/visualizer.py 71.55% <35.71%> (-4.15%) ⬇️
src/meshcat/commands.py 80.59% <40.00%> (-11.86%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ManifoldFR
ManifoldFR force-pushed the feat/set-capture-resolution branch from 4f540af to f704c1b Compare April 20, 2022 12:38
@ManifoldFR

Copy link
Copy Markdown
Contributor Author

Just rebased on master.

@ManifoldFR
ManifoldFR force-pushed the feat/set-capture-resolution branch from f704c1b to e038e46 Compare June 14, 2022 14:31
@ManifoldFR
ManifoldFR force-pushed the feat/set-capture-resolution branch 5 times, most recently from 9437d1f to 17d996f Compare July 3, 2022 14:10
@ManifoldFR ManifoldFR changed the title Feature: set captured image resolution + set camera target Feature: set captured image resolution, set camera target, set camera position Jul 3, 2022
@ManifoldFR

ManifoldFR commented Jul 3, 2022 •

Copy link
Copy Markdown
Contributor Author

Did a clean rebase on master and updated demo.ipynb with examples of the camera pos/target options

Codecov still doesn't seem to like the commit however, maybe it doesn't look at the Jupyter notebook?

@ManifoldFR ManifoldFR changed the title Feature: set captured image resolution, set camera target, set camera position Features: set captured image resolution, set camera target, set camera position Nov 16, 2022
@ManifoldFR

ManifoldFR commented Nov 16, 2022 •

Copy link
Copy Markdown
Contributor Author

Hi @rdeits, sorry to be a bother, but do you think this PR is ready to be merged?
We kind of let it marinate in open PR limbo (😅) but now with @jcarpent we're thinking about using the new features from this PR in a future release of Pinocchio

Should I work on the code coverage or is that OK?

Thanks !

@ManifoldFR
ManifoldFR force-pushed the feat/set-capture-resolution branch from 1ec6a41 to b4550a0 Compare December 13, 2022 18:43
* update meshcat submodule w/ new features
* expose setting the camera target
* expose get_image() resolution option
* takes argument in (x,y,z) format
@ManifoldFR
ManifoldFR force-pushed the feat/set-capture-resolution branch 3 times, most recently from eab0fa6 to a15b340 Compare January 24, 2023 18:12
* update docstring of set_cam_target
* fix set_cam_pos behavior
* update demo.ipynb with example on changing cam focus & position
@ManifoldFR
ManifoldFR force-pushed the feat/set-capture-resolution branch from a15b340 to 41b5370 Compare January 24, 2023 18:14
@rdeits

rdeits commented Apr 19, 2023

Copy link
Copy Markdown
Collaborator

I'm embarrassed that it took me so long to get back to this, but I do really appreciate the contribution. I've verified that this works well locally, so let's do it!

@rdeits
rdeits merged commit 794a402 into meshcat-dev:master Apr 19, 2023
@ManifoldFR
ManifoldFR deleted the feat/set-capture-resolution branch April 19, 2023 11:53
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