-
Notifications
You must be signed in to change notification settings - Fork 233
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
aligh with rcl that a rosout publisher of a node might not exist #1196
aligh with rcl that a rosout publisher of a node might not exist #1196
Conversation
Signed-off-by: Chen Lihui <[email protected]>
Signed-off-by: Chen Lihui <[email protected]>
reset error message for RCL_RET_NOT_FOUND as well Signed-off-by: Chen Lihui <[email protected]>
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 think we need to add a test for this situation, but it otherwise looks good.
@@ -114,13 +114,6 @@ def call_logger(logger): | |||
self.executor.spin_until_future_complete(self.fut, 3) | |||
self.assertTrue(self.fut.done()) | |||
|
|||
def test_node_logger_not_exist(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.
I think we want to add a test to ensure that the situation from #1195 doesn't occur again. The following code (which needs to be adapted into a test) reproduced for me:
import rclpy
from rclpy.action import ActionServer
from example_interfaces.action import Fibonacci
class MyClass:
def __init__(self, node):
self.action_server = ActionServer(
node,
Fibonacci,
"/fibonacci_action_1",
self.execute_callback,
)
def execute_callback(self):
print("Execute callback")
rclpy.init()
node = rclpy.create_node("mynode", enable_rosout=False)
x = MyClass(node)
node.destroy_node()
rclpy.try_shutdown()
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.
Thanks.
I used the similar logic to test the case. Updated in fc84c5e.
Signed-off-by: Chen Lihui <[email protected]>
Signed-off-by: Chen Lihui <[email protected]>
CI for this is in ros2/rcl#1115 (comment) |
align with ros2/rcl#1115