Skip to content

Commit

Permalink
fix doc strings
Browse files Browse the repository at this point in the history
Signed-off-by: Miaofei <miaofei@amazon.com>
  • Loading branch information
mm318 committed Jan 18, 2020
1 parent a9b945b commit a3272a5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
34 changes: 18 additions & 16 deletions rclpy/rclpy/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -1665,17 +1665,18 @@ def get_publishers_info_by_topic(
The returned parameter is a list of dictionaries, where each dictionary will
contain the node name, node namespace, topic type, participant's GID and its QoS profile.
'topic_name' may be a relative, private or fully qualified topic name.
A relative or private topic will be expanded using this node's namespace and name, if
the 'no_mangle' param is set to false.
When the `no_mangle` parameter is `true`, the provided `topic_name` should be a valid topic
name for the middleware (useful when combining ROS with native middleware (e.g. DDS) apps).
When the `no_mangle` parameter is `false`, the provided `topic_name` should follow
ROS topic name conventions.
The queried topic name is not remapped.
'no_mangle' defaults to false.
`topic_name` may be a relative, private, or fully qualified topic name.
A relative or private topic will be expanded using this node's namespace and name.
The queried `topic_name` is not remapped.
:param topic_name: the topic_name on which to find the publishers.
:param no_mangle: if false, the given topic name will be expanded
to its fully qualified name.
:param no_mangle: no_mangle if `true`, `topic_name` needs to be a valid middleware topic
name, otherwise it should be a valid ROS topic name. Defaults to `false`.
:return: a list of dictionaries representing all the publishers on this topic.
"""
return self._get_info_by_topic(
Expand All @@ -1691,17 +1692,18 @@ def get_subscriptions_info_by_topic(
The returned parameter is a list of dictionaries, where each dictionary will contain
the node name, node namespace, topic type, participant's GID and its QoS profile.
'topic_name' may be a relative, private or fully qualified topic name.
A relative or private topic will be expanded using this node's namespace and name, if
the 'no_mangle' param is set to false.
The queried topic name is not remapped.
When the `no_mangle` parameter is `true`, the provided `topic_name` should be a valid topic
name for the middleware (useful when combining ROS with native middleware (e.g. DDS) apps).
When the `no_mangle` parameter is `false`, the provided `topic_name` should follow
ROS topic name conventions.
'no_mangle' defaults to false.
`topic_name` may be a relative, private, or fully qualified topic name.
A relative or private topic will be expanded using this node's namespace and name.
The queried `topic_name` is not remapped.
:param topic_name: the topic_name on which to find the subscriptions.
:param no_mangle: if false, the given topic name will be expanded
to its fully qualified name.
:param no_mangle: no_mangle if `true`, `topic_name` needs to be a valid middleware topic
name, otherwise it should be a valid ROS topic name. Defaults to `false`.
:return: a list of dictionaries representing all the subscriptions on this topic.
"""
return self._get_info_by_topic(
Expand Down
8 changes: 4 additions & 4 deletions rclpy/src/rclpy/_rclpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -917,8 +917,8 @@ _get_info_by_topic(
*
* \param[in] pynode Capsule pointing to the node to get the namespace from.
* \param[in] topic_name the topic name to get the publishers for.
* \param[in] no_mangle if true the given topic name will be
* expanded to its fully qualified name.
* \param[in] no_mangle if `true`, `topic_name` needs to be a valid middleware topic name,
* otherwise it should be a valid ROS topic name.
* \return list of publishers
*/
static PyObject *
Expand All @@ -934,8 +934,8 @@ rclpy_get_publishers_info_by_topic(PyObject * Py_UNUSED(self), PyObject * args)
*
* \param[in] pynode Capsule pointing to the node to get the namespace from.
* \param[in] topic_name the topic name to get the subscriptions for.
* \param[in] no_mangle if true the given topic name will be
* expanded to its fully qualified name.
* \param[in] no_mangle if `true`, `topic_name` needs to be a valid middleware topic name,
* otherwise it should be a valid ROS topic name.
* \return list of subscriptions.
*/
static PyObject *
Expand Down

0 comments on commit a3272a5

Please sign in to comment.