Delete kdl_parser_py directory
This commit is contained in:
parent
e502ca64d2
commit
7bdfb82e6b
|
@ -1,287 +0,0 @@
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Changelog for package kdl_parser_py
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
1.14.2 (2022-04-13)
|
||||
-------------------
|
||||
* Restored compatibility with Orocos KDL after Joint.None was removed (`#45 <https://github.com/ros/kdl_parser/issues/45>`_)
|
||||
* Contributors: Julian Förster
|
||||
|
||||
1.14.1 (2020-08-24)
|
||||
-------------------
|
||||
* Drop CATKIN_IGNORE (`#42 <https://github.com/ros/kdl_parser/issues/42>`_)
|
||||
* Contributors: Jochen Sprickerhof
|
||||
|
||||
1.14.0 (2020-04-13)
|
||||
-------------------
|
||||
* Used keys for Orocos (`#38 <https://github.com/ros/kdl_parser/issues/38>`_)
|
||||
* Contributors: Alejandro Hernández Cordero
|
||||
|
||||
1.13.1 (2018-07-23)
|
||||
-------------------
|
||||
* Remove the declaration of a library from kdl_parser_py. (`#14 <https://github.com/ros/kdl_parser/issues/14>`_)
|
||||
* Remove unused kdl_parser_py.urdf. (`#17 <https://github.com/ros/kdl_parser/issues/17>`_)
|
||||
* Contributors: Chris Lalancette
|
||||
|
||||
1.13.0 (2018-04-05)
|
||||
-------------------
|
||||
* Make rostest a test_depend (`#3 <https://github.com/ros/kdl_parser/issues/3>`_)
|
||||
* update links now that this is in its own repo
|
||||
* Contributors: Chris Lalancette, Mikael Arguedas
|
||||
|
||||
1.12.10 (2017-05-17)
|
||||
--------------------
|
||||
|
||||
1.12.9 (2017-04-26)
|
||||
-------------------
|
||||
* Unset origin xyz or rpy is now properly interpreted as zero vector (`#187 <https://github.com/ros/robot_model/issues/187>`_)
|
||||
* Contributors: eugene-katsevman
|
||||
|
||||
1.12.8 (2017-03-27)
|
||||
-------------------
|
||||
* Switch a couple more packages over to Chris and Shane.
|
||||
* Contributors: Chris Lalancette
|
||||
|
||||
1.12.7 (2017-01-26)
|
||||
-------------------
|
||||
|
||||
1.12.6 (2017-01-04)
|
||||
-------------------
|
||||
|
||||
1.12.5 (2016-10-27)
|
||||
-------------------
|
||||
|
||||
1.12.4 (2016-08-23)
|
||||
-------------------
|
||||
|
||||
1.12.3 (2016-06-10)
|
||||
-------------------
|
||||
|
||||
1.12.2 (2016-04-12)
|
||||
-------------------
|
||||
|
||||
1.12.1 (2016-04-10)
|
||||
-------------------
|
||||
* Remove cmake_modules dependency
|
||||
* Contributors: Jackie Kay
|
||||
|
||||
1.12.0 (2016-04-04)
|
||||
-------------------
|
||||
|
||||
1.11.10 (2016-02-23)
|
||||
--------------------
|
||||
* another patch release
|
||||
* Remove cmake_modules dependency
|
||||
* Contributors: Jackie Kay
|
||||
|
||||
1.11.9 (2016-02-22)
|
||||
-------------------
|
||||
* Changelog
|
||||
* kdl_parser_py: run_depend on urdfdom_py
|
||||
* Remove dependency in urdf_parser_py
|
||||
* kdl_parser: Adding python kdl parser
|
||||
* Contributors: Jackie Kay, Jonathan Bohren, Steven Peters
|
||||
|
||||
1.11.8 (2015-09-11)
|
||||
-------------------
|
||||
|
||||
1.11.7 (2015-04-22)
|
||||
-------------------
|
||||
|
||||
1.11.6 (2014-11-30 11:17)
|
||||
-------------------------
|
||||
|
||||
1.11.5 (2014-07-24)
|
||||
-------------------
|
||||
|
||||
1.11.4 (2014-07-07)
|
||||
-------------------
|
||||
|
||||
1.11.3 (2014-06-24)
|
||||
-------------------
|
||||
|
||||
1.11.2 (2014-03-22)
|
||||
-------------------
|
||||
|
||||
1.11.1 (2014-03-20)
|
||||
-------------------
|
||||
|
||||
1.11.0 (2014-02-21)
|
||||
-------------------
|
||||
|
||||
1.10.21 (2014-11-30 11:15)
|
||||
--------------------------
|
||||
|
||||
1.10.20 (2014-08-01)
|
||||
--------------------
|
||||
|
||||
1.10.19 (2014-02-15)
|
||||
--------------------
|
||||
|
||||
1.10.18 (2013-12-04)
|
||||
--------------------
|
||||
|
||||
1.10.17 (2013-11-22)
|
||||
--------------------
|
||||
|
||||
1.10.16 (2013-11-18)
|
||||
--------------------
|
||||
|
||||
1.10.15 (2013-08-17)
|
||||
--------------------
|
||||
|
||||
1.10.14 (2013-07-26)
|
||||
--------------------
|
||||
|
||||
1.10.13 (2013-07-17)
|
||||
--------------------
|
||||
|
||||
1.10.12 (2013-07-02 08:41)
|
||||
--------------------------
|
||||
|
||||
1.10.11 (2013-05-21)
|
||||
--------------------
|
||||
|
||||
1.10.10 (2013-05-20)
|
||||
--------------------
|
||||
|
||||
1.10.9 (2013-04-21)
|
||||
-------------------
|
||||
|
||||
1.10.8 (2013-04-18 12:24)
|
||||
-------------------------
|
||||
|
||||
1.10.7 (2013-04-18 10:19)
|
||||
-------------------------
|
||||
|
||||
1.10.6 (2013-04-18 01:56)
|
||||
-------------------------
|
||||
|
||||
1.10.5 (2013-04-18 01:46)
|
||||
-------------------------
|
||||
|
||||
1.10.4 (2013-04-12)
|
||||
-------------------
|
||||
|
||||
1.10.3 (2013-03-13 22:22)
|
||||
-------------------------
|
||||
|
||||
1.10.2 (2013-03-13 17:34)
|
||||
-------------------------
|
||||
|
||||
1.10.1 (2013-03-13 17:15)
|
||||
-------------------------
|
||||
|
||||
1.10.0 (2013-03-11 19:48)
|
||||
-------------------------
|
||||
|
||||
1.9.36 (2013-07-02 08:38)
|
||||
-------------------------
|
||||
|
||||
1.9.35 (2013-04-29)
|
||||
-------------------
|
||||
|
||||
1.9.34 (2013-04-18 18:17)
|
||||
-------------------------
|
||||
|
||||
1.9.33 (2013-03-11 19:49)
|
||||
-------------------------
|
||||
|
||||
1.9.32 (2012-12-22)
|
||||
-------------------
|
||||
|
||||
1.9.31 (2012-12-18)
|
||||
-------------------
|
||||
|
||||
1.9.30 (2012-12-14)
|
||||
-------------------
|
||||
|
||||
1.9.29 (2012-12-05)
|
||||
-------------------
|
||||
|
||||
1.9.28 (2012-11-07)
|
||||
-------------------
|
||||
|
||||
1.9.27 (2012-11-06)
|
||||
-------------------
|
||||
|
||||
1.9.26 (2012-11-05)
|
||||
-------------------
|
||||
|
||||
1.9.25 (2012-10-29)
|
||||
-------------------
|
||||
|
||||
1.9.24 (2012-10-25)
|
||||
-------------------
|
||||
|
||||
1.9.23 (2012-10-14 15:26)
|
||||
-------------------------
|
||||
|
||||
1.9.22 (2012-10-14 13:13)
|
||||
-------------------------
|
||||
|
||||
1.9.21 (2012-10-14 12:25)
|
||||
-------------------------
|
||||
|
||||
1.9.20 (2012-10-14 02:13)
|
||||
-------------------------
|
||||
|
||||
1.9.19 (2012-10-13)
|
||||
-------------------
|
||||
|
||||
1.9.18 (2012-10-07)
|
||||
-------------------
|
||||
|
||||
1.9.17 (2012-10-06 21:27)
|
||||
-------------------------
|
||||
|
||||
1.9.16 (2012-10-06 21:22)
|
||||
-------------------------
|
||||
|
||||
1.9.15 (2012-10-06 20:47)
|
||||
-------------------------
|
||||
|
||||
1.9.14 (2012-10-06 19:20)
|
||||
-------------------------
|
||||
|
||||
1.9.13 (2012-09-16 16:51)
|
||||
-------------------------
|
||||
|
||||
1.9.12 (2012-09-16 02:25)
|
||||
-------------------------
|
||||
|
||||
1.9.11 (2012-09-15 13:45)
|
||||
-------------------------
|
||||
|
||||
1.9.10 (2012-09-15 12:27)
|
||||
-------------------------
|
||||
|
||||
1.9.9 (2012-09-12 14:38)
|
||||
------------------------
|
||||
|
||||
1.9.8 (2012-09-12 14:27)
|
||||
------------------------
|
||||
|
||||
1.9.7 (2012-09-11)
|
||||
------------------
|
||||
|
||||
1.9.6 (2012-09-07)
|
||||
------------------
|
||||
|
||||
1.9.5 (2012-09-06)
|
||||
------------------
|
||||
|
||||
1.9.4 (2012-09-04)
|
||||
------------------
|
||||
|
||||
1.9.3 (2012-09-03)
|
||||
------------------
|
||||
|
||||
1.9.2 (2012-08-14 20:34)
|
||||
------------------------
|
||||
|
||||
1.9.1 (2012-08-14 20:33)
|
||||
------------------------
|
||||
|
||||
1.9.0 (2012-08-02)
|
||||
------------------
|
|
@ -1,19 +0,0 @@
|
|||
cmake_minimum_required(VERSION 3.0.2)
|
||||
|
||||
project(kdl_parser_py)
|
||||
|
||||
find_package(catkin REQUIRED)
|
||||
|
||||
catkin_package(
|
||||
CATKIN_DEPENDS urdfdom_py
|
||||
)
|
||||
|
||||
catkin_python_setup()
|
||||
|
||||
catkin_install_python(PROGRAMS ${PROJECT_NAME}/urdf.py
|
||||
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
|
||||
|
||||
if(CATKIN_ENABLE_TESTING)
|
||||
find_package(catkin REQUIRED COMPONENTS rostest)
|
||||
add_rostest(test/test_kdl_parser.launch)
|
||||
endif()
|
|
@ -1,128 +0,0 @@
|
|||
from __future__ import print_function
|
||||
|
||||
import urdf_parser_py.urdf as urdf
|
||||
|
||||
import PyKDL as kdl
|
||||
|
||||
def treeFromFile(filename):
|
||||
"""
|
||||
Construct a PyKDL.Tree from an URDF file.
|
||||
:param filename: URDF file path
|
||||
"""
|
||||
|
||||
with open(filename) as urdf_file:
|
||||
return treeFromUrdfModel(urdf.URDF.from_xml_string(urdf_file.read()))
|
||||
|
||||
def treeFromParam(param):
|
||||
"""
|
||||
Construct a PyKDL.Tree from an URDF in a ROS parameter.
|
||||
:param param: Parameter name, ``str``
|
||||
"""
|
||||
|
||||
return treeFromUrdfModel(urdf.URDF.from_parameter_server(param))
|
||||
|
||||
def treeFromString(xml):
|
||||
"""
|
||||
Construct a PyKDL.Tree from an URDF xml string.
|
||||
:param xml: URDF xml string, ``str``
|
||||
"""
|
||||
|
||||
return treeFromUrdfModel(urdf.URDF.from_xml_string(xml))
|
||||
|
||||
def _toKdlPose(pose):
|
||||
# URDF might have RPY OR XYZ unspecified. Both default to zeros
|
||||
rpy = pose.rpy if pose and pose.rpy and len(pose.rpy) == 3 else [0, 0, 0]
|
||||
xyz = pose.xyz if pose and pose.xyz and len(pose.xyz) == 3 else [0, 0, 0]
|
||||
|
||||
return kdl.Frame(
|
||||
kdl.Rotation.RPY(*rpy),
|
||||
kdl.Vector(*xyz))
|
||||
|
||||
|
||||
def _toKdlInertia(i):
|
||||
# kdl specifies the inertia in the reference frame of the link, the urdf
|
||||
# specifies the inertia in the inertia reference frame
|
||||
origin = _toKdlPose(i.origin)
|
||||
inertia = i.inertia
|
||||
return origin.M * kdl.RigidBodyInertia(
|
||||
i.mass, origin.p,
|
||||
kdl.RotationalInertia(inertia.ixx, inertia.iyy, inertia.izz, inertia.ixy, inertia.ixz, inertia.iyz));
|
||||
|
||||
def _toKdlJoint(jnt):
|
||||
|
||||
fixed = lambda j,F: kdl.Joint(
|
||||
j.name,
|
||||
getattr(kdl.Joint, 'Fixed') if hasattr(kdl.Joint, 'Fixed') else getattr(kdl.Joint, 'None'))
|
||||
rotational = lambda j,F: kdl.Joint(j.name, F.p, F.M * kdl.Vector(*j.axis), kdl.Joint.RotAxis)
|
||||
translational = lambda j,F: kdl.Joint(j.name, F.p, F.M * kdl.Vector(*j.axis), kdl.Joint.TransAxis)
|
||||
|
||||
type_map = {
|
||||
'fixed': fixed,
|
||||
'revolute': rotational,
|
||||
'continuous': rotational,
|
||||
'prismatic': translational,
|
||||
'floating': fixed,
|
||||
'planar': fixed,
|
||||
'unknown': fixed,
|
||||
}
|
||||
|
||||
return type_map[jnt.type](jnt, _toKdlPose(jnt.origin))
|
||||
|
||||
def _add_children_to_tree(robot_model, root, tree):
|
||||
|
||||
|
||||
# constructs the optional inertia
|
||||
inert = kdl.RigidBodyInertia(0)
|
||||
if root.inertial:
|
||||
inert = _toKdlInertia(root.inertial)
|
||||
|
||||
# constructs the kdl joint
|
||||
(parent_joint_name, parent_link_name) = robot_model.parent_map[root.name]
|
||||
parent_joint = robot_model.joint_map[parent_joint_name]
|
||||
|
||||
# construct the kdl segment
|
||||
sgm = kdl.Segment(
|
||||
root.name,
|
||||
_toKdlJoint(parent_joint),
|
||||
_toKdlPose(parent_joint.origin),
|
||||
inert)
|
||||
|
||||
# add segment to tree
|
||||
if not tree.addSegment(sgm, parent_link_name):
|
||||
return False
|
||||
|
||||
if root.name not in robot_model.child_map:
|
||||
return True
|
||||
|
||||
children = [robot_model.link_map[l] for (j,l) in robot_model.child_map[root.name]]
|
||||
|
||||
# recurslively add all children
|
||||
for child in children:
|
||||
if not _add_children_to_tree(robot_model, child, tree):
|
||||
return False
|
||||
|
||||
return True;
|
||||
|
||||
def treeFromUrdfModel(robot_model, quiet=False):
|
||||
"""
|
||||
Construct a PyKDL.Tree from an URDF model from urdf_parser_python.
|
||||
|
||||
:param robot_model: URDF xml string, ``str``
|
||||
:param quiet: If true suppress messages to stdout, ``bool``
|
||||
"""
|
||||
|
||||
root = robot_model.link_map[robot_model.get_root()]
|
||||
|
||||
if root.inertial and not quiet:
|
||||
print("The root link %s has an inertia specified in the URDF, but KDL does not support a root link with an inertia. As a workaround, you can add an extra dummy link to your URDF." % root.name);
|
||||
|
||||
ok = True
|
||||
tree = kdl.Tree(root.name)
|
||||
|
||||
# add all children
|
||||
for (joint,child) in robot_model.child_map[root.name]:
|
||||
if not _add_children_to_tree(robot_model, robot_model.link_map[child], tree):
|
||||
ok = False
|
||||
break
|
||||
|
||||
return (ok, tree)
|
|
@ -1,39 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-model
|
||||
href="http://download.ros.org/schema/package_format3.xsd"
|
||||
schematypens="http://www.w3.org/2001/XMLSchema"?>
|
||||
<package format="3">
|
||||
<name>kdl_parser_py</name>
|
||||
<version>1.14.2</version>
|
||||
<description>
|
||||
The Kinematics and Dynamics Library (KDL) defines a tree structure
|
||||
to represent the kinematic and dynamic parameters of a robot
|
||||
mechanism. <tt>kdl_parser_py</tt> provides Python tools to construct a KDL
|
||||
tree from an XML robot representation in URDF.
|
||||
</description>
|
||||
|
||||
<author email="jonathan.bohren@gmail.com">Jonathan Bohren</author>
|
||||
<author email="jacquelinekay1@gmail.com">Jackie Kay</author>
|
||||
<maintainer email="clalancette@osrfoundation.org">Chris Lalancette</maintainer>
|
||||
<maintainer email="sloretz@osrfoundation.org">Shane Loretz</maintainer>
|
||||
|
||||
<license>BSD</license>
|
||||
|
||||
<url type="website">http://ros.org/wiki/kdl_parser_py</url>
|
||||
<url type="repository">https://github.com/ros/kdl_parser</url>
|
||||
<url type="bugtracker">https://github.com/ros/kdl_parser/issues</url>
|
||||
|
||||
<buildtool_depend version_gte="0.5.68">catkin</buildtool_depend>
|
||||
<buildtool_depend condition="$ROS_PYTHON_VERSION == 2">python-setuptools</buildtool_depend>
|
||||
<buildtool_depend condition="$ROS_PYTHON_VERSION == 3">python3-setuptools</buildtool_depend>
|
||||
<buildtool_depend condition="$ROS_PYTHON_VERSION == 2">python-catkin-pkg</buildtool_depend>
|
||||
<buildtool_depend condition="$ROS_PYTHON_VERSION == 3">python3-catkin-pkg</buildtool_depend>
|
||||
|
||||
<build_export_depend>urdfdom_py</build_export_depend>
|
||||
|
||||
<exec_depend>urdfdom_py</exec_depend>
|
||||
<exec_depend>python3-pykdl</exec_depend>
|
||||
|
||||
<test_depend>rostest</test_depend>
|
||||
|
||||
</package>
|
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from setuptools import setup
|
||||
from catkin_pkg.python_setup import generate_distutils_setup
|
||||
|
||||
d = generate_distutils_setup(
|
||||
packages=['kdl_parser_py']
|
||||
)
|
||||
|
||||
setup(**d)
|
|
@ -1,237 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- original: https://github.com/ros/urdf_tutorial/
|
||||
TODO(jacquelinekay): currently released version of urdf_parser_py doesn't
|
||||
allow joints without limits specified. once fixed, revert limitless joints
|
||||
TODO(jacquelinekay): currently released version of urdf_parser_py doesn't
|
||||
allow materials without color specified/aggregate materials. once fixed,
|
||||
revert materials
|
||||
-->
|
||||
<robot name="physics">
|
||||
<link name="base_link">
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length="0.6" radius="0.2"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
|
||||
<joint name="base_to_right_leg" type="fixed">
|
||||
<parent link="base_link"/>
|
||||
<child link="right_base"/>
|
||||
<origin xyz="0.22 0 .25"/>
|
||||
</joint>
|
||||
|
||||
<!-- link 1 -->
|
||||
<link name="right_base">
|
||||
<collision>
|
||||
<geometry>
|
||||
<box size=".1 0.4 .1"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="10"/>
|
||||
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<!-- link 2 -->
|
||||
<link name="right_front_wheel">
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius="0.035"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="1"/>
|
||||
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<!-- joint 1 -->
|
||||
<joint name="right_front_wheel_joint" type="continuous">
|
||||
<axis xyz="0 0 1"/>
|
||||
<parent link="right_base"/>
|
||||
<child link="right_front_wheel"/>
|
||||
<origin rpy="0 1.57075 0" xyz="0 0.133333333333 -0.085"/>
|
||||
<limit effort="100.0" lower="0" upper="0" velocity="0.5"/>
|
||||
</joint>
|
||||
|
||||
<!-- link 3 -->
|
||||
<link name="right_back_wheel">
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius="0.035"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="1"/>
|
||||
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<!-- joint 2 -->
|
||||
<joint name="right_back_wheel_joint" type="continuous">
|
||||
<axis xyz="0 0 1"/>
|
||||
<parent link="right_base"/>
|
||||
<child link="right_back_wheel"/>
|
||||
<origin rpy="0 1.57075 0" xyz="0 -0.133333333333 -0.085"/>
|
||||
<limit effort="100.0" lower="0" upper="0" velocity="0.5"/>
|
||||
</joint>
|
||||
|
||||
<joint name="base_to_left_leg" type="fixed">
|
||||
<parent link="base_link"/>
|
||||
<child link="left_base"/>
|
||||
<origin xyz="-0.22 0 .25"/>
|
||||
</joint>
|
||||
|
||||
<!-- link 4 -->
|
||||
<link name="left_base">
|
||||
<collision>
|
||||
<geometry>
|
||||
<box size=".1 0.4 .1"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="10"/>
|
||||
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<!-- link 5 -->
|
||||
<link name="left_front_wheel">
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius="0.035"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="1"/>
|
||||
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<!-- joint 3 -->
|
||||
<joint name="left_front_wheel_joint" type="continuous">
|
||||
<axis xyz="0 0 1"/>
|
||||
<parent link="left_base"/>
|
||||
<child link="left_front_wheel"/>
|
||||
<origin rpy="0 1.57075 0" xyz="0 0.133333333333 -0.085"/>
|
||||
<limit effort="100.0" lower="0" upper="0" velocity="0.5"/>
|
||||
</joint>
|
||||
|
||||
<!-- link 6 -->
|
||||
<link name="left_back_wheel">
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length=".1" radius="0.035"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="1"/>
|
||||
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<!-- joint 4 -->
|
||||
<joint name="left_back_wheel_joint" type="continuous">
|
||||
<axis xyz="0 0 1"/>
|
||||
<parent link="left_base"/>
|
||||
<child link="left_back_wheel"/>
|
||||
<origin rpy="0 1.57075 0" xyz="0 -0.133333333333 -0.085"/>
|
||||
<limit effort="100.0" lower="0" upper="0" velocity="0.5"/>
|
||||
</joint>
|
||||
|
||||
<!-- joint 5 -->
|
||||
<joint name="gripper_extension" type="prismatic">
|
||||
<!-- TODO(jacquelinekay): axis default not used in urdf_parser_py, needed for prismatic links -->
|
||||
<axis xyz="1 0 0" />
|
||||
<parent link="base_link"/>
|
||||
<child link="gripper_pole"/>
|
||||
<limit effort="1000.0" lower="-0.38" upper="0" velocity="0.5"/>
|
||||
<origin rpy="0 0 1.57075" xyz="0 0.19 .2"/>
|
||||
</joint>
|
||||
|
||||
<!-- link 7 -->
|
||||
<link name="gripper_pole">
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length="0.2" radius=".01"/>
|
||||
</geometry>
|
||||
<origin rpy="0 1.57075 0 " xyz="0.1 0 0"/>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="0.05"/>
|
||||
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<!-- joint 6 -->
|
||||
<joint name="left_gripper_joint" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit effort="1000.0" lower="0.0" upper="0.548" velocity="0.5"/>
|
||||
<origin xyz="0.2 0.01 0"/>
|
||||
<parent link="gripper_pole"/>
|
||||
<child link="left_gripper"/>
|
||||
</joint>
|
||||
|
||||
<!-- link 8 -->
|
||||
<link name="left_gripper">
|
||||
<collision>
|
||||
<geometry>
|
||||
<mesh filename="package://pr2_description/meshes/gripper_v0/l_finger.dae"/>
|
||||
</geometry>
|
||||
<origin rpy="0.0 0 0"/>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="0.05"/>
|
||||
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<!-- joint 7 -->
|
||||
<joint name="right_gripper_joint" type="revolute">
|
||||
<axis xyz="0 0 -1"/>
|
||||
<limit effort="1000.0" lower="0.0" upper="0.548" velocity="0.5"/>
|
||||
<origin rpy="0 0 0" xyz="0.2 -0.01 0"/>
|
||||
<parent link="gripper_pole"/>
|
||||
<child link="right_gripper"/>
|
||||
</joint>
|
||||
|
||||
<!-- link 9 -->
|
||||
<link name="right_gripper">
|
||||
<collision>
|
||||
<geometry>
|
||||
<mesh filename="package://pr2_description/meshes/gripper_v0/l_finger.dae"/>
|
||||
</geometry>
|
||||
<origin rpy="-3.1415 0 0" xyz="0 0 0"/>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="0.05"/>
|
||||
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||
<origin xyz="1 2 3" />
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<!-- link 10 -->
|
||||
<link name="head">
|
||||
<collision>
|
||||
<geometry>
|
||||
<sphere radius="0.2"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="10"/>
|
||||
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||
<origin rpy="3 2 1" />
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<!-- joint 8 -->
|
||||
<joint name="head_swivel" type="continuous">
|
||||
<parent link="base_link"/>
|
||||
<child link="head"/>
|
||||
<axis xyz="0 0 1"/>
|
||||
<origin xyz="0 0 0.3"/>
|
||||
</joint>
|
||||
|
||||
</robot>
|
|
@ -1,3 +0,0 @@
|
|||
<launch>
|
||||
<test test-name="test_kdl_parser" pkg="kdl_parser_py" type="test_kdl_parser.py" args="$(find kdl_parser_py)/test/test.urdf"/>
|
||||
</launch>
|
|
@ -1,38 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
|
||||
import kdl_parser_py.urdf
|
||||
import unittest
|
||||
|
||||
import rostest
|
||||
|
||||
PKG = "kdl_parser_py"
|
||||
NAME = "test_kdl_parser"
|
||||
|
||||
class TestKdlParser(unittest.TestCase):
|
||||
def runTest(self):
|
||||
filename = None
|
||||
if (len(sys.argv) > 1):
|
||||
filename = sys.argv[1]
|
||||
else:
|
||||
self.fail("Expected filename!")
|
||||
(ok, tree) = kdl_parser_py.urdf.treeFromFile(filename)
|
||||
self.assertTrue(ok)
|
||||
# KDL doesn't count fixed joints (since they aren't kinematic)
|
||||
self.assertEqual(tree.getNrOfJoints(), 8)
|
||||
# KDL doesn't count base link (since it's attached by fixed links
|
||||
self.assertEqual(tree.getNrOfSegments(), 10)
|
||||
chain = tree.getChain("base_link", "right_gripper")
|
||||
self.assertEqual(chain.getNrOfSegments(), 2)
|
||||
self.assertEqual(chain.getNrOfJoints(), 2)
|
||||
self.assertEqual(chain.getSegment(0).getName(), "gripper_pole")
|
||||
self.assertEqual(chain.getSegment(0).getJoint().getName(), "gripper_extension")
|
||||
self.assertEqual(chain.getSegment(1).getName(), "right_gripper")
|
||||
self.assertEqual(chain.getSegment(1).getJoint().getName(), "right_gripper_joint")
|
||||
|
||||
inertia = chain.getSegment(1).getInertia()
|
||||
self.assertAlmostEqual(inertia.getCOG().z(), 3.0)
|
||||
|
||||
if __name__ == '__main__':
|
||||
rostest.run(PKG, NAME, TestKdlParser, sys.argv)
|
Loading…
Reference in New Issue