Gazebo | Ignition | Community
Ask Your Question
0

How to use ign service in command line?

asked 2022-05-16 13:22:40 -0600

kakcalu13 gravatar image

updated 2022-05-17 13:31:11 -0600

I'm not quite familiar with this. Do you know how to use ignition.msgs in command line? I was following this doc

using EntityFactory which is ignition.msgs.EntityFactory in command line. I wanted to clear sensors to 0 so I used SENSOR or Clear()

So I tried many ways include

ign service -s /world/free_world/create --reqtype ignition.msgs.EntityFactory --reptype ignition.msgs.Boolean  --timeout 300 --req 'clear'

ign service -s /world/free_world/create --reqtype ignition.msgs.EntityFactory --reptype ignition.msgs.Boolean  --timeout 300 --req 'clear: true'

ign service -s /world/free_world/create --reqtype ignition.msgs.EntityFactory --reptype ignition.msgs.Boolean  --timeout 300 --req 'clear = true'

None of them worked. Error just returns like this, [libprotobuf ERROR google/protobuf/text_format.cc:307] Error parsing text-format ignition.msgs.EntityFactory: 1:7: Message type "ignition.msgs.EntityFactory" has no field named "clear".

I wanted to do this because of respawn. This sensor is actually prevent the respawn due to error where it says camera rgb is already exist in entity [#]. I explained more in github but then I realized, this is just belong to this site

Last question, do you know if there's any documentation or tutorial for this one?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-05-18 06:43:46 -0600

kakcalu13 gravatar image

I finally find out about this.

So, basically...you just run this command after ign service -l and then select one you wanted to use. For me, I used create, so it would be ignition.msgs.EntityFactory,

How do I know that it would be ignition.msgs.EntityFactory? Well, you type in terminal, ign service -is /world/free_world/create

and you get the output:

Service providers [Address, Request Message Type, Response Message Type]:
  tcp://172.17.0.1:40725, ignition.msgs.EntityFactory, ignition.msgs.Boolean

So, it says ignition.msgs.EntityFactory, go to msg api (Use this since it gives you the latest version) and then click api and tutorials. Replace index.html to EntityFactory.html which is like this

So, you can see where extra arguments come from.

So as for /world commands, I guess each end of the line is the command. In this case, I picked create out of /world/free_world/create.

More information is at this: https://gazebosim.org/api/gazebo/6.9/...

Now we know how to work with ign service usage.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-05-16 13:22:40 -0600

Seen: 1,127 times

Last updated: May 18 '22