merge regression test patch from 1.0 branch. r28660:r28661

This commit is contained in:
wim 2010-04-08 18:37:48 +00:00
parent b34eed700f
commit 9c8e11f620
3 changed files with 9 additions and 3 deletions

View File

@ -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;
}

View File

@ -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;
}
};

View File

@ -1,5 +1,7 @@
<launch>
<node pkg="rosrecord" name="rosplay" type="rosplay" args="$(find robot_state_publisher)/test/joint_states.bag" />
<node pkg="robot_state_publisher" name="robot_state_publisher" type="state_publisher" />
<param name="robot_description" textfile="$(find robot_state_publisher)/test/pr2.urdf" />
<test test-name="test_publisher" pkg="robot_state_publisher" type="test_publisher" args="$(find robot_state_publisher)/test/pr2.urdf" />
<test test-name="test_publisher" pkg="robot_state_publisher" type="test_publisher" />
</launch>