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

MinimalScene: configurable near/far clip planes #308

Closed
scpeters opened this issue Nov 2, 2021 · 5 comments · Fixed by #309
Closed

MinimalScene: configurable near/far clip planes #308

scpeters opened this issue Nov 2, 2021 · 5 comments · Fixed by #309
Assignees
Labels
enhancement New feature or request 🏯 fortress Ignition Fortress

Comments

@scpeters
Copy link
Member

scpeters commented Nov 2, 2021

Desired behavior

Configuration of the clipping distance for the near/far clip planes was requested in gazebosim/gazebo-classic#2064. Support was added for configuring these parameters via the gzclient GUI in BitBucket pull request 2470, though support for setting the parameter via a world file was requested but not implemented.

I request that we add the near/far clipping distance as parameters for the MinimalScene camera.

Alternatives considered

The parameters could be configured interactively via a GUI widget or an ignition-transport interface, but I would prefer specifying it in XML.

Implementation suggestion

The following is an example of the current XML configuration parameters for a MinimalScene plugin instance:

    <plugin filename="MinimalScene">
      <engine>ogre</engine>
      <scene>banana</scene>
      <ambient_light>1.0 0 0</ambient_light>
      <background_color>0 1 0</background_color>
      <camera_pose>1 2 3 0 0 1.57</camera_pose>
    </plugin>

I would propose adding the following parameters to mirror the SDFormat camera clipping distance parameter structure:

      <camera_clip>
        <near>0.1</near>
        <far>5000</far>
      </camera_pose>
    <plugin filename="MinimalScene">
      <engine>ogre</engine>
      <scene>banana</scene>
      <ambient_light>1.0 0 0</ambient_light>
      <background_color>0 1 0</background_color>

      <camera_clip>
        <near>0.1</near>
        <far>5000</far>
      </camera_pose>

      <camera_pose>1 2 3 0 0 1.57</camera_pose>
    </plugin>

Additional context

Although setting these parameters from SDFormat was never implemented in gazebo, a Gazebo plugin for this purpose was created in the following public repository:

@scpeters scpeters added the enhancement New feature or request label Nov 2, 2021
@scpeters scpeters added the 🏯 fortress Ignition Fortress label Nov 2, 2021
@scpeters
Copy link
Member Author

scpeters commented Nov 2, 2021

I've added the Fortress label since MinimalScene as added in fortress

@chapulina
Copy link
Contributor

a Gazebo plugin for this purpose was created in the following public repository:

Another reference, the SimSlides plugin also has an implementation for both Gazebo classic and Ignition:

https://github.com/chapulina/simslides/blob/1dcd393fb9622043cdf90c68ade8e8af5d48195c/common/Common.cc#L24-L35

@jennuine jennuine self-assigned this Nov 2, 2021
@jennuine
Copy link
Contributor

jennuine commented Nov 3, 2021

PR #309 allows you to configure near/far clip distance in xml. Should I work on extending ign-gazebo's view angle plugin to configure it through the GUI?

@scpeters
Copy link
Member Author

scpeters commented Nov 3, 2021

PR #309 allows you to configure near/far clip distance in xml. Should I work on extending ign-gazebo's view angle plugin to configure it through the GUI?

sounds good to me 👍

@iche033
Copy link
Contributor

iche033 commented Nov 3, 2021

related issue: gazebosim/gz-sim#1154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🏯 fortress Ignition Fortress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants