-
Notifications
You must be signed in to change notification settings - Fork 6
Conversation
e29c627
to
fc4ff47
Compare
executor = rclpy.executors.SingleThreadedExecutor(context=self.context) | ||
executor.add_node(self.node) | ||
try: | ||
executor.spin_once(timeout_sec=timeout_sec) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the launch description has any lifecycle nodes in it, it will also require a ROSSpecificLaunchStartup in the launch description. This starts a thread that will spin in the background and will conflict with this spin and crash the test until this issue is resolved
This example doesn't use lifecycle nodes, so it'll launch without the ROSSpecificLaunchStartup
fc4ff47
to
634dac9
Compare
@dejanpan This is a lower priority PR, but it shows how to do some simple ROS testing with apex_launchtest. The important file is apex_launchtest_ros/examples/talker_listener.test.py. Can you glance at this and approve it? |
634dac9
to
e2ae424
Compare
9b0329b
to
5b7b92b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM
""" | ||
return len(self.__republished_list) | ||
|
||
def get_republished(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pbaughman just curious, any reason not to use @property
instead of getters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hidmic Old habit - In a previous life I had a blanket ban on python properties because they were difficult to mock. Especially boolean properties. You would mock.patch them and then no matter what you set the return value to to they would all silently evaluate to 'True.' That combined with poor negative testing = bugs bugs bugs.
5b7b92b
to
c101b25
Compare
@hidmic It reset your approval when I accepted your suggested edits - can you re-approve? Sorry - thanks |
Fix Typo Co-Authored-By: pbaughman <dblue135@yahoo.com>
Improve sentence Co-Authored-By: pbaughman <dblue135@yahoo.com>
Fix bad spelling Co-Authored-By: pbaughman <dblue135@yahoo.com>
formatting Co-Authored-By: pbaughman <dblue135@yahoo.com>
Formatting Co-Authored-By: pbaughman <dblue135@yahoo.com>
c078a61
to
ca5878b
Compare
Signed-off-by: Pete Baughman <pete.baughman@apex.ai>
Add an apex_launchtest_ros example that shows how to interact with the talker and listener nodes in an integration test. Remove the old example nodes in favor of standard ROS2 example nodes from the demo_nodes_py package
Fixes #26