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

gz-sim: Python interfaces #351

Closed
1 of 2 tasks
azeey opened this issue Aug 31, 2023 · 7 comments
Closed
1 of 2 tasks

gz-sim: Python interfaces #351

azeey opened this issue Aug 31, 2023 · 7 comments

Comments

@azeey
Copy link
Contributor

azeey commented Aug 31, 2023

Setup

  • Os: Ubuntu Jammy
  • BuildType: Binary

Links

Checks

  • Instructions work
  • Images (if there are any) match the result

You can find the code used to generate this test case here

@mjcarroll
Copy link

I believe the following only works with a merge-install with colcon, correct? We are advising to do that iirc, but could still be overlooked.

export PYTHONPATH=$PYTHONPATH:<path to ws>/install/lib/python

@mjcarroll
Copy link

mjcarroll commented Sep 12, 2023

My output looks slightly different. @azeey is this just a difference in computers or has something actually changed in the way that the python system works:

[Msg] Loading SDF world file[/home/ahcorde/gz_fortress/src/ign-gazebo/examples/scripts/python_api/gravity.sdf].
[Dbg] [Physics.cc:789] Loaded [gz::physics::dartsim::Plugin] from library [/home/ahcorde/gz_fortress/install/lib/gz-physics-5/engine-plugins/libgz-physics-dartsim-plugin.so]
[Dbg] [SimulationRunner.cc:909] Loaded system [gz::sim::systems::Physics] for entity [1]
[Msg] Loaded level [3]
[Msg] Serving world controls on [/world/gravity/control], [/world/gravity/control/state] and [/world/gravity/playback/control]
[Msg] Serving GUI information on [/world/gravity/gui/info]
[Msg] World [gravity] initialized with [default_physics] physics profile.
[Msg] Serving world SDF generation service on [/world/gravity/generate_world_sdf]
[Msg] Serving world names on [/gazebo/worlds]
[Msg] Resource path add service on [/gazebo/resource_paths/add].
[Msg] Resource path get service on [/gazebo/resource_paths/get].
[Msg] Resource paths published on [/gazebo/resource_paths].
[Msg] Found no publishers on /stats, adding root stats topic
[Msg] Found no publishers on /clock, adding root clock topic
[Dbg] [SimulationRunner.cc:524] Creating PostUpdate worker threads: 2
[Dbg] [SimulationRunner.cc:537] Creating postupdate worker thread (0)
AddSystem1
World entity is  1
Gravity  0 0 -9.8
Entity for falling model is:  4
AddSystem2
iterations  1000
post_iterations  1000
pre_iterations  1000

@azeey
Copy link
Contributor Author

azeey commented Sep 12, 2023

testFixture.py is not using python system plugins. It's using the python bindings for the TestFixture class. I'm guessing it's just an out-of-order printing issue. I get the same output as you on both Harmonic and Garden.

@mjcarroll
Copy link

Should we update the output to match or is this fine?

@azeey
Copy link
Contributor Author

azeey commented Sep 14, 2023

I tried it on two different computers and got the python messages after the last "postupdate worker thread" message, so maybe we should change it.

@azeey
Copy link
Contributor Author

azeey commented Sep 20, 2023

gazebosim/gz-sim#2157

@Voldivh
Copy link
Contributor

Voldivh commented Sep 25, 2023

Closing this since PR have been merged.

@Voldivh Voldivh closed this as completed Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants