-
Notifications
You must be signed in to change notification settings - Fork 225
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
add QoS Profile/Depth support to Node. #1376
base: rolling
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
from rclpy.exceptions import InvalidNamespaceException | ||
from rclpy.exceptions import InvalidNodeNameException | ||
from rclpy.parameter import Parameter | ||
from rclpy.qos import qos_profile_sensor_data | ||
|
||
|
||
class TestCreateNode(unittest.TestCase): | ||
|
@@ -82,6 +83,29 @@ def test_create_node_with_parameter_overrides(self): | |
] | ||
).destroy_node() | ||
|
||
def test_create_node_disable_rosout(self): | ||
node_name = 'create_node_test_disable_rosout' | ||
namespace = '/ns' | ||
node = rclpy.create_node( | ||
node_name, namespace=namespace, context=self.context, enable_rosout=False) | ||
node.destroy_node() | ||
|
||
def test_create_node_rosout_qos_profile(self): | ||
node_name = 'create_node_test_rosout_rosout_qos_profile' | ||
namespace = '/ns' | ||
node = rclpy.create_node( | ||
node_name, namespace=namespace, context=self.context, enable_rosout=True, | ||
rosout_qos_profile=qos_profile_sensor_data) | ||
node.destroy_node() | ||
|
||
def test_create_node_rosout_qos_depth(self): | ||
node_name = 'create_node_test_rosout_rosout_qos_depth' | ||
namespace = '/ns' | ||
node = rclpy.create_node( | ||
node_name, namespace=namespace, context=self.context, enable_rosout=True, | ||
rosout_qos_profile=10) | ||
node.destroy_node() | ||
Comment on lines
+86
to
+107
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not a huge fan of tests that don't |
||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
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.
I don't think this is the correct "default" profile for the rosout publisher. As far as I can tell, the default here is actually https://github.com/ros2/rcl/blob/d9daca7c0af7ecdcd103ece30bb7c64bc919ef24/rcl/include/rcl/logging_rosout.h#L37-L48 . So I think we should define this to be the same by default.