Skip to content

Commit

Permalink
Use NodeStrategy instead of DirectNode for showing topic list.
Browse files Browse the repository at this point in the history
We also need to register functions for NodeStrategy: count_publishers and
count_subscribers.

Signed-off-by: evshary <[email protected]>
  • Loading branch information
evshary authored and audrow committed Mar 12, 2021
1 parent 5682647 commit b61a605
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ros2topic/ros2topic/verb/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from ros2cli.node.direct import DirectNode
from ros2cli.node.strategy import add_arguments as add_strategy_node_arguments
from ros2cli.node.strategy import NodeStrategy
from ros2topic.api import get_topic_names_and_types
Expand Down Expand Up @@ -53,7 +52,7 @@ def add_arguments(self, parser, cli_name):

def main(self, *, args):
topic_info = []
with DirectNode(args) as node:
with NodeStrategy(args) as node:
topic_names_and_types = get_topic_names_and_types(
node=node,
include_hidden_topics=args.include_hidden_topics)
Expand Down

0 comments on commit b61a605

Please sign in to comment.