Skip to content

rostest: add subscribetest #2184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 5, 2024
Merged

rostest: add subscribetest #2184

merged 2 commits into from
Sep 5, 2024

Conversation

k-okada
Copy link
Contributor

@k-okada k-okada commented Sep 17, 2021

This PR adds subscribetest node to check if the specified topics are
subscribed. The usage is almost the same as publishtest:

     <test test-name="subscribetest_test" pkg="rostest" type="subscribetest"
    time-limit="7.0" retry="3">
       <rosparam>
         topics:
         - name: /chatter
           timeout: 2.
         - name: /subscribed_topic
           timeout: 2.
           negative: true
       </rosparam>
     </test>

@k-okada k-okada changed the base branch from indigo-devel to noetic-devel September 17, 2021 05:35
This PR adds `subscribetest` node to check if the specified topics are subscribed.
The usage is almost the same as `publishtest`:

```
  <test test-name="subscribetest_test" pkg="rostest" type="subscribetest" time-limit="7.0" retry="3">
    <rosparam>
      topics:
      - name: /chatter
        timeout: 2.
      - name: /subscribed_topic
        timeout: 2.
        negative: true
    </rosparam>
  </test>

```
Copy link
Contributor

@sloretz sloretz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! I noticed the new subscribetest is not installed (line 16 of tools/rostest/CMakeLists.txt) LGTM once that's fixed.

@k-okada
Copy link
Contributor Author

k-okada commented Sep 5, 2024

@sloretz thanks for review , I have added subscribetest to catkin_install_python

Copy link
Contributor

@sloretz sloretz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR!

@sloretz sloretz merged commit 5067f44 into ros:noetic-devel Sep 5, 2024
2 checks passed
garyservin pushed a commit to locusrobotics/ros_comm that referenced this pull request Apr 7, 2025
* rostest: add subscribetest

This PR adds `subscribetest` node to check if the specified topics are subscribed.
The usage is almost the same as `publishtest`:

```
  <test test-name="subscribetest_test" pkg="rostest" type="subscribetest" time-limit="7.0" retry="3">
    <rosparam>
      topics:
      - name: /chatter
        timeout: 2.
      - name: /subscribed_topic
        timeout: 2.
        negative: true
    </rosparam>
  </test>

```

* install nodes/subscribetest
AadityaRavindran pushed a commit to locusrobotics/ros_comm that referenced this pull request Apr 16, 2025
* rostest: add subscribetest

This PR adds `subscribetest` node to check if the specified topics are subscribed.
The usage is almost the same as `publishtest`:

```
  <test test-name="subscribetest_test" pkg="rostest" type="subscribetest" time-limit="7.0" retry="3">
    <rosparam>
      topics:
      - name: /chatter
        timeout: 2.
      - name: /subscribed_topic
        timeout: 2.
        negative: true
    </rosparam>
  </test>

```

* install nodes/subscribetest

(cherry picked from commit 5067f44)
AadityaRavindran added a commit to locusrobotics/ros_comm that referenced this pull request Apr 16, 2025
* Fix memory leak in rosgraph for kernel < 4.16 and Python 3 (ros#2165)

(cherry picked from commit c7c5bcb)

* Fix ros#2123:  Do not raise exception if socket is busy in TCPROSTransport (ros#2131)

Make behavior consistent with the C++ implementation.

Co-authored-by: [email protected] <zxcvbnm123-*@>
(cherry picked from commit b3f8e3c)

* [xmlrpcpp] Fix build when gtest is not available (ros#2177)

When gtest is not available, the target test_socket is not
created by catkin_add_gtest (it provides a warning that gtest
was not found and does not add the test). Trying to set the
target properties then leads to a configuration error. Making
this block conditional on the existence of the target fixes
the configuration error.

(cherry picked from commit 98545f8)

* Do not set self.transport unless persistent in ServiceProxy (ros#2171)

Co-authored-by: Kevin Chang <[email protected]>
(cherry picked from commit c977e1e)

* Fix warning related to Boost bind placeholders declared in global namespace. (ros#2169)

* clients/roscpp/include/ros: publisher.h: Fix warning related to Boost bind placeholders declared in global namespace.

This commit fixes the following:
Warning: The practice of declaring the Bind placeholders (_1, _2, ...)
in the global namespace is deprecated. Please use <boost/bind/bind.hpp> +
using namespace boost::placeholders, or define
BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.

Signed-off-by: Elvis Dowson <[email protected]>

* clients/roscpp/include/ros: node_handle.h: Fix warning related to Boost bind placeholders declared in global namespace.

This commit fixes the following:
Warning: The practice of declaring the Bind placeholders (_1, _2, ...)
in the global namespace is deprecated. Please use <boost/bind/bind.hpp> +
using namespace boost::placeholders, or define
BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.

Signed-off-by: Elvis Dowson <[email protected]>
(cherry picked from commit 3294299)

* [rospy] add current_real docstring in timer.py (ros#2178)

* add current_reald doc in timer.py

* fix docstring in timer.py

Co-authored-by: Jacob Perron <[email protected]>

Co-authored-by: Jacob Perron <[email protected]>
(cherry picked from commit 11ebadc)

* Noetic: Fix XMLRPC endless loop (ros#2185)

* Fix oversize string test.

It claims to be "well-formed", but the closing tag was wrong.
Fix that here.

Signed-off-by: Chris Lalancette <[email protected]>

* Add defensive checks for offset being NULL.

Signed-off-by: Chris Lalancette <[email protected]>

* Add unit tests for XML tag utility functions.

This includes parseTag, findTag, nextTagIs, and getNextTag.

Signed-off-by: Chris Lalancette <[email protected]>

* Add implementation of nextTagData.

Signed-off-by: Chris Lalancette <[email protected]>

* Switch structFromXml to using nextTagData.

Signed-off-by: Chris Lalancette <[email protected]>
(cherry picked from commit 41a956c)

* Revert "Fix warning related to Boost bind placeholders declared in global namespace. (ros#2169)" (ros#2187)

This reverts commit 3294299.

(cherry picked from commit b9bd85d)

* keep the persistent connection only if rosmaster supports http1.1 (ros#2208)

* keep the persistent connection only if rosmaster supports http1.1

Signed-off-by: Chen Lihui <[email protected]>

* Revert "keep the persistent connection only if rosmaster supports http1.1"

This reverts commit 2cb7602.

Signed-off-by: Chen Lihui <[email protected]>

* fix without breaking ABI

Signed-off-by: Chen Lihui <[email protected]>

* Update comment

Co-authored-by: Jacob Perron <[email protected]>

* Fix $(dirname) resolution in include tags (ros#2173)

* roslaunch: Extend $(dirname) test

* roslaunch include: Resolve substitution args w.r.t. parent's context to ensure that $(dirname) resolves to parent's dir

* Correct missed boost::placeholders::_7 (ros#2242)

* Add a workaround for a race condition while closing the socket (ros#2212) (ros#2233)

Co-authored-by: Daniele Calisi <[email protected]>

* rosbag reindex bugfix - seek to truncated position after broken chunk (ros#2286)

The truncate operation left the current `f.tell()` read head at the pre-truncated position, so the chunk infos that are written on closing the file started writing at this pre-truncated position, leaving dangling broken chunk data in between the last good chunk and the first file-end chunkinfo.

Signed-off-by: Emerson Knapp <[email protected]>

* Set TCP_NODELAY. (ros#2293)

(cherry picked from commit f03fd33)

* Add missing include (ros#2248)

(cherry picked from commit 5edee4e)

* Move @jacobperron from maintainer to author (ros#2302)

Signed-off-by: Shane Loretz <[email protected]>

Signed-off-by: Shane Loretz <[email protected]>
(cherry picked from commit 99a1ce0)

* Fix determining supported kernel version for HTTP 1.1 (ros#2202)

Signed-off-by: Martin Pecka <[email protected]>
(cherry picked from commit 047716c)

* --noarr and --nostr option in rosservice call (ros#2307)

(cherry picked from commit 1a1564e)

* [topic_tools/mux] add wait_publisher_initialization option in mux (ros#2305)

* [topic_tools] add wait_publisher_initialization option in mux
* add wait_publisher_second param

(cherry picked from commit 13dc820)

* Fix error "s is not defined" (reopening ros#2320 again) (ros#2328)

* Fix error "s is not defined" (reopening  Refs ros#2320 again)

* Update clients/rospy/src/rospy/topics.py with suggestion

Co-authored-by: Martin Pecka <[email protected]>

---------

Co-authored-by: Martin Pecka <[email protected]>
(cherry picked from commit 030e132)

* Added init_options::NoSimTime to forcefully disable subscribing to /clock (ros#2342)

* Added init_options::NoSimTime to forcefully disable subscribing to /clock.

* Fix enum value

* Added test for init_options::NoSimTime

* Fixed test

(cherry picked from commit b1ef2ee)

* Fixed ROSCONSOLE_FORMAT with microseconds (ros#2370)

(cherry picked from commit aef16f0)

* Fixed uninitialized Time usage in rosservice call (ros#2369)

(cherry picked from commit de95e28)

* [windows] Remove python2 specific hack (ros#2364)

This PR ros#1872 made windows act differently than linux because of a specific python 2 delay doing unnecessary DNS checks for localhost.

The underlying code in python is different for python3 so the hack is no longer necessary. Given that, its better to reunify the codebase

(cherry picked from commit cf0f276)

* Fix segfault with default-constructed rosbag::ChunkedFile::swap (ros#2363)

Closes ros#2362.

(cherry picked from commit 3ad1409)

* Fix rostest target names when build dir is inside source dir (ros#2361)

It's a common approach to build cmake projects in a `build` folder in the project root.
It's just that `rosbuild`/`catkin` does not do it, so the changed name never mattered.

When you try the target name includes another `build_` string and there is *exactly one* package in the whole ecosystem that relies on this not happening:
https://github.com/ros/ros_comm/blob/845f74602c7464e08ef5ac6fd9e26c97d0fe42c9/test/test_rosbag/bag_migration_tests/CMakeLists.txt#L87-L103

(cherry picked from commit 336b29a)

* apply patch to fix build with boost 1.83.0 (ros#2354)

(cherry picked from commit 0b0076d)

* Update: #include <boost/bind.hpp> -> <boost/bind/bind.hpp> for boost 1.73 (ros#2348)

* Update: #include <boost/bind.hpp> -> <boost/bind/bind.hpp> for boost 1.73

Since boost 1.73, i.e. on Ubuntu 22.04, the old header issues a deprecation warning:
```
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message:
The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated.
Please use <boost/bind/bind.hpp> + using namespace boost::placeholders,
or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
```

While the new header <boost/bind/bind.hpp> is available for a long time (on 18.04 already)
and the source has been updated to use boost::placeholders in ros#2023, the header was not yet updated.

* For backwards compatibility: pull placeholders into global namespace

(cherry picked from commit 076ea3f)

* add --min-space option to the python cli of rosbag record (ros#2298)

(cherry picked from commit 1b1e7da)

* Fix EINTR handling in XmlRpcDispatch::work (ros#2278)

* Fix EINTR handling in XmlRpcDispatch::work

* Document the XmlRpcDispatch::work behavior we receiving EINTR

(cherry picked from commit 3337133)

* Expose is_shutdown_requested in rospy namespace. (ros#2267)

Just like the C++ `ros::isShuttingDown()`, this can be useful in certain
cases where shutdown needs to be checked before all shutdown handlers
finished.

The difference to `is_shutdown()` is already clearly described in the
docstring of `is_shutdown_requested()`.

(cherry picked from commit c27175c)

* rosnode: allow rosrun & roslaunch to find script (ros#2262)

By installing the script in the "package bin destination" as well as letting setup.py install it in the global 'bin' directory.

This is similar to what rosservice et al., which do work with roslaunch and rosrun.

Signed-off-by: gavanderhoorn <[email protected]>
(cherry picked from commit 31ddca1)

* rosbag_main.py: fix calling uncallable signal handler object (ros#2235) (ros#2236)

Co-authored-by: Yannik Nager <[email protected]>
(cherry picked from commit ce22d1c)

* Fix printing XmlRpcValue with GTest (ros#2224)

* Fix printing XmlRpcValue with GTest

* Added tests for XmlRpc::PrintTo()

* Make PrintTo inline

(cherry picked from commit 13e4bd0)

* check if ignore_unset_args is set in xmlloader (ros#2217)

(cherry picked from commit 8917094)

* Address DeprecationWarning (ros#2191)

(cherry picked from commit d7ddd80)

* fix typo t_start -> self.t_start (ros#2183)

fix typo local t_start is not defined here, need to use self.t_start

(cherry picked from commit eb8bb69)

* Exposed record snapshot feature for command line. (ros#2254)

(cherry picked from commit ecbb123)

* rostest: add subscribetest (ros#2184)

* rostest: add subscribetest

This PR adds `subscribetest` node to check if the specified topics are subscribed.
The usage is almost the same as `publishtest`:

```
  <test test-name="subscribetest_test" pkg="rostest" type="subscribetest" time-limit="7.0" retry="3">
    <rosparam>
      topics:
      - name: /chatter
        timeout: 2.
      - name: /subscribed_topic
        timeout: 2.
        negative: true
    </rosparam>
  </test>

```

* install nodes/subscribetest

(cherry picked from commit 5067f44)

---------

Signed-off-by: Emerson Knapp <[email protected]>
Co-authored-by: Alexis Schad <[email protected]>
Co-authored-by: 金梦磊 <[email protected]>
Co-authored-by: Wolfgang Merkt <[email protected]>
Co-authored-by: Kevin Chang <[email protected]>
Co-authored-by: Elvis Dowson <[email protected]>
Co-authored-by: Shingo Kitagawa <[email protected]>
Co-authored-by: Chris Lalancette <[email protected]>
Co-authored-by: Jacob Perron <[email protected]>
Co-authored-by: Chen Lihui <[email protected]>
Co-authored-by: Robert Haschke <[email protected]>
Co-authored-by: Lucas Walter <[email protected]>
Co-authored-by: madmage <[email protected]>
Co-authored-by: Daniele Calisi <[email protected]>
Co-authored-by: Emerson Knapp <[email protected]>
Co-authored-by: Rik Baehnemann <[email protected]>
Co-authored-by: Jochen Sprickerhof <[email protected]>
Co-authored-by: Shane Loretz <[email protected]>
Co-authored-by: Martin Pecka <[email protected]>
Co-authored-by: vineet131 <[email protected]>
Co-authored-by: Griffin Tabor <[email protected]>
Co-authored-by: Hugal31 <[email protected]>
Co-authored-by: Michael Görner <[email protected]>
Co-authored-by: daizhirui <[email protected]>
Co-authored-by: Zijun Xu <[email protected]>
Co-authored-by: Michael Grupp <[email protected]>
Co-authored-by: G.A. vd. Hoorn <[email protected]>
Co-authored-by: Yannik Nager <[email protected]>
Co-authored-by: Guglielmo Gemignani <[email protected]>
Co-authored-by: Kei Okada <[email protected]>
Co-authored-by: Blake Anderson <[email protected]>
AadityaRavindran added a commit to locusrobotics/ros_comm that referenced this pull request Apr 16, 2025
* Run tests in Jenkins

* removed manual jenkinsfile

* Sync with upstream (#44)

* Fix memory leak in rosgraph for kernel < 4.16 and Python 3 (ros#2165)

(cherry picked from commit c7c5bcb)

* Fix ros#2123:  Do not raise exception if socket is busy in TCPROSTransport (ros#2131)

Make behavior consistent with the C++ implementation.

Co-authored-by: [email protected] <zxcvbnm123-*@>
(cherry picked from commit b3f8e3c)

* [xmlrpcpp] Fix build when gtest is not available (ros#2177)

When gtest is not available, the target test_socket is not
created by catkin_add_gtest (it provides a warning that gtest
was not found and does not add the test). Trying to set the
target properties then leads to a configuration error. Making
this block conditional on the existence of the target fixes
the configuration error.

(cherry picked from commit 98545f8)

* Do not set self.transport unless persistent in ServiceProxy (ros#2171)

Co-authored-by: Kevin Chang <[email protected]>
(cherry picked from commit c977e1e)

* Fix warning related to Boost bind placeholders declared in global namespace. (ros#2169)

* clients/roscpp/include/ros: publisher.h: Fix warning related to Boost bind placeholders declared in global namespace.

This commit fixes the following:
Warning: The practice of declaring the Bind placeholders (_1, _2, ...)
in the global namespace is deprecated. Please use <boost/bind/bind.hpp> +
using namespace boost::placeholders, or define
BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.

Signed-off-by: Elvis Dowson <[email protected]>

* clients/roscpp/include/ros: node_handle.h: Fix warning related to Boost bind placeholders declared in global namespace.

This commit fixes the following:
Warning: The practice of declaring the Bind placeholders (_1, _2, ...)
in the global namespace is deprecated. Please use <boost/bind/bind.hpp> +
using namespace boost::placeholders, or define
BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.

Signed-off-by: Elvis Dowson <[email protected]>
(cherry picked from commit 3294299)

* [rospy] add current_real docstring in timer.py (ros#2178)

* add current_reald doc in timer.py

* fix docstring in timer.py

Co-authored-by: Jacob Perron <[email protected]>

Co-authored-by: Jacob Perron <[email protected]>
(cherry picked from commit 11ebadc)

* Noetic: Fix XMLRPC endless loop (ros#2185)

* Fix oversize string test.

It claims to be "well-formed", but the closing tag was wrong.
Fix that here.

Signed-off-by: Chris Lalancette <[email protected]>

* Add defensive checks for offset being NULL.

Signed-off-by: Chris Lalancette <[email protected]>

* Add unit tests for XML tag utility functions.

This includes parseTag, findTag, nextTagIs, and getNextTag.

Signed-off-by: Chris Lalancette <[email protected]>

* Add implementation of nextTagData.

Signed-off-by: Chris Lalancette <[email protected]>

* Switch structFromXml to using nextTagData.

Signed-off-by: Chris Lalancette <[email protected]>
(cherry picked from commit 41a956c)

* Revert "Fix warning related to Boost bind placeholders declared in global namespace. (ros#2169)" (ros#2187)

This reverts commit 3294299.

(cherry picked from commit b9bd85d)

* keep the persistent connection only if rosmaster supports http1.1 (ros#2208)

* keep the persistent connection only if rosmaster supports http1.1

Signed-off-by: Chen Lihui <[email protected]>

* Revert "keep the persistent connection only if rosmaster supports http1.1"

This reverts commit 2cb7602.

Signed-off-by: Chen Lihui <[email protected]>

* fix without breaking ABI

Signed-off-by: Chen Lihui <[email protected]>

* Update comment

Co-authored-by: Jacob Perron <[email protected]>

* Fix $(dirname) resolution in include tags (ros#2173)

* roslaunch: Extend $(dirname) test

* roslaunch include: Resolve substitution args w.r.t. parent's context to ensure that $(dirname) resolves to parent's dir

* Correct missed boost::placeholders::_7 (ros#2242)

* Add a workaround for a race condition while closing the socket (ros#2212) (ros#2233)

Co-authored-by: Daniele Calisi <[email protected]>

* rosbag reindex bugfix - seek to truncated position after broken chunk (ros#2286)

The truncate operation left the current `f.tell()` read head at the pre-truncated position, so the chunk infos that are written on closing the file started writing at this pre-truncated position, leaving dangling broken chunk data in between the last good chunk and the first file-end chunkinfo.

Signed-off-by: Emerson Knapp <[email protected]>

* Set TCP_NODELAY. (ros#2293)

(cherry picked from commit f03fd33)

* Add missing include (ros#2248)

(cherry picked from commit 5edee4e)

* Move @jacobperron from maintainer to author (ros#2302)

Signed-off-by: Shane Loretz <[email protected]>

Signed-off-by: Shane Loretz <[email protected]>
(cherry picked from commit 99a1ce0)

* Fix determining supported kernel version for HTTP 1.1 (ros#2202)

Signed-off-by: Martin Pecka <[email protected]>
(cherry picked from commit 047716c)

* --noarr and --nostr option in rosservice call (ros#2307)

(cherry picked from commit 1a1564e)

* [topic_tools/mux] add wait_publisher_initialization option in mux (ros#2305)

* [topic_tools] add wait_publisher_initialization option in mux
* add wait_publisher_second param

(cherry picked from commit 13dc820)

* Fix error "s is not defined" (reopening ros#2320 again) (ros#2328)

* Fix error "s is not defined" (reopening  Refs ros#2320 again)

* Update clients/rospy/src/rospy/topics.py with suggestion

Co-authored-by: Martin Pecka <[email protected]>

---------

Co-authored-by: Martin Pecka <[email protected]>
(cherry picked from commit 030e132)

* Added init_options::NoSimTime to forcefully disable subscribing to /clock (ros#2342)

* Added init_options::NoSimTime to forcefully disable subscribing to /clock.

* Fix enum value

* Added test for init_options::NoSimTime

* Fixed test

(cherry picked from commit b1ef2ee)

* Fixed ROSCONSOLE_FORMAT with microseconds (ros#2370)

(cherry picked from commit aef16f0)

* Fixed uninitialized Time usage in rosservice call (ros#2369)

(cherry picked from commit de95e28)

* [windows] Remove python2 specific hack (ros#2364)

This PR ros#1872 made windows act differently than linux because of a specific python 2 delay doing unnecessary DNS checks for localhost.

The underlying code in python is different for python3 so the hack is no longer necessary. Given that, its better to reunify the codebase

(cherry picked from commit cf0f276)

* Fix segfault with default-constructed rosbag::ChunkedFile::swap (ros#2363)

Closes ros#2362.

(cherry picked from commit 3ad1409)

* Fix rostest target names when build dir is inside source dir (ros#2361)

It's a common approach to build cmake projects in a `build` folder in the project root.
It's just that `rosbuild`/`catkin` does not do it, so the changed name never mattered.

When you try the target name includes another `build_` string and there is *exactly one* package in the whole ecosystem that relies on this not happening:
https://github.com/ros/ros_comm/blob/845f74602c7464e08ef5ac6fd9e26c97d0fe42c9/test/test_rosbag/bag_migration_tests/CMakeLists.txt#L87-L103

(cherry picked from commit 336b29a)

* apply patch to fix build with boost 1.83.0 (ros#2354)

(cherry picked from commit 0b0076d)

* Update: #include <boost/bind.hpp> -> <boost/bind/bind.hpp> for boost 1.73 (ros#2348)

* Update: #include <boost/bind.hpp> -> <boost/bind/bind.hpp> for boost 1.73

Since boost 1.73, i.e. on Ubuntu 22.04, the old header issues a deprecation warning:
```
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message:
The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated.
Please use <boost/bind/bind.hpp> + using namespace boost::placeholders,
or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
```

While the new header <boost/bind/bind.hpp> is available for a long time (on 18.04 already)
and the source has been updated to use boost::placeholders in ros#2023, the header was not yet updated.

* For backwards compatibility: pull placeholders into global namespace

(cherry picked from commit 076ea3f)

* add --min-space option to the python cli of rosbag record (ros#2298)

(cherry picked from commit 1b1e7da)

* Fix EINTR handling in XmlRpcDispatch::work (ros#2278)

* Fix EINTR handling in XmlRpcDispatch::work

* Document the XmlRpcDispatch::work behavior we receiving EINTR

(cherry picked from commit 3337133)

* Expose is_shutdown_requested in rospy namespace. (ros#2267)

Just like the C++ `ros::isShuttingDown()`, this can be useful in certain
cases where shutdown needs to be checked before all shutdown handlers
finished.

The difference to `is_shutdown()` is already clearly described in the
docstring of `is_shutdown_requested()`.

(cherry picked from commit c27175c)

* rosnode: allow rosrun & roslaunch to find script (ros#2262)

By installing the script in the "package bin destination" as well as letting setup.py install it in the global 'bin' directory.

This is similar to what rosservice et al., which do work with roslaunch and rosrun.

Signed-off-by: gavanderhoorn <[email protected]>
(cherry picked from commit 31ddca1)

* rosbag_main.py: fix calling uncallable signal handler object (ros#2235) (ros#2236)

Co-authored-by: Yannik Nager <[email protected]>
(cherry picked from commit ce22d1c)

* Fix printing XmlRpcValue with GTest (ros#2224)

* Fix printing XmlRpcValue with GTest

* Added tests for XmlRpc::PrintTo()

* Make PrintTo inline

(cherry picked from commit 13e4bd0)

* check if ignore_unset_args is set in xmlloader (ros#2217)

(cherry picked from commit 8917094)

* Address DeprecationWarning (ros#2191)

(cherry picked from commit d7ddd80)

* fix typo t_start -> self.t_start (ros#2183)

fix typo local t_start is not defined here, need to use self.t_start

(cherry picked from commit eb8bb69)

* Exposed record snapshot feature for command line. (ros#2254)

(cherry picked from commit ecbb123)

* rostest: add subscribetest (ros#2184)

* rostest: add subscribetest

This PR adds `subscribetest` node to check if the specified topics are subscribed.
The usage is almost the same as `publishtest`:

```
  <test test-name="subscribetest_test" pkg="rostest" type="subscribetest" time-limit="7.0" retry="3">
    <rosparam>
      topics:
      - name: /chatter
        timeout: 2.
      - name: /subscribed_topic
        timeout: 2.
        negative: true
    </rosparam>
  </test>

```

* install nodes/subscribetest

(cherry picked from commit 5067f44)

---------

Signed-off-by: Emerson Knapp <[email protected]>
Co-authored-by: Alexis Schad <[email protected]>
Co-authored-by: 金梦磊 <[email protected]>
Co-authored-by: Wolfgang Merkt <[email protected]>
Co-authored-by: Kevin Chang <[email protected]>
Co-authored-by: Elvis Dowson <[email protected]>
Co-authored-by: Shingo Kitagawa <[email protected]>
Co-authored-by: Chris Lalancette <[email protected]>
Co-authored-by: Jacob Perron <[email protected]>
Co-authored-by: Chen Lihui <[email protected]>
Co-authored-by: Robert Haschke <[email protected]>
Co-authored-by: Lucas Walter <[email protected]>
Co-authored-by: madmage <[email protected]>
Co-authored-by: Daniele Calisi <[email protected]>
Co-authored-by: Emerson Knapp <[email protected]>
Co-authored-by: Rik Baehnemann <[email protected]>
Co-authored-by: Jochen Sprickerhof <[email protected]>
Co-authored-by: Shane Loretz <[email protected]>
Co-authored-by: Martin Pecka <[email protected]>
Co-authored-by: vineet131 <[email protected]>
Co-authored-by: Griffin Tabor <[email protected]>
Co-authored-by: Hugal31 <[email protected]>
Co-authored-by: Michael Görner <[email protected]>
Co-authored-by: daizhirui <[email protected]>
Co-authored-by: Zijun Xu <[email protected]>
Co-authored-by: Michael Grupp <[email protected]>
Co-authored-by: G.A. vd. Hoorn <[email protected]>
Co-authored-by: Yannik Nager <[email protected]>
Co-authored-by: Guglielmo Gemignani <[email protected]>
Co-authored-by: Kei Okada <[email protected]>
Co-authored-by: Blake Anderson <[email protected]>

---------

Signed-off-by: Emerson Knapp <[email protected]>
Co-authored-by: Alexis Schad <[email protected]>
Co-authored-by: 金梦磊 <[email protected]>
Co-authored-by: Wolfgang Merkt <[email protected]>
Co-authored-by: Kevin Chang <[email protected]>
Co-authored-by: Elvis Dowson <[email protected]>
Co-authored-by: Shingo Kitagawa <[email protected]>
Co-authored-by: Chris Lalancette <[email protected]>
Co-authored-by: Jacob Perron <[email protected]>
Co-authored-by: Chen Lihui <[email protected]>
Co-authored-by: Robert Haschke <[email protected]>
Co-authored-by: Lucas Walter <[email protected]>
Co-authored-by: madmage <[email protected]>
Co-authored-by: Daniele Calisi <[email protected]>
Co-authored-by: Emerson Knapp <[email protected]>
Co-authored-by: Rik Baehnemann <[email protected]>
Co-authored-by: Jochen Sprickerhof <[email protected]>
Co-authored-by: Shane Loretz <[email protected]>
Co-authored-by: Martin Pecka <[email protected]>
Co-authored-by: vineet131 <[email protected]>
Co-authored-by: Griffin Tabor <[email protected]>
Co-authored-by: Hugal31 <[email protected]>
Co-authored-by: Michael Görner <[email protected]>
Co-authored-by: daizhirui <[email protected]>
Co-authored-by: Zijun Xu <[email protected]>
Co-authored-by: Michael Grupp <[email protected]>
Co-authored-by: G.A. vd. Hoorn <[email protected]>
Co-authored-by: Yannik Nager <[email protected]>
Co-authored-by: Guglielmo Gemignani <[email protected]>
Co-authored-by: Kei Okada <[email protected]>
Co-authored-by: Blake Anderson <[email protected]>
AadityaRavindran pushed a commit to locusrobotics/ros_comm that referenced this pull request Apr 16, 2025
* rostest: add subscribetest

This PR adds `subscribetest` node to check if the specified topics are subscribed.
The usage is almost the same as `publishtest`:

```
  <test test-name="subscribetest_test" pkg="rostest" type="subscribetest" time-limit="7.0" retry="3">
    <rosparam>
      topics:
      - name: /chatter
        timeout: 2.
      - name: /subscribed_topic
        timeout: 2.
        negative: true
    </rosparam>
  </test>

```

* install nodes/subscribetest

(cherry picked from commit 5067f44)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants