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

Deprecate camera pose #1431

Closed
wants to merge 3 commits into from
Closed

Deprecate camera pose #1431

wants to merge 3 commits into from

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Jun 6, 2024

🦟 Bug fix

Summary

Deprecate //sensor/camera/pose as it's redundant with //sensor/pose, see gazebosim/gz-sim#2433 (comment).

I deprecated the relevant functions in Camera DOM class. As for deprecating the actual //sensor/camera/pose SDF element, I noticed that the pose element is included in the sdf/1.12/camera.sdf file using <include filename="pose.sdf" required="0"/> so I can't update it's description to say that it's being deprecated. One option is to copy the entire conent of pose.sdf into camera.sdf and update its description - let me know if this is the preferred method. Update: marked as deprecated by setting required to -1 (<include filename="pose.sdf" required="-1"/>)

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: Ian Chen <ichen@openrobotics.org>
@iche033 iche033 requested review from azeey and scpeters as code owners June 6, 2024 16:23
@github-actions github-actions bot added the 🏛️ ionic Gazebo Ionic label Jun 6, 2024
@scpeters
Copy link
Member

scpeters commented Jun 6, 2024

As for deprecating the actual //sensor/camera/pose SDF element, I noticed that the pose element is included in the sdf/1.12/camera.sdf file using <include filename="pose.sdf" required="0"/>

does it work to set required="-1" in the include element?

<include filename="pose.sdf" required="-1"/>

Signed-off-by: Ian Chen <ichen@openrobotics.org>
@iche033
Copy link
Contributor Author

iche033 commented Jun 6, 2024

does it work to set required="-1" in the include element?

oh I didn't know about this! Just found what -1 means in the parser code. I think that's what I need, thanks. Set required to -1 in c8f2521

Signed-off-by: Ian Chen <ichen@openrobotics.org>
@scpeters
Copy link
Member

scpeters commented Jun 6, 2024

I looked back in gazebo-classic, and we used the //camera/pose for multicameras (such as a stereo camera) in order to specify the location of each sub-camera:

do we have support for stereo-cameras yet in gz-sim? cc @azeey

@iche033
Copy link
Contributor Author

iche033 commented Jun 7, 2024

do we have support for stereo-cameras yet in gz-sim?

Gazebo-classic uses a multicamera sensor so that it can guarantee the cameras are synchronized / updated in the same timestep. This is not necessary in gz-sim. To use stereo or multi-cameras in gz-sim, the users just need to create 2 (or more) cameras with the same update rate - this will guarantee that the cameras are updated in the same timestep.

@iche033
Copy link
Contributor Author

iche033 commented Jun 7, 2024

I originally thought //camera/pose is used for rotating the camera to optical frame but no you're right it's for multicamera sensors. If there are other consumers of sdformat (other than gazebo-classic and gz-sim) that support multicamera + //camera/pose, maybe we should not deprecate this. We just won't support this field in gz-sim.

@iche033
Copy link
Contributor Author

iche033 commented Jul 29, 2024

Closing this. The new Gazebo will not use this SDF element but there maybe users out there who do need multicamera + //camera/pose .

@iche033 iche033 closed this Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏛️ ionic Gazebo Ionic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants