Skip to content

Add support for no gravity link#2398

Merged
ahcorde merged 3 commits intogazebosim:ign-gazebo6from
AzulRadio:azulradio/no_grav
Jun 13, 2024
Merged

Add support for no gravity link#2398
ahcorde merged 3 commits intogazebosim:ign-gazebo6from
AzulRadio:azulradio/no_grav

Conversation

@AzulRadio
Copy link
Copy Markdown
Contributor

@AzulRadio AzulRadio commented May 8, 2024

🎉 New feature

Original issue: #504

A feature I find very useful when I use Gazebo Classic but surprisingly unavailable in Ignition.

I'm targeting Gazebo Fortress because I need this feature for my projects on Fortress. Might need some back/forward porting.

Changes in other repo:
gz-physics: gazebosim/gz-physics#633
sdformat: gazebosim/sdformat#1410

Summary

Add parsing and support for no gravity link when using DartSim engine

Implementation for other physics engines should be easy if they have link no gravity API.

Test it

Spawn the following entity to gazebo.

<?xml version="1.0" ?>
    <sdf version='1.7'>
      <model name='sphere'>
        <link name='link'>
          <gravity>false</gravity>
          <pose>0 0 0.5 0 0 0</pose>
          <visual name='visual'>
            <geometry><sphere><radius>1</radius></sphere></geometry>
          </visual>
          <collision name='collision'>
            <geometry><sphere><radius>1</radius></sphere></geometry>
          </collision>
        </link>
      </model>
</sdf>

The way I do this is to add <gravity>false</gravity> to gz-sim/examples/standalone/entity_creation's inline sdf and run the example.

The black sphere has link gravity disabled and the cube is spawned with GUI and has gravity by default.
no grav link

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • 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.

@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label May 8, 2024
@AzulRadio AzulRadio marked this pull request as ready for review May 8, 2024 05:12
@AzulRadio AzulRadio requested review from azeey and mjcarroll as code owners May 8, 2024 05:12
@arjo129
Copy link
Copy Markdown
Contributor

arjo129 commented May 8, 2024

Can you signoff your commits following the instructions here: https://github.com/gazebosim/gz-sim/pull/2398/checks?check_run_id=24713135239

On a side note if you need to achieve the same effect immediately: I achieve similar results using the <static> tag

@arjo129 arjo129 added the needs upstream release Blocked by a release of an upstream library label May 8, 2024
Comment thread src/SdfEntityCreator.cc Outdated
Comment thread src/systems/physics/Physics.cc Outdated
Comment thread src/systems/physics/Physics.cc Outdated
Comment thread src/systems/physics/Physics.cc Outdated
Signed-off-by: youhy <haoyuan2019@outlook.com>
@AzulRadio AzulRadio force-pushed the azulradio/no_grav branch from 72af63d to c71a3b3 Compare May 9, 2024 08:44
Signed-off-by: youhy <haoyuan2019@outlook.com>
@AzulRadio
Copy link
Copy Markdown
Contributor Author

Can you signoff your commits following the instructions here: https://github.com/gazebosim/gz-sim/pull/2398/checks?check_run_id=24713135239

I signed off with a new GPG key and added the key to Gtihub after I made the PR. So apparently DCO doesn't like that. Now it's fixed.

On a side note if you need to achieve the same effect immediately: I achieve similar results using the <static> tag

Thanks. I'll try that.

@AzulRadio AzulRadio requested a review from ahcorde May 9, 2024 09:37
@iche033
Copy link
Copy Markdown
Contributor

iche033 commented Jun 6, 2024

@osrf-jenkins run tests please

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

iche033 commented Jun 11, 2024

made some minor changes in 72b8f3c - simplified gravity component data check, and updated style and indentation.

@iche033
Copy link
Copy Markdown
Contributor

iche033 commented Jun 13, 2024

@ahcorde friendly ping to see if you're ok with the new changes and also merging this PR?

@ahcorde ahcorde merged commit 45239e9 into gazebosim:ign-gazebo6 Jun 13, 2024
@AzulRadio AzulRadio deleted the azulradio/no_grav branch June 13, 2024 11:43
Comment thread src/SdfEntityCreator.cc
@azeey azeey mentioned this pull request Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏯 fortress Ignition Fortress needs upstream release Blocked by a release of an upstream library

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants