Gazebo | Ignition | Community
Ask Your Question
1

Is there a way to use model's name as a reference for a plugin's topic? (Citadel or Fortress)

asked 2022-02-18 12:46:48 -0500

kakcalu13 gravatar image

For example, the current section:

     <sensor name='gpu_lidar' type='gpu_lidar'>
      <always_on>1</always_on>
      <visualize>true</visualize>
      <topic>ultrasonic0</topic>
      <update_rate>20</update_rate>

This doesn't have to be gpu_lidar only. It can be joint_controller, battery or any plugin type.

So, the topic will be displaying as /ultrasonic0, right?

So, is there a way to do like this: /<model_name_from_file>/ultrasonic0?

I wanted to duplicate robots in future along with rename set as true in the same world so I was hoping like

/robot_00/ultrasonic0 /robot_01/ultrasonic0 /robot_02/ultrasonic0

And so on.

Is this possible? I tried <namespace> and <topic></topic> but it end up an absolute path which I don't want that.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-02-18 20:08:07 -0500

azeey gravatar image

This is currently not supported. Your best bet is to remove <topic> and use the topic generated by default. Feel free to open an issue requesting the feature, or better yet, a PR with an implementation :).

edit flag offensive delete link more

Comments

Okay, thank you so much for your time! Do you have any clue for me to start somewhere so I can PR if it's acceptable to Gazebo team?

kakcalu13 gravatar imagekakcalu13 ( 2022-02-21 11:31:14 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2022-02-18 12:46:48 -0500

Seen: 43 times

Last updated: Feb 18