fix scope problem

This commit is contained in:
wim 2009-11-24 21:57:49 +00:00
parent 3117f697bc
commit b83664adcf
1 changed files with 9 additions and 5 deletions

View File

@ -69,13 +69,17 @@ int main(int argc, char** argv)
return -1; return -1;
} }
if (tree.getNrOfSegments() == 0) if (tree.getNrOfSegments() == 0){
ROS_WARN("Robot state publisher got an empty tree and cannot publish any state to tf"); ROS_WARN("Robot state publisher got an empty tree and cannot publish any state to tf");
else if (tree.getNrOfSegments() == 1)
ROS_WARN("Robot state publisher got a tree with only one segment and cannot publish any state to tf");
else
JointStateListener state_publisher(tree);
ros::spin(); ros::spin();
}
else if (tree.getNrOfSegments() == 1){
ROS_WARN("Robot state publisher got a tree with only one segment and cannot publish any state to tf");
ros::spin();
}
else{
JointStateListener state_publisher(tree);
ros::spin();
}
return 0; return 0;
} }