remove deprecated support for loating joint

This commit is contained in:
wim 2010-09-29 18:46:10 +00:00
parent 78ee3ed5e5
commit 4de63d55a8
5 changed files with 280 additions and 3882 deletions

View File

@ -277,20 +277,11 @@ bool Model::initTree(std::map<std::string, std::string> &parent_link_tree)
std::string child_link_name = joint->second->child_link_name; std::string child_link_name = joint->second->child_link_name;
ROS_DEBUG("build tree: joint: '%s' has parent link '%s' and child link '%s'", joint->first.c_str(), parent_link_name.c_str(),child_link_name.c_str()); ROS_DEBUG("build tree: joint: '%s' has parent link '%s' and child link '%s'", joint->first.c_str(), parent_link_name.c_str(),child_link_name.c_str());
if (parent_link_name.empty() && !child_link_name.empty()) if (parent_link_name.empty() || child_link_name.empty())
{ {
ROS_ERROR(" Joint %s specifies child link but not parent link.",(joint->second)->name.c_str()); ROS_ERROR(" Joint %s is missing a parent and/or child link specification.",(joint->second)->name.c_str());
return false; return false;
} }
else if (!parent_link_name.empty() && child_link_name.empty())
{
ROS_ERROR(" Joint %s specifies parent link but not child link.",(joint->second)->name.c_str());
return false;
}
else if (parent_link_name.empty() && child_link_name.empty())
{
ROS_WARN(" Joint %s specifies no parent link and no child link. The Boxturtle urdf parser had a bug that allowed this type of joints, but this is not a valid joint according to the URDF spec.",(joint->second)->name.c_str());
}
else else
{ {
// find child and parent links // find child and parent links

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,6 @@
<?xml version="1.0" ?> <?xml version="1.0" ?>
<robot name="pr2"> <robot name="pr2">
<joint name="fl_caster_rotation_joint" type="continuous"/>
<link name="fl_caster_rotation_link"> <link name="fl_caster_rotation_link">
<inertial> <inertial>
<mass value="3.473082"/> <mass value="3.473082"/>

View File

@ -1,5 +1,5 @@
<launch> <launch>
<param name="robot_description" textfile="$(find urdf)/test/pr2_desc.urdf" /> <param name="robot_description" textfile="$(find urdf)/test/pr2_desc.urdf" />
<test test-name="robot_model_parser_test" pkg="urdf" type="test_parser" args="$(find urdf) fail_pr2_desc_bracket.urdf fail_pr2_desc_double_joint.urdf fail_pr2_desc_double.urdf fail_pr2_desc_loop.urdf fail_pr2_desc_no_filename_in_mesh.urdf fail_pr2_desc_no_joint2.urdf fail_pr2_desc_parent_itself.urdf fail_pr2_desc_two_trees.urdf fail_three_links_one_joint.urdf no_visual.urdf one_link.urdf pr2_desc_explicit_world.urdf pr2_desc_no_joint.urdf pr2_desc.urdf two_links_one_joint.urdf singularity.urdf" /> <test test-name="robot_model_parser_test" pkg="urdf" type="test_parser" args="$(find urdf) fail_pr2_desc_bracket.urdf fail_pr2_desc_double_joint.urdf fail_pr2_desc_double.urdf fail_pr2_desc_loop.urdf fail_pr2_desc_no_filename_in_mesh.urdf fail_pr2_desc_no_joint2.urdf fail_pr2_desc_parent_itself.urdf fail_pr2_desc_two_trees.urdf fail_three_links_one_joint.urdf no_visual.urdf one_link.urdf pr2_desc_no_joint.urdf pr2_desc.urdf two_links_one_joint.urdf singularity.urdf" />
</launch> </launch>