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

Sim settings update #1920

Closed
wants to merge 25 commits into from
Closed

Sim settings update #1920

wants to merge 25 commits into from

Conversation

NakuraMino
Copy link
Contributor

@NakuraMino NakuraMino commented Oct 27, 2022

Motivation and Context

The current habitat_sim.utils.settings.make_cfg() fn is limited to single first person sensors with the uuid color_sensor, semantic_sensor etc.

e.g.

if settings["color_sensor"]:
        color_sensor_spec = create_camera_spec(
            uuid="color_sensor",
            hfov=settings["hfov"],
            sensor_type=habitat_sim.SensorType.COLOR,
            sensor_subtype=habitat_sim.SensorSubType.PINHOLE,
        )

where camera_sensor_spec.position = [0, settings["sensor_height"], 0].

Since many of the examples in examples/colabs/ use a 1st person sensor AND a 3rd person sensor (e.g. https://github.com/facebookresearch/habitat-sim/blob/main/examples/tutorials/nb_python/ECCV_2020_Interactivity.py#L178), it would be best if you could flexibly add multiple cameras through sim_settings.

How Has This Been Tested

This passes CI/CD, and these changes are also tested through pytest tests/*.py. They all pass.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Oct 27, 2022
@dhruvbatra
Copy link
Contributor

Thanks for thinking through these quality of usage issues.

@NakuraMino NakuraMino changed the title Sim settings update [WIP] Sim settings update Oct 28, 2022
@NakuraMino NakuraMino closed this Oct 28, 2022
@NakuraMino NakuraMino reopened this Oct 28, 2022
@NakuraMino NakuraMino force-pushed the sim_settings_update branch 3 times, most recently from 36caa7a to 7a4e545 Compare October 31, 2022 17:42
@NakuraMino NakuraMino marked this pull request as ready for review October 31, 2022 22:04
@NakuraMino NakuraMino self-assigned this Nov 2, 2022
@NakuraMino NakuraMino changed the title [WIP] Sim settings update Sim settings update Nov 2, 2022
Copy link
Contributor

@aclegg3 aclegg3 left a comment

Choose a reason for hiding this comment

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

A couple of design thoughts.

sensor_cfg = {**default_sensor_settings, **sensor_cfg}
uuid = sensor_cfg["uuid"]

sensor_type = (
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of pivoting off sensor name substrings, maybe we include "sensor_type" and "sensor_subtype" as fields in the sensor settings dict defaulting to color pinhole.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, I think it might be okay to pivot off sensor name for the camera type (i.e. fisheye, equirect) unless we also pass in the camera spec type (i.e. habitat_sim.FisheyeSensorDoubleSphereSpec, habitat_sim.EquirectangularSensorSpec) in the sensor_settings_dict. But sensor_type and sensor_subtype will be updated to use the sensor settings dict

src_python/habitat_sim/utils/settings.py Outdated Show resolved Hide resolved
@jrreyna jrreyna self-assigned this Nov 29, 2022
@jrreyna
Copy link
Contributor

jrreyna commented Nov 29, 2022

Fails lab_build_habitat on the build machine, but passes it on my local machine

@NakuraMino
Copy link
Contributor Author

@jrreyna for what its worth, #1924 updates all the tutorials/ file, but its an incomplete PR at this point. Saw you were updating some tutorial files so just thought this might be helpful if you want to check it out. Good luck with this, and thanks for taking ownership :)

@jrreyna
Copy link
Contributor

jrreyna commented Dec 1, 2022

@jrreyna for what its worth, #1924 updates all the tutorials/ file, but its an incomplete PR at this point. Saw you were updating some tutorial files so just thought this might be helpful if you want to check it out. Good luck with this, and thanks for taking ownership :)

@NakuraMino Yes I saw, thank you! I was using that as a reference, I just wanted to put it all in one PR for simplicity. I am basically copying all that work over to this PR

@facebook-github-bot
Copy link
Contributor

Hi @NakuraMino!

Thank you for your pull request.

We require contributors to sign our Contributor License Agreement, and yours needs attention.

You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

…pdate_sensor_settings function. Also fixed an error I made setting the default sim settings in the ECCV scripts
@jrreyna jrreyna closed this Dec 2, 2022
@jturner65 jturner65 deleted the sim_settings_update branch November 29, 2023 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants