Skip to content

Commit

Permalink
remove deprecated functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
isucan committed Feb 16, 2014
1 parent d9e745c commit bc1855c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 40 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ cmake_minimum_required( VERSION 2.8 FATAL_ERROR )
project (urdfdom CXX C)

set (URDF_MAJOR_VERSION 0)
set (URDF_MINOR_VERSION 2)
set (URDF_PATCH_VERSION 10)
set (URDF_MINOR_VERSION 3)
set (URDF_PATCH_VERSION 0)

set (URDF_VERSION ${URDF_MAJOR_VERSION}.${URDF_MINOR_VERSION}.${URDF_PATCH_VERSION})

Expand Down
38 changes: 0 additions & 38 deletions urdf_parser/src/link.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,11 +384,6 @@ bool parseVisual(Visual &vis, TiXmlElement *config)
}
}

vis.group_name = std::string("default");
const char *group_name_char = config->Attribute("group");
if (group_name_char)
logWarn("The notion of a group name for visual tags is not supported by URDF.");

return true;
}

Expand All @@ -413,11 +408,6 @@ bool parseCollision(Collision &col, TiXmlElement* config)
if (name_char)
col.name = name_char;

col.group_name = std::string("default");
const char *group_name_char = config->Attribute("group");
if (group_name_char)
logWarn("The notion of a group name for collision tags is not supported by URDF.");

return true;
}

Expand Down Expand Up @@ -447,27 +437,13 @@ bool parseLink(Link &link, TiXmlElement* config)
}

// Multiple Visuals (optional)
// For backward compatibility, we fill the map from group_name to visual tag (for ROS Groovy);
// Please use the visual_array instead
for (TiXmlElement* vis_xml = config->FirstChildElement("visual"); vis_xml; vis_xml = vis_xml->NextSiblingElement("visual"))
{

boost::shared_ptr<Visual> vis;
vis.reset(new Visual());
if (parseVisual(*vis, vis_xml))
{
boost::shared_ptr<std::vector<boost::shared_ptr<Visual > > > viss = link.getVisuals(vis->group_name);
if (!viss)
{
// group does not exist, create one and add to map
viss.reset(new std::vector<boost::shared_ptr<Visual > >);
// new group name, create vector, add vector to map and add Visual to the vector
link.visual_groups.insert(make_pair(vis->group_name,viss));
}

// group exists, add Visual to the vector in the map
viss->push_back(vis);

link.visual_array.push_back(vis);
}
else
Expand All @@ -484,26 +460,12 @@ bool parseLink(Link &link, TiXmlElement* config)
link.visual = link.visual_array[0];

// Multiple Collisions (optional)
// For backward compatibility, we fill the map from group_name to collision tag (for ROS Groovy);
// Please use the collision_array instead
for (TiXmlElement* col_xml = config->FirstChildElement("collision"); col_xml; col_xml = col_xml->NextSiblingElement("collision"))
{
boost::shared_ptr<Collision> col;
col.reset(new Collision());
if (parseCollision(*col, col_xml))
{
boost::shared_ptr<std::vector<boost::shared_ptr<Collision > > > cols = link.getCollisions(col->group_name);

if (!cols)
{
// group does not exist, create one and add to map
cols.reset(new std::vector<boost::shared_ptr<Collision > >);
// new group name, create vector, add vector to map and add Collision to the vector
link.collision_groups.insert(make_pair(col->group_name,cols));
}

// group exists, add Collision to the vector in the map
cols->push_back(col);
link.collision_array.push_back(col);
}
else
Expand Down

0 comments on commit bc1855c

Please sign in to comment.