Skip to content

Commit

Permalink
Enable --no-daemon flag for some cli tools
Browse files Browse the repository at this point in the history
Fixes #511

Signed-off-by: Dereck Wonnacott <dereck.wonnacott@havalus.com>
  • Loading branch information
dawonn-haval committed May 28, 2020
1 parent 29cdf68 commit d8f8bc6
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
3 changes: 3 additions & 0 deletions ros2topic/ros2topic/verb/echo.py
Expand Up @@ -22,6 +22,7 @@
from rclpy.node import Node
from rclpy.qos import QoSProfile
from ros2cli.node.strategy import NodeStrategy
from ros2cli.node.strategy import add_arguments as add_strategy_node_arguments
from ros2topic.api import add_qos_arguments_to_argument_parser
from ros2topic.api import get_msg_class
from ros2topic.api import qos_profile_from_short_keys
Expand Down Expand Up @@ -49,6 +50,8 @@ class EchoVerb(VerbExtension):
"""Output messages from a topic."""

def add_arguments(self, parser, cli_name):
add_strategy_node_arguments(parser)

arg = parser.add_argument(
'topic_name',
help="Name of the ROS topic to listen to (e.g. '/chatter')")
Expand Down
3 changes: 3 additions & 0 deletions ros2topic/ros2topic/verb/find.py
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

from ros2cli.node.strategy import NodeStrategy
from ros2cli.node.strategy import add_arguments as add_strategy_node_arguments

from ros2topic.api import get_topic_names_and_types
from ros2topic.api import message_type_completer
Expand All @@ -23,6 +24,8 @@ class FindVerb(VerbExtension):
"""Output a list of available topics of a given type."""

def add_arguments(self, parser, cli_name):
add_strategy_node_arguments(parser)

arg = parser.add_argument(
'topic_type',
help="Name of the ROS topic type to filter for (e.g. 'std_msg/msg/String')")
Expand Down
3 changes: 2 additions & 1 deletion ros2topic/ros2topic/verb/info.py
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

from ros2cli.node.strategy import NodeStrategy

from ros2cli.node.strategy import add_arguments as add_strategy_node_arguments
from ros2topic.api import get_topic_names_and_types
from ros2topic.api import TopicNameCompleter
from ros2topic.verb import VerbExtension
Expand All @@ -23,6 +23,7 @@ class InfoVerb(VerbExtension):
"""Print information about a topic."""

def add_arguments(self, parser, cli_name):
add_strategy_node_arguments(parser)
arg = parser.add_argument(
'topic_name',
help="Name of the ROS topic to get info (e.g. '/chatter')")
Expand Down
5 changes: 3 additions & 2 deletions ros2topic/ros2topic/verb/list.py
Expand Up @@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from ros2cli.node.strategy import add_arguments
from ros2cli.node.strategy import NodeStrategy
from ros2cli.node.strategy import add_arguments as add_strategy_node_arguments
from ros2topic.api import get_topic_names_and_types
from ros2topic.verb import VerbExtension

Expand All @@ -22,7 +22,8 @@ class ListVerb(VerbExtension):
"""Output a list of available topics."""

def add_arguments(self, parser, cli_name):
add_arguments(parser)
add_strategy_node_arguments(parser)

parser.add_argument(
'-t', '--show-types', action='store_true',
help='Additionally show the topic type')
Expand Down
3 changes: 3 additions & 0 deletions ros2topic/ros2topic/verb/type.py
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

from ros2cli.node.strategy import NodeStrategy
from ros2cli.node.strategy import add_arguments as add_strategy_node_arguments

from ros2topic.api import get_topic_names_and_types
from ros2topic.api import TopicNameCompleter
Expand All @@ -23,6 +24,8 @@ class TypeVerb(VerbExtension):
"""Print a topic's type."""

def add_arguments(self, parser, cli_name):
add_strategy_node_arguments(parser)

arg = parser.add_argument(
'topic_name',
help="Name of the ROS topic to get type (e.g. '/chatter')")
Expand Down

0 comments on commit d8f8bc6

Please sign in to comment.