gz-sim icon indicating copy to clipboard operation
gz-sim copied to clipboard

Calling service for getting Actor poses

Open Rak-r opened this issue 1 year ago • 6 comments

Version: Gazebo Fortress

I am trying to call the service to get the poses of actors in the simulation from command line using

ign service -s /world/actors/state --reqtype ignition.msgs.Actor --reptype ignition.msgs.Actor --timeout -50000 --req 'entity: {name: "demo_actor"}, pose: {}'

But nothing comes up in the terminal after running the above. Am I missing something or is the syntex is wrong? Any help would be much appreciated. @azeey

Requirement:

I want the pose as topic so that I can communicate with ros2. Is there any way to call this service through python script? any sample example is available. I checked the sim repo but not able to find much on this.

Rak-r avatar Apr 19 '24 13:04 Rak-r

Have you tried the PosePublisher system with <publish_nested_model_pose> set to true?

azeey avatar Apr 19 '24 16:04 azeey

I believe that works for models entities not actor. I have tried adding it but not running as it asks for model to specified under model tag not actor.

Rak-r avatar Apr 19 '24 21:04 Rak-r

Referencing issue #2370 the same problem is occurring with me, I can't find a way to access actors poses despite using PosePublisher

Riyadh-kh avatar Apr 23 '24 09:04 Riyadh-kh

I was thinking to implement some custom plugin to publish both cmd_vel and pose from ros2 and control the actor. Something similar exists for ros1 and gazebo 11 but new headers and classes in ignition gazebo or whatever the version of new gazebo it is a bit confusing. I am trying by taking reference from commamd actor plugin.@Riyadh-kh

Rak-r avatar Apr 23 '24 18:04 Rak-r

Can we close this as a duplicate of #2370 ?

azeey avatar May 13 '24 17:05 azeey

Because of the extra context in this ticket, let's keep this is the canonical ticket and close #2370. Any help with the implementation would be greatly appreciated.

azeey avatar Jul 15 '24 17:07 azeey