From 2460b8d352b5a937153499912e842dd56aa5123c Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Sat, 24 Aug 2024 10:11:39 +0000 Subject: [PATCH] Fix segfault of example_gripper --- gz_ros2_control_demos/examples/example_gripper.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gz_ros2_control_demos/examples/example_gripper.cpp b/gz_ros2_control_demos/examples/example_gripper.cpp index 449cf6ab..c534fcb5 100644 --- a/gz_ros2_control_demos/examples/example_gripper.cpp +++ b/gz_ros2_control_demos/examples/example_gripper.cpp @@ -23,13 +23,11 @@ #include "std_msgs/msg/float64_multi_array.hpp" -std::shared_ptr node; - int main(int argc, char * argv[]) { rclcpp::init(argc, argv); - node = std::make_shared("gripper_test_node"); + std::shared_ptr node = std::make_shared("gripper_test_node"); auto publisher = node->create_publisher( "/gripper_controller/commands", 10);