Interesting interaction between set_up_ament=True
and nodes exiting gracefully
#168
-
Was recently trying to figure out why I could not get my nodes to exit gracefully on shutdown and I traced it back to the Does this interaction make sense / is it intentional? To me, it seems to stem from that when Sure, steps to re-create: ros2_cpp_binary(
name = "lifecycle_talker",
srcs = ["lifecycle_talker.cc"],
+ set_up_ament = True,
deps = [
"@ros2_common_interfaces//:cpp_std_msgs",
"@ros2_rcl_interfaces//:cpp_lifecycle_msgs",
"@ros2_rclcpp//:rclcpp",
"@ros2_rclcpp//:rclcpp_lifecycle",
],
) run the test in the
full log: test.log |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi, can you paste the error log here for the reference, please? |
Beta Was this translation helpful? Give feedback.
-
Great observation that it's due to the PID changing. When I read this, it was immediately clear that this is introduced by the wrapper that we use to set Since we use the same wrapper for |
Beta Was this translation helpful? Give feedback.
Great observation that it's due to the PID changing. When I read this, it was immediately clear that this is introduced by the wrapper that we use to set
AMENT_PREFIX_PATH
. I created #169 with a fix and that seems to make it work.Since we use the same wrapper for
ros_py_binary
, this should fix that issue as well. @cullenwren-volair Could you give it a try please? Thanks!