create base class for parsers
This commit is contained in:
parent
c4fbdda53d
commit
4f73b461fe
|
@ -22,10 +22,12 @@
|
|||
<build_depend>collada-dom</build_depend>
|
||||
<build_depend>roscpp</build_depend>
|
||||
<build_depend>urdfdom_headers</build_depend>
|
||||
<build_depend>urdf</build_depend>
|
||||
|
||||
<run_depend>collada-dom</run_depend>
|
||||
<run_depend>roscpp</run_depend>
|
||||
<run_depend>urdfdom_headers</run_depend>
|
||||
<run_depend>urdf</run_depend>
|
||||
|
||||
</package>
|
||||
|
||||
|
|
|
@ -41,6 +41,9 @@
|
|||
/* we include the default parser for plain URDF files;
|
||||
other parsers are loaded via plugins (if available) */
|
||||
#include <urdf_parser/urdf_parser.h>
|
||||
#include <urdf_parser_plugin/parser.h>
|
||||
#include <pluginlib/class_loader.h>
|
||||
|
||||
#include <collada_parser/collada_parser.h>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(urdf_parser_plugin)
|
||||
|
||||
find_package(catkin REQUIRED urdfdom_headers)
|
||||
|
||||
catkin_package(
|
||||
INCLUDE_DIRS include
|
||||
DEPENDS urdfdom_headers
|
||||
)
|
||||
|
||||
include_directories(include)
|
||||
|
||||
install(DIRECTORY include/${PROJECT_NAME}/
|
||||
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
|
|
@ -0,0 +1,57 @@
|
|||
/*********************************************************************
|
||||
* Software License Agreement (BSD License)
|
||||
*
|
||||
* Copyright (c) 2013, Willow Garage, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* with the distribution.
|
||||
* * Neither the name of the Willow Garage nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*********************************************************************/
|
||||
|
||||
/* Author: Ioan Sucan */
|
||||
|
||||
#include <urdf_model/model.h>
|
||||
|
||||
namespace urdf
|
||||
{
|
||||
|
||||
/** \brief Base class for URDF parsers */
|
||||
class URDFParser
|
||||
{
|
||||
public:
|
||||
URDFParser()
|
||||
{
|
||||
}
|
||||
virtual ~URDFParser()
|
||||
{
|
||||
}
|
||||
|
||||
/// \brief Load Model from string
|
||||
virtual boost::shared_ptr<ModelInterface> parse(const std::string &xml_string) = 0;
|
||||
};
|
||||
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
<package>
|
||||
<name>urdf_parser_plugin</name>
|
||||
<version>1.10.9</version>
|
||||
<description>
|
||||
This package contains a C++ base class for URDF parsers.
|
||||
</description>
|
||||
|
||||
<author email="isucan@willowgarage.com">Ioan Sucan</author>
|
||||
<maintainer email="isucan@willowgarage.com">Ioan Sucan</maintainer>
|
||||
|
||||
<license>BSD</license>
|
||||
|
||||
<url type="website">http://ros.org/wiki/urdf</url>
|
||||
<url type="repository">https://github.com/ros/robot_model</url>
|
||||
<url type="bugtracker">https://github.com/ros/robot_model/issues</url>
|
||||
|
||||
<buildtool_depend>catkin</buildtool_depend>
|
||||
<build_depend>urdfdom_headers</build_depend>
|
||||
<run_depend>urdfdom_headers</run_depend>
|
||||
|
||||
</package>
|
Loading…
Reference in New Issue