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);