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

Allow physics presets to be <include>'ed #87

Open
osrf-migration opened this issue Mar 20, 2015 · 1 comment
Open

Allow physics presets to be <include>'ed #87

osrf-migration opened this issue Mar 20, 2015 · 1 comment
Labels
enhancement New feature or request major

Comments

@osrf-migration
Copy link

Original report (archived issue) by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


Physics presets were added in pull request #146 by @jacquelinekay and it would be very cool if users could create libraries of different physics presets that could be <include>'ed into world files.

For example, currently models can be inserted with:

<include>
  <name>cup_1</name>
  <uri>model://plastic_cup</uri>
  <pose>-0.8 250 1.015 0 0 0</pose>
</include>

If there was a an sdf file named my_physics.sdf like the following:

<?xml version="1.0" ?>
<sdf version="1.5">
  <physics type="ode" name="my_physics">
    <gravity>0.000000 0.000000 -9.810000</gravity>
    <max_step_size>0.001000</max_step_size>
    <real_time_update_rate>1000</real_time_update_rate>
    <ode>
      <solver>
        <type>quick</type>
        <iters>100</iters>
        <precon_iters>0</precon_iters>
        <sor>1.000000</sor>
      </solver>
    </ode>
    <bullet>
      <solver>
        <type>sequential_impulse</type>
        <iters>100</iters>
        <sor>1.000000</sor>
      </solver>
    </bullet>
    <simbody>
      <accuracy>0.001</accuracy>
      <max_transient_velocity>0.01</max_transient_velocity>
    </simbody>
  </physics>
</sdf>

and if it was in the model database, perhaps it could be included like:

<include>
  <uri>model://my_physics</uri>
</include>

@rosebudflyaway

@osrf-migration
Copy link
Author

Original comment by Jackie K (Bitbucket: jacquelinekay).


I agree, with the small caveat that the include statement should look like

<include>
  <uri>physics://my_physics</uri>
</include>

so as not to conflate physics profiles with models.

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

No branches or pull requests

1 participant