diff --git a/robot_state_publisher/src/robot_state_publisher_node.cpp b/robot_state_publisher/src/robot_state_publisher_node.cpp index ad51100..ae54ba9 100644 --- a/robot_state_publisher/src/robot_state_publisher_node.cpp +++ b/robot_state_publisher/src/robot_state_publisher_node.cpp @@ -71,10 +71,12 @@ int main(int argc, char** argv) if (tree.getNrOfSegments() == 0){ ROS_WARN("Robot state publisher got an empty tree and cannot publish any state to tf"); + ros::spin(); } else{ JointStateListener state_publisher(tree); + ros::spin(); } - ros::spin(); + return 0; } diff --git a/robot_state_publisher/test/test_publisher.cpp b/robot_state_publisher/test/test_publisher.cpp index 34c06c2..41c96a7 100644 --- a/robot_state_publisher/test/test_publisher.cpp +++ b/robot_state_publisher/test/test_publisher.cpp @@ -63,6 +63,7 @@ protected: /// constructor TestPublisher() { + /* // constructs a robot model from the xml file urdf::Model robot_model; if (g_argc == 2){ @@ -78,12 +79,13 @@ protected: ROS_ERROR("Failed to extract kdl tree from robot model"); publisher = new JointStateListener(tree); + */ } /// Destructor ~TestPublisher() { - delete publisher; + // delete publisher; } }; diff --git a/robot_state_publisher/test/test_publisher.launch b/robot_state_publisher/test/test_publisher.launch index 43d8fae..79b6a9c 100644 --- a/robot_state_publisher/test/test_publisher.launch +++ b/robot_state_publisher/test/test_publisher.launch @@ -1,5 +1,7 @@ + + - +