Question on python and gazebo

I’m so excited to finally get my hands on Python and Gazebo without needing ROS2! ROS2 is a bit challenging to install on Mac M2 and Windows 8 for me. I can install it on Linux, but I need all computers to be accessible since I don’t always have my Linux laptop with me.

I used this SDF as an example (copy the content inside and paste it into sphere.sdf):

Here is my code:

import sdformat14 as sdf
import sys
import time

def main():
    input_file = './sphere.sdf'
    root = sdf.Root()
    except sdf.SDFErrorsException as e:
        print(e, file=sys.stderr)

    while True:
        print("worked: ",
              root.world_by_index(0).model_by_index(2).raw_pose())  # straight to model called model with lidar to get raw pose updated

if __name__ == "__main__":

I was expecting to see an updated raw pose. How can I fetch the updated pose? See the video here:

My terminal doesn’t show the updated position. If this is a bug, I will hop into the github

your code is wrong. you edit the sdf file, which is static. you should use service to get the pose of entity.

ahh!! how do I do this with python bind?

Sounds like it’s for file only, not work with service.

Guess I gotta find a way to use service on m2 mac.

thank you so much for your time!