gazebosim / gz-gui

Builds on top of Qt to provide widgets which are useful when developing robotics applications, such as a 3D view, plots, dashboard, etc, and can be used together in a convenient unified interface.
https://gazebosim.org
Apache License 2.0
67 stars 39 forks source link

Add "topic" parameter to the "Teleop" plugin #483

Closed Myzhar closed 1 year ago

Myzhar commented 1 year ago

Desired behavior

The Teleop GUI plugin does not accept any parameter. Setting the topic by SDF would be really useful.

Alternatives considered

N/A

Implementation suggestion

The idea is to have something like this:

<plugin filename="Teleop" name="robot_name Teleop">
  <ignition-gui>
     <property type="string" key="state">docked</property>                  
  </ignition-gui>
  <topic>/robot_name/cmd_vel</topic>
</plugin>

Additional context

N/A

ahcorde commented 1 year ago

Hi@Myzhar , Teleop already support this. Check this line https://github.com/gazebosim/gz-gui/blob/ign-gui6/src/plugins/teleop/Teleop.cc#L139-L141.

        <plugin filename="Teleop">
          <ignition-gui>
            <title>Teleop!</title>
           </ignition-gui>
          <topic>your topic name here</topic>
        </plugin>