Deleted code that was not moved to this repo
This commit is contained in:
parent
135cb2f416
commit
0e0054b54a
|
@ -1,32 +0,0 @@
|
|||
= 1.10.10 =
|
||||
* [[urdf_parser]]
|
||||
* Package was removed
|
||||
* [[urdf_parser_plugin]]
|
||||
* New package containing base class for URDF parsers
|
||||
* [[urdf]]
|
||||
* Package now only depends on the plain URDF parser (no longer on [[collada_parser]])
|
||||
* Plugins are used to load other formats into URDF.
|
||||
* [[collada_parser]]
|
||||
* Interface as plugin for loading URDFs was added
|
||||
|
||||
= 1.10.0 =
|
||||
* Banch from 1.9.32
|
||||
* Build system updates
|
||||
|
||||
= 1.9.0 =
|
||||
* Branch from 1.8.0
|
||||
|
||||
* [[collada_parser]]
|
||||
* Read dynamics info from collada <<Ticket(ros-pkg 5429)>>
|
||||
* collada parser fixes with inertial frames and parent_to_joint_origin_transform
|
||||
* [[urdf_interface]]
|
||||
* This package is now deprecated
|
||||
* The stub that is in place points to header files installed from the urdfdom_headers library (available as deb)
|
||||
* [[urdf_parser]]
|
||||
* This package is now deprecated
|
||||
* The stub that is in place points to header files and the libs installed from the urdfdom library (available as deb)
|
||||
* [[srdf]]
|
||||
* This package is now deprecated
|
||||
* The stub that is in place points to header files and the libs installed from the srdfdom library (available as deb)
|
||||
* [[urdf]]
|
||||
* Use the rosconsole_bridge library (available as deb) to forward output from urdfdom to ROS console (effectively making things behave as they did before in terms of logging, but without having urdfdom depend on rosconsole, but on console_bridge, a much lighter dependency)
|
|
@ -1,104 +0,0 @@
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Changelog for package joint_state_publisher
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
1.12.9 (2017-04-26)
|
||||
-------------------
|
||||
|
||||
1.12.8 (2017-03-27)
|
||||
-------------------
|
||||
* [joint_state_publisher] Handle time moving backwards
|
||||
Without this patch, joint_state_publisher dies whenever the ROS time moves backwards (e.g., when running `rosbag play --clock --loop`).
|
||||
* Switch a couple more packages over to Chris and Shane.
|
||||
* Fix rostest dependency.
|
||||
* Add recursive mimic joint (`#177 <https://github.com/ros/robot_model/issues/177>`_)
|
||||
* Add recursive mimic joint
|
||||
* Contributors: Alessandro Tondo, Chris Lalancette, Martin Günther, Mike Purvis
|
||||
|
||||
1.12.7 (2017-01-26)
|
||||
-------------------
|
||||
* Fixed a crash which happened when there were ``0`` free joints, opens empty window (`#178 <https://github.com/ros/robot_model/issues/178>`_)
|
||||
* Contributors: Bence Magyar
|
||||
|
||||
1.12.6 (2017-01-04)
|
||||
-------------------
|
||||
* Migrated slots in joint state publisher gui to Qt5 (`#147 <https://github.com/ros/robot_model/issues/147>`_)
|
||||
* Now uses GridLayout to support large numbers of joints and small screens (`#150 <https://github.com/ros/robot_model/issues/150>`_)
|
||||
* Contributors: Bence Magyar, Michał Barciś
|
||||
|
||||
1.12.5 (2016-10-27)
|
||||
-------------------
|
||||
* Fix initial position of sliders in joint_state_publisher GUI (`#148 <https://github.com/ros/robot_model/issues/148>`_)
|
||||
Caused by a regression in 8c6cf9841cb, the slider positions are not initialized correctly
|
||||
from the provided zero positions at startup.
|
||||
This commit fixes the issue, by adding the call to center() again that got lost.
|
||||
* Contributors: Timm Linder
|
||||
|
||||
1.12.4 (2016-08-23)
|
||||
-------------------
|
||||
|
||||
1.12.3 (2016-06-10)
|
||||
-------------------
|
||||
* Fix circular logic in joint state publisher events (`#140 <https://github.com/ros/robot_model/issues/140>`_)
|
||||
* Use signal and sys.exit to fix shutdown in joint_state_publisher (`#139 <https://github.com/ros/robot_model/issues/139>`_)
|
||||
* joint_state_publisher: Change slider update method (`#135 <https://github.com/ros/robot_model/issues/135>`_)
|
||||
* Contributors: Jackie Kay, vincentrou
|
||||
|
||||
1.12.2 (2016-04-12)
|
||||
-------------------
|
||||
* Migrate qt (`#128 <https://github.com/ros/robot_model/issues/128>`_)
|
||||
* Migrate JointStatePublisher from wxPython to qt5
|
||||
* Contributors: Jackie Kay
|
||||
|
||||
1.12.1 (2016-04-10)
|
||||
-------------------
|
||||
|
||||
1.11.8 (2015-09-11)
|
||||
-------------------
|
||||
|
||||
1.11.7 (2015-04-22)
|
||||
-------------------
|
||||
* Added a randomize button for the joints.
|
||||
* Contributors: Aaron Blasdel
|
||||
|
||||
1.11.6 (2014-11-30)
|
||||
-------------------
|
||||
* Added floating joints to joint types ignored by publisher
|
||||
* warn when joints have no limits
|
||||
* add queue_size for publisher
|
||||
* Contributors: Jihoon Lee, Michael Ferguson, Shaun Edwards
|
||||
|
||||
1.11.5 (2014-07-24)
|
||||
-------------------
|
||||
|
||||
1.11.4 (2014-07-07)
|
||||
-------------------
|
||||
* Update package.xml
|
||||
Updating author and maintainer email for consistency
|
||||
* Contributors: David Lu!!
|
||||
|
||||
1.11.3 (2014-06-24)
|
||||
-------------------
|
||||
|
||||
1.11.2 (2014-03-22)
|
||||
-------------------
|
||||
|
||||
1.11.1 (2014-03-20)
|
||||
-------------------
|
||||
|
||||
1.11.0 (2014-02-21)
|
||||
-------------------
|
||||
* Use #!/usr/bin/env python for systems with multiple Python versions.
|
||||
* Contributors: Benjamin Chretien
|
||||
|
||||
1.10.18 (2013-12-04)
|
||||
--------------------
|
||||
|
||||
1.10.16 (2013-11-18)
|
||||
--------------------
|
||||
|
||||
1.10.15 (2013-08-17)
|
||||
--------------------
|
||||
|
||||
* joint_state_publisher: do not install script to global bin
|
||||
Also clean up no longer required setup.py
|
|
@ -1,15 +0,0 @@
|
|||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(joint_state_publisher)
|
||||
|
||||
find_package(catkin REQUIRED)
|
||||
|
||||
catkin_package()
|
||||
|
||||
install(PROGRAMS joint_state_publisher/joint_state_publisher DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
|
||||
|
||||
|
||||
if(CATKIN_ENABLE_TESTING)
|
||||
find_package(rostest)
|
||||
add_rostest(test/test_mimic_chain.launch)
|
||||
add_rostest(test/test_mimic_cycle.launch)
|
||||
endif()
|
|
@ -1,440 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import rospy
|
||||
import random
|
||||
|
||||
from python_qt_binding.QtCore import pyqtSlot
|
||||
from python_qt_binding.QtCore import Qt
|
||||
from python_qt_binding.QtCore import Signal
|
||||
from python_qt_binding.QtGui import QFont
|
||||
from python_qt_binding.QtWidgets import QApplication
|
||||
from python_qt_binding.QtWidgets import QHBoxLayout
|
||||
from python_qt_binding.QtWidgets import QLabel
|
||||
from python_qt_binding.QtWidgets import QLineEdit
|
||||
from python_qt_binding.QtWidgets import QPushButton
|
||||
from python_qt_binding.QtWidgets import QSlider
|
||||
from python_qt_binding.QtWidgets import QVBoxLayout
|
||||
from python_qt_binding.QtWidgets import QGridLayout
|
||||
from python_qt_binding.QtWidgets import QSpinBox
|
||||
from python_qt_binding.QtWidgets import QWidget
|
||||
|
||||
import xml.dom.minidom
|
||||
from sensor_msgs.msg import JointState
|
||||
from math import pi
|
||||
from threading import Thread
|
||||
import sys
|
||||
import signal
|
||||
import math
|
||||
|
||||
RANGE = 10000
|
||||
|
||||
|
||||
def get_param(name, value=None):
|
||||
private = "~%s" % name
|
||||
if rospy.has_param(private):
|
||||
return rospy.get_param(private)
|
||||
elif rospy.has_param(name):
|
||||
return rospy.get_param(name)
|
||||
else:
|
||||
return value
|
||||
|
||||
|
||||
class JointStatePublisher():
|
||||
def __init__(self):
|
||||
description = get_param('robot_description')
|
||||
robot = xml.dom.minidom.parseString(description).getElementsByTagName('robot')[0]
|
||||
self.free_joints = {}
|
||||
self.joint_list = [] # for maintaining the original order of the joints
|
||||
self.dependent_joints = get_param("dependent_joints", {})
|
||||
use_mimic = get_param('use_mimic_tags', True)
|
||||
use_small = get_param('use_smallest_joint_limits', True)
|
||||
|
||||
self.zeros = get_param("zeros")
|
||||
|
||||
pub_def_positions = get_param("publish_default_positions", True)
|
||||
pub_def_vels = get_param("publish_default_velocities", False)
|
||||
pub_def_efforts = get_param("publish_default_efforts", False)
|
||||
|
||||
# Find all non-fixed joints
|
||||
for child in robot.childNodes:
|
||||
if child.nodeType is child.TEXT_NODE:
|
||||
continue
|
||||
if child.localName == 'joint':
|
||||
jtype = child.getAttribute('type')
|
||||
if jtype == 'fixed' or jtype == 'floating':
|
||||
continue
|
||||
name = child.getAttribute('name')
|
||||
self.joint_list.append(name)
|
||||
if jtype == 'continuous':
|
||||
minval = -pi
|
||||
maxval = pi
|
||||
else:
|
||||
try:
|
||||
limit = child.getElementsByTagName('limit')[0]
|
||||
minval = float(limit.getAttribute('lower'))
|
||||
maxval = float(limit.getAttribute('upper'))
|
||||
except:
|
||||
rospy.logwarn("%s is not fixed, nor continuous, but limits are not specified!" % name)
|
||||
continue
|
||||
|
||||
safety_tags = child.getElementsByTagName('safety_controller')
|
||||
if use_small and len(safety_tags) == 1:
|
||||
tag = safety_tags[0]
|
||||
if tag.hasAttribute('soft_lower_limit'):
|
||||
minval = max(minval, float(tag.getAttribute('soft_lower_limit')))
|
||||
if tag.hasAttribute('soft_upper_limit'):
|
||||
maxval = min(maxval, float(tag.getAttribute('soft_upper_limit')))
|
||||
|
||||
mimic_tags = child.getElementsByTagName('mimic')
|
||||
if use_mimic and len(mimic_tags) == 1:
|
||||
tag = mimic_tags[0]
|
||||
entry = {'parent': tag.getAttribute('joint')}
|
||||
if tag.hasAttribute('multiplier'):
|
||||
entry['factor'] = float(tag.getAttribute('multiplier'))
|
||||
if tag.hasAttribute('offset'):
|
||||
entry['offset'] = float(tag.getAttribute('offset'))
|
||||
|
||||
self.dependent_joints[name] = entry
|
||||
continue
|
||||
|
||||
if name in self.dependent_joints:
|
||||
continue
|
||||
|
||||
if self.zeros and name in self.zeros:
|
||||
zeroval = self.zeros[name]
|
||||
elif minval > 0 or maxval < 0:
|
||||
zeroval = (maxval + minval)/2
|
||||
else:
|
||||
zeroval = 0
|
||||
|
||||
joint = {'min': minval, 'max': maxval, 'zero': zeroval}
|
||||
if pub_def_positions:
|
||||
joint['position'] = zeroval
|
||||
if pub_def_vels:
|
||||
joint['velocity'] = 0.0
|
||||
if pub_def_efforts:
|
||||
joint['effort'] = 0.0
|
||||
|
||||
if jtype == 'continuous':
|
||||
joint['continuous'] = True
|
||||
self.free_joints[name] = joint
|
||||
|
||||
use_gui = get_param("use_gui", False)
|
||||
|
||||
if use_gui:
|
||||
num_rows = get_param("num_rows", 0)
|
||||
self.app = QApplication(sys.argv)
|
||||
self.gui = JointStatePublisherGui("Joint State Publisher", self, num_rows)
|
||||
self.gui.show()
|
||||
else:
|
||||
self.gui = None
|
||||
|
||||
source_list = get_param("source_list", [])
|
||||
self.sources = []
|
||||
for source in source_list:
|
||||
self.sources.append(rospy.Subscriber(source, JointState, self.source_cb))
|
||||
|
||||
self.pub = rospy.Publisher('joint_states', JointState, queue_size=5)
|
||||
|
||||
def source_cb(self, msg):
|
||||
for i in range(len(msg.name)):
|
||||
name = msg.name[i]
|
||||
if name not in self.free_joints:
|
||||
continue
|
||||
|
||||
if msg.position:
|
||||
position = msg.position[i]
|
||||
else:
|
||||
position = None
|
||||
if msg.velocity:
|
||||
velocity = msg.velocity[i]
|
||||
else:
|
||||
velocity = None
|
||||
if msg.effort:
|
||||
effort = msg.effort[i]
|
||||
else:
|
||||
effort = None
|
||||
|
||||
joint = self.free_joints[name]
|
||||
if position is not None:
|
||||
joint['position'] = position
|
||||
if velocity is not None:
|
||||
joint['velocity'] = velocity
|
||||
if effort is not None:
|
||||
joint['effort'] = effort
|
||||
|
||||
if self.gui is not None:
|
||||
# signal instead of directly calling the update_sliders method, to switch to the QThread
|
||||
self.gui.sliderUpdateTrigger.emit()
|
||||
|
||||
def loop(self):
|
||||
hz = get_param("rate", 10) # 10hz
|
||||
r = rospy.Rate(hz)
|
||||
|
||||
delta = get_param("delta", 0.0)
|
||||
|
||||
# Publish Joint States
|
||||
while not rospy.is_shutdown():
|
||||
msg = JointState()
|
||||
msg.header.stamp = rospy.Time.now()
|
||||
|
||||
if delta > 0:
|
||||
self.update(delta)
|
||||
|
||||
# Initialize msg.position, msg.velocity, and msg.effort.
|
||||
has_position = len(self.dependent_joints.items()) > 0
|
||||
has_velocity = False
|
||||
has_effort = False
|
||||
for name, joint in self.free_joints.items():
|
||||
if not has_position and 'position' in joint:
|
||||
has_position = True
|
||||
if not has_velocity and 'velocity' in joint:
|
||||
has_velocity = True
|
||||
if not has_effort and 'effort' in joint:
|
||||
has_effort = True
|
||||
num_joints = (len(self.free_joints.items()) +
|
||||
len(self.dependent_joints.items()))
|
||||
if has_position:
|
||||
msg.position = num_joints * [0.0]
|
||||
if has_velocity:
|
||||
msg.velocity = num_joints * [0.0]
|
||||
if has_effort:
|
||||
msg.effort = num_joints * [0.0]
|
||||
|
||||
for i, name in enumerate(self.joint_list):
|
||||
msg.name.append(str(name))
|
||||
joint = None
|
||||
|
||||
# Add Free Joint
|
||||
if name in self.free_joints:
|
||||
joint = self.free_joints[name]
|
||||
factor = 1
|
||||
offset = 0
|
||||
# Add Dependent Joint
|
||||
elif name in self.dependent_joints:
|
||||
param = self.dependent_joints[name]
|
||||
parent = param['parent']
|
||||
factor = param.get('factor', 1)
|
||||
offset = param.get('offset', 0)
|
||||
# Handle recursive mimic chain
|
||||
recursive_mimic_chain_joints = [name]
|
||||
while parent in self.dependent_joints:
|
||||
if parent in recursive_mimic_chain_joints:
|
||||
error_message = "Found an infinite recursive mimic chain"
|
||||
rospy.logerr("%s: [%s, %s]", error_message, ', '.join(recursive_mimic_chain_joints), parent)
|
||||
sys.exit(-1)
|
||||
recursive_mimic_chain_joints.append(parent)
|
||||
param = self.dependent_joints[parent]
|
||||
parent = param['parent']
|
||||
offset += factor * param.get('offset', 0)
|
||||
factor *= param.get('factor', 1)
|
||||
joint = self.free_joints[parent]
|
||||
|
||||
if has_position and 'position' in joint:
|
||||
msg.position[i] = joint['position'] * factor + offset
|
||||
if has_velocity and 'velocity' in joint:
|
||||
msg.velocity[i] = joint['velocity'] * factor
|
||||
if has_effort and 'effort' in joint:
|
||||
msg.effort[i] = joint['effort']
|
||||
|
||||
self.pub.publish(msg)
|
||||
try:
|
||||
r.sleep()
|
||||
except rospy.exceptions.ROSTimeMovedBackwardsException:
|
||||
pass
|
||||
|
||||
def update(self, delta):
|
||||
for name, joint in self.free_joints.iteritems():
|
||||
forward = joint.get('forward', True)
|
||||
if forward:
|
||||
joint['position'] += delta
|
||||
if joint['position'] > joint['max']:
|
||||
if joint.get('continuous', False):
|
||||
joint['position'] = joint['min']
|
||||
else:
|
||||
joint['position'] = joint['max']
|
||||
joint['forward'] = not forward
|
||||
else:
|
||||
joint['position'] -= delta
|
||||
if joint['position'] < joint['min']:
|
||||
joint['position'] = joint['min']
|
||||
joint['forward'] = not forward
|
||||
|
||||
|
||||
class JointStatePublisherGui(QWidget):
|
||||
sliderUpdateTrigger = Signal()
|
||||
|
||||
def __init__(self, title, jsp, num_rows=0):
|
||||
super(JointStatePublisherGui, self).__init__()
|
||||
self.jsp = jsp
|
||||
self.joint_map = {}
|
||||
self.vlayout = QVBoxLayout(self)
|
||||
self.gridlayout = QGridLayout()
|
||||
font = QFont("Helvetica", 9, QFont.Bold)
|
||||
|
||||
### Generate sliders ###
|
||||
sliders = []
|
||||
for name in self.jsp.joint_list:
|
||||
if name not in self.jsp.free_joints:
|
||||
continue
|
||||
joint = self.jsp.free_joints[name]
|
||||
|
||||
if joint['min'] == joint['max']:
|
||||
continue
|
||||
|
||||
joint_layout = QVBoxLayout()
|
||||
row_layout = QHBoxLayout()
|
||||
|
||||
label = QLabel(name)
|
||||
label.setFont(font)
|
||||
row_layout.addWidget(label)
|
||||
display = QLineEdit("0.00")
|
||||
display.setAlignment(Qt.AlignRight)
|
||||
display.setFont(font)
|
||||
display.setReadOnly(True)
|
||||
row_layout.addWidget(display)
|
||||
|
||||
joint_layout.addLayout(row_layout)
|
||||
|
||||
slider = QSlider(Qt.Horizontal)
|
||||
|
||||
slider.setFont(font)
|
||||
slider.setRange(0, RANGE)
|
||||
slider.setValue(RANGE/2)
|
||||
|
||||
joint_layout.addWidget(slider)
|
||||
|
||||
self.joint_map[name] = {'slidervalue': 0, 'display': display,
|
||||
'slider': slider, 'joint': joint}
|
||||
# Connect to the signal provided by QSignal
|
||||
slider.valueChanged.connect(self.onValueChanged)
|
||||
sliders.append(joint_layout)
|
||||
|
||||
# Determine number of rows to be used in grid
|
||||
self.num_rows = num_rows
|
||||
# if desired num of rows wasn't set, default behaviour is a vertical layout
|
||||
if self.num_rows == 0:
|
||||
self.num_rows = len(sliders) # equals VBoxLayout
|
||||
# Generate positions in grid and place sliders there
|
||||
self.positions = self.generate_grid_positions(len(sliders), self.num_rows)
|
||||
for item, pos in zip(sliders, self.positions):
|
||||
self.gridlayout.addLayout(item, *pos)
|
||||
|
||||
# Set zero positions read from parameters
|
||||
self.center()
|
||||
|
||||
# Synchronize slider and displayed value
|
||||
self.sliderUpdate(None)
|
||||
|
||||
# Set up a signal for updating the sliders based on external joint info
|
||||
self.sliderUpdateTrigger.connect(self.updateSliders)
|
||||
|
||||
self.vlayout.addLayout(self.gridlayout)
|
||||
|
||||
# Buttons for randomizing and centering sliders and
|
||||
# Spinbox for on-the-fly selecting number of rows
|
||||
self.randbutton = QPushButton('Randomize', self)
|
||||
self.randbutton.clicked.connect(self.randomize_event)
|
||||
self.vlayout.addWidget(self.randbutton)
|
||||
self.ctrbutton = QPushButton('Center', self)
|
||||
self.ctrbutton.clicked.connect(self.center_event)
|
||||
self.vlayout.addWidget(self.ctrbutton)
|
||||
self.maxrowsupdown = QSpinBox()
|
||||
self.maxrowsupdown.setMinimum(1)
|
||||
self.maxrowsupdown.setMaximum(len(sliders))
|
||||
self.maxrowsupdown.setValue(self.num_rows)
|
||||
self.maxrowsupdown.lineEdit().setReadOnly(True) # don't edit it by hand to avoid weird resizing of window
|
||||
self.maxrowsupdown.valueChanged.connect(self.reorggrid_event)
|
||||
self.vlayout.addWidget(self.maxrowsupdown)
|
||||
|
||||
@pyqtSlot(int)
|
||||
def onValueChanged(self, event):
|
||||
# A slider value was changed, but we need to change the joint_info metadata.
|
||||
for name, joint_info in self.joint_map.items():
|
||||
joint_info['slidervalue'] = joint_info['slider'].value()
|
||||
joint = joint_info['joint']
|
||||
joint['position'] = self.sliderToValue(joint_info['slidervalue'], joint)
|
||||
joint_info['display'].setText("%.2f" % joint['position'])
|
||||
|
||||
@pyqtSlot()
|
||||
def updateSliders(self):
|
||||
self.update_sliders()
|
||||
|
||||
def update_sliders(self):
|
||||
for name, joint_info in self.joint_map.items():
|
||||
joint = joint_info['joint']
|
||||
joint_info['slidervalue'] = self.valueToSlider(joint['position'],
|
||||
joint)
|
||||
joint_info['slider'].setValue(joint_info['slidervalue'])
|
||||
|
||||
def center_event(self, event):
|
||||
self.center()
|
||||
|
||||
def center(self):
|
||||
rospy.loginfo("Centering")
|
||||
for name, joint_info in self.joint_map.items():
|
||||
joint = joint_info['joint']
|
||||
joint_info['slider'].setValue(self.valueToSlider(joint['zero'], joint))
|
||||
|
||||
def reorggrid_event(self, event):
|
||||
self.reorganize_grid(event)
|
||||
|
||||
def reorganize_grid(self, number_of_rows):
|
||||
self.num_rows = number_of_rows
|
||||
|
||||
# Remove items from layout (won't destroy them!)
|
||||
items = []
|
||||
for pos in self.positions:
|
||||
item = self.gridlayout.itemAtPosition(*pos)
|
||||
items.append(item)
|
||||
self.gridlayout.removeItem(item)
|
||||
|
||||
# Generate new positions for sliders and place them in their new spots
|
||||
self.positions = self.generate_grid_positions(len(items), self.num_rows)
|
||||
for item, pos in zip(items, self.positions):
|
||||
self.gridlayout.addLayout(item, *pos)
|
||||
|
||||
def generate_grid_positions(self, num_items, num_rows):
|
||||
if num_rows==0:
|
||||
return []
|
||||
positions = [(y, x) for x in range(int((math.ceil(float(num_items) / num_rows)))) for y in range(num_rows)]
|
||||
positions = positions[:num_items]
|
||||
return positions
|
||||
|
||||
def randomize_event(self, event):
|
||||
self.randomize()
|
||||
|
||||
def randomize(self):
|
||||
rospy.loginfo("Randomizing")
|
||||
for name, joint_info in self.joint_map.items():
|
||||
joint = joint_info['joint']
|
||||
joint_info['slider'].setValue(
|
||||
self.valueToSlider(random.uniform(joint['min'], joint['max']), joint))
|
||||
|
||||
def sliderUpdate(self, event):
|
||||
for name, joint_info in self.joint_map.items():
|
||||
joint_info['slidervalue'] = joint_info['slider'].value()
|
||||
self.update_sliders()
|
||||
|
||||
def valueToSlider(self, value, joint):
|
||||
return (value - joint['min']) * float(RANGE) / (joint['max'] - joint['min'])
|
||||
|
||||
def sliderToValue(self, slider, joint):
|
||||
pctvalue = slider / float(RANGE)
|
||||
return joint['min'] + (joint['max']-joint['min']) * pctvalue
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
rospy.init_node('joint_state_publisher')
|
||||
jsp = JointStatePublisher()
|
||||
|
||||
if jsp.gui is None:
|
||||
jsp.loop()
|
||||
else:
|
||||
Thread(target=jsp.loop).start()
|
||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||
sys.exit(jsp.app.exec_())
|
||||
|
||||
except rospy.ROSInterruptException:
|
||||
pass
|
|
@ -1,22 +0,0 @@
|
|||
<package format="2">
|
||||
<name>joint_state_publisher</name>
|
||||
<version>1.12.9</version>
|
||||
<description>
|
||||
This package contains a tool for setting and publishing joint state values for a given URDF.
|
||||
</description>
|
||||
<author email="davidvlu@gmail.com">David V. Lu!!</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://www.ros.org/wiki/joint_state_publisher</url>
|
||||
|
||||
<buildtool_depend>catkin</buildtool_depend>
|
||||
|
||||
<exec_depend>rospy</exec_depend>
|
||||
<exec_depend>python_qt_binding</exec_depend>
|
||||
<exec_depend>sensor_msgs</exec_depend>
|
||||
|
||||
<test_depend>rostest</test_depend>
|
||||
</package>
|
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
|
@ -1,27 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<urdf>
|
||||
<robot name="mimic_chain_robot">
|
||||
<link name="link1"/>
|
||||
<link name="link2"/>
|
||||
<link name="link3"/>
|
||||
<link name="link4"/>
|
||||
|
||||
<joint name="j12" type="revolute">
|
||||
<parent link="link1"/>
|
||||
<child link="link2"/>
|
||||
<limit effort="10" velocity="10" lower="-1" upper="1"/>
|
||||
</joint>
|
||||
<joint name="j23" type="revolute">
|
||||
<parent link="link2"/>
|
||||
<child link="link3"/>
|
||||
<mimic joint="j12"/>
|
||||
<limit effort="10" velocity="10" lower="-1" upper="1"/>
|
||||
</joint>
|
||||
<joint name="j34" type="revolute">
|
||||
<parent link="link3"/>
|
||||
<child link="link4"/>
|
||||
<mimic joint="j23"/>
|
||||
<limit effort="10" velocity="10" lower="-1" upper="1"/>
|
||||
</joint>
|
||||
</robot>
|
||||
</urdf>
|
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<urdf>
|
||||
<robot name="mimic_cycle_robot">
|
||||
<link name="link1"/>
|
||||
<link name="link2"/>
|
||||
<link name="link3"/>
|
||||
<link name="link4"/>
|
||||
|
||||
<joint name="j12" type="revolute">
|
||||
<parent link="link1"/>
|
||||
<child link="link2"/>
|
||||
<mimic joint="j34"/>
|
||||
<limit effort="10" velocity="10" lower="-1" upper="1"/>
|
||||
</joint>
|
||||
<joint name="j23" type="revolute">
|
||||
<parent link="link2"/>
|
||||
<child link="link3"/>
|
||||
<mimic joint="j12"/>
|
||||
<limit effort="10" velocity="10" lower="-1" upper="1"/>
|
||||
</joint>
|
||||
<joint name="j34" type="revolute">
|
||||
<parent link="link3"/>
|
||||
<child link="link4"/>
|
||||
<mimic joint="j23"/>
|
||||
<limit effort="10" velocity="10" lower="-1" upper="1"/>
|
||||
</joint>
|
||||
</robot>
|
||||
</urdf>
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<launch>
|
||||
<param name="robot_description" textfile="$(find joint_state_publisher)/test/mimic_chain.urdf"/>
|
||||
<node pkg="joint_state_publisher" type="joint_state_publisher" name="dut_joint_state_publisher">
|
||||
<param name="rate" value="10"/>
|
||||
</node>
|
||||
<test pkg="rostest" type="hztest" name="hztest" test-name="hztest_mimic_chain">
|
||||
<param name="topic" value="joint_states"/>
|
||||
<param name="hz" value="10"/>
|
||||
<param name="hzerror" value="0.1"/>
|
||||
<param name="test_duration" value="10"/>
|
||||
<param name="wait_time" value="10"/>
|
||||
</test>
|
||||
|
||||
</launch>
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<launch>
|
||||
<param name="robot_description" textfile="$(find joint_state_publisher)/test/mimic_cycle.urdf"/>
|
||||
<node pkg="joint_state_publisher" type="joint_state_publisher" name="dut_joint_state_publisher">
|
||||
<param name="rate" value="10"/>
|
||||
</node>
|
||||
<test pkg="rostest" type="hztest" name="hztest" test-name="hztest_mimic_cycle">
|
||||
<param name="topic" value="joint_states"/>
|
||||
<param name="hz" value="0"/>
|
||||
<param name="hzerror" value="0.1"/>
|
||||
<param name="test_duration" value="10"/>
|
||||
<param name="wait_time" value="10"/>
|
||||
</test>
|
||||
|
||||
</launch>
|
|
@ -1,74 +0,0 @@
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Changelog for package robot_model
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
1.12.9 (2017-04-26)
|
||||
-------------------
|
||||
* Adds deprecation message to robot_model package.xml (`#196 <https://github.com/ros/robot_model/issues/196>`_)
|
||||
* Contributors: Shane Loretz
|
||||
|
||||
1.12.8 (2017-03-27)
|
||||
-------------------
|
||||
* add Chris and Shane as maintainers (`#184 <https://github.com/ros/robot_model/issues/184>`_)
|
||||
* Contributors: William Woodall
|
||||
|
||||
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)
|
||||
-------------------
|
||||
|
||||
1.11.8 (2015-09-11)
|
||||
-------------------
|
||||
|
||||
1.11.7 (2015-04-22)
|
||||
-------------------
|
||||
|
||||
1.11.6 (2014-11-30)
|
||||
-------------------
|
||||
|
||||
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.18 (2013-12-04)
|
||||
--------------------
|
||||
* add DEPENDS for kdl_parser
|
||||
* Contributors: Ioan Sucan
|
||||
|
||||
1.10.16 (2013-11-18)
|
||||
--------------------
|
||||
|
||||
1.10.15 (2013-08-17)
|
||||
--------------------
|
||||
* remove unneeded deps (fix `#32 <https://github.com/ros/robot_model/issues/32>`_)
|
||||
* Created new diagram for documenting URDF
|
|
@ -1,4 +0,0 @@
|
|||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(robot_model)
|
||||
find_package(catkin REQUIRED)
|
||||
catkin_metapackage()
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 173 KiB |
|
@ -1,44 +0,0 @@
|
|||
<package>
|
||||
<name>robot_model</name>
|
||||
<version>1.12.9</version>
|
||||
<description>
|
||||
<tt>robot_model</tt> contains packages for modeling various
|
||||
aspects of robot information, specified in the Xml Robot
|
||||
Description Format (URDF). The core package of this stack
|
||||
is <a href="http://ros.org/wiki/urdf">urdf</a>, which parses URDF files, and constructs an
|
||||
object model (C++) of the robot.
|
||||
</description>
|
||||
|
||||
<author email="isucan@gmail.com">Ioan Sucan</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/robot_model</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>
|
||||
|
||||
<run_depend>liburdfdom-tools</run_depend>
|
||||
<run_depend>collada_parser</run_depend>
|
||||
<run_depend>collada_urdf</run_depend>
|
||||
<run_depend>kdl_parser</run_depend>
|
||||
<run_depend>resource_retriever</run_depend>
|
||||
<run_depend>urdf</run_depend>
|
||||
<run_depend>urdf_parser_plugin</run_depend>
|
||||
<run_depend>joint_state_publisher</run_depend>
|
||||
|
||||
<export>
|
||||
<deprecated>
|
||||
This metapackage will be removed in ROS M. Replace all dependencies on
|
||||
"robot_model" in your package.xml with dependencies on collada_parser,
|
||||
collada_urdf, joint_state_publisher, kdl_parser, resource-retriever, urdf,
|
||||
urdf_parser_plugin, and liburdfdom-tools instead.
|
||||
</deprecated>
|
||||
<metapackage/>
|
||||
</export>
|
||||
|
||||
</package>
|
|
@ -1,106 +0,0 @@
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Changelog for package urdf
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
1.12.9 (2017-04-26)
|
||||
-------------------
|
||||
|
||||
1.12.8 (2017-03-27)
|
||||
-------------------
|
||||
* Allow supplying NodeHandle for initParam (`#168 <https://github.com/ros/robot_model/issues/168>`_)
|
||||
* Allow supplying NodeHandle for initParam using new function.
|
||||
* fixed missing return statement in previous commit.
|
||||
* add Chris and Shane as maintainers (`#184 <https://github.com/ros/robot_model/issues/184>`_)
|
||||
* fix missed mandatory -std=c++11 flag (`#181 <https://github.com/ros/robot_model/issues/181>`_)
|
||||
collada_parser,kdl_parser,urdf: add c++11 flag,
|
||||
collada_parser: replace typeof with ansi __typeof\_\_
|
||||
builded/tested on gentoo
|
||||
Thanks den4ix for the contribution!
|
||||
* Contributors: Denis Romanchuk, Piyush Khandelwal, William Woodall
|
||||
|
||||
1.12.7 (2017-01-26)
|
||||
-------------------
|
||||
|
||||
1.12.6 (2017-01-04)
|
||||
-------------------
|
||||
* Addressed gcc6 build error in the urdf package, forward port of `#156 <https://github.com/ros/robot_model/issues/156>`_ (`#173 <https://github.com/ros/robot_model/issues/173>`_)
|
||||
* Now using ``urdf::*ShredPtr`` instead of ``boost::shared_ptr`` (`#144 <https://github.com/ros/robot_model/issues/144>`_)
|
||||
* Contributors: Jochen Sprickerhof, William Woodall
|
||||
|
||||
1.12.5 (2016-10-27)
|
||||
-------------------
|
||||
* Added urdf_compatibility.h header to define SharedPtr types (`#160 <https://github.com/ros/robot_model/issues/160>`_)
|
||||
This provides portability for downstream packages allowing them to use urdfdom 0.3 or 0.4.
|
||||
* urdf: Explicitly cast shared_ptr to bool in unit test. (`#158 <https://github.com/ros/robot_model/issues/158>`_)
|
||||
* Add smart ptr typedefs (`#153 <https://github.com/ros/robot_model/issues/153>`_)
|
||||
* Addressed gcc6 build error in urdf which was related to use of the isystem flag (`#157 <https://github.com/ros/robot_model/issues/157>`_)
|
||||
* Remove unneeded dependency on libpcrecpp (`#155 <https://github.com/ros/robot_model/issues/155>`_)
|
||||
* Contributors: Bence Magyar, Jochen Sprickerhof, Lukas Bulwahn, Maarten de Vries, Robert Haschke
|
||||
|
||||
1.12.4 (2016-08-23)
|
||||
-------------------
|
||||
|
||||
1.12.3 (2016-06-10)
|
||||
-------------------
|
||||
|
||||
1.12.2 (2016-04-12)
|
||||
-------------------
|
||||
|
||||
1.12.1 (2016-04-10)
|
||||
-------------------
|
||||
|
||||
1.11.8 (2015-09-11)
|
||||
-------------------
|
||||
* Removed pcre hack for newer released collada-dom.
|
||||
* Fixed link order of libpcrecpp.
|
||||
* Contributors: Kei Okada
|
||||
|
||||
1.11.7 (2015-04-22)
|
||||
-------------------
|
||||
* Removed the exporting of Boost and pcre as they are not used in the headers, and added TinyXML because it is.
|
||||
* Fixed a bug with pcrecpp on Ubuntu > 13.04.
|
||||
* Contributors: Kei Okada, William Woodall
|
||||
|
||||
1.11.6 (2014-11-30)
|
||||
-------------------
|
||||
* Add install for static libs needed for Android cross-compilation
|
||||
* Contributors: Gary Servin
|
||||
|
||||
1.11.5 (2014-07-24)
|
||||
-------------------
|
||||
|
||||
1.11.4 (2014-07-07)
|
||||
-------------------
|
||||
* moving to new dependency for urdfdom and urdfdom_headers. https://github.com/ros/rosdistro/issues/4633
|
||||
* Contributors: Tully Foote
|
||||
|
||||
1.11.3 (2014-06-24)
|
||||
-------------------
|
||||
* fix urdfdom_headers find_package re `ros/rosdistro#4633 <https://github.com/ros/rosdistro/issues/4633>`_
|
||||
* Contributors: Tully Foote
|
||||
|
||||
1.11.2 (2014-03-22)
|
||||
-------------------
|
||||
|
||||
1.11.1 (2014-03-20)
|
||||
-------------------
|
||||
|
||||
1.11.0 (2014-02-21)
|
||||
-------------------
|
||||
* fix urdf files for test
|
||||
* fix test at urdf
|
||||
* Contributors: YoheiKakiuchi
|
||||
|
||||
1.10.18 (2013-12-04)
|
||||
--------------------
|
||||
* add DEPENDS for kdl_parser
|
||||
* Contributors: Ioan Sucan
|
||||
|
||||
1.10.16 (2013-11-18)
|
||||
--------------------
|
||||
* check for CATKIN_ENABLE_TESTING
|
||||
* fix for using collada_parser_plugin
|
||||
|
||||
1.10.15 (2013-08-17)
|
||||
--------------------
|
||||
* fix `#30 <https://github.com/ros/robot_model/issues/30>`_
|
|
@ -1,67 +0,0 @@
|
|||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(urdf)
|
||||
|
||||
find_package(Boost REQUIRED thread)
|
||||
find_package(urdfdom REQUIRED)
|
||||
find_package(urdfdom_headers REQUIRED)
|
||||
find_package(catkin REQUIRED COMPONENTS
|
||||
urdf_parser_plugin pluginlib rosconsole_bridge roscpp cmake_modules)
|
||||
|
||||
|
||||
find_package(TinyXML REQUIRED)
|
||||
|
||||
# Find version components
|
||||
if(NOT urdfdom_headers_VERSION)
|
||||
set(urdfdom_headers_VERSION "0.0.0")
|
||||
endif()
|
||||
string(REGEX REPLACE "^([0-9]+).*" "\\1" URDFDOM_HEADERS_MAJOR_VERSION "${urdfdom_headers_VERSION}")
|
||||
string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" URDFDOM_HEADERS_MINOR_VERSION "${urdfdom_headers_VERSION}")
|
||||
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" URDFDOM_HEADERS_REVISION_VERSION "${urdfdom_headers_VERSION}")
|
||||
set(generated_compat_header "${CATKIN_DEVEL_PREFIX}/include/${PROJECT_NAME}/urdfdom_compatibility.h")
|
||||
include_directories("${CATKIN_DEVEL_PREFIX}/include")
|
||||
configure_file(urdfdom_compatibility.h.in "${generated_compat_header}" @ONLY)
|
||||
|
||||
add_compile_options(-std=c++11)
|
||||
|
||||
catkin_package(
|
||||
LIBRARIES ${PROJECT_NAME}
|
||||
INCLUDE_DIRS include ${TinyXML_INLCLUDE_DIRS} ${CATKIN_DEVEL_PREFIX}/include
|
||||
CATKIN_DEPENDS rosconsole_bridge roscpp
|
||||
DEPENDS urdfdom_headers urdfdom Boost
|
||||
)
|
||||
install(FILES ${generated_compat_header} DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
|
||||
|
||||
include_directories(
|
||||
include
|
||||
${Boost_INCLUDE_DIR}
|
||||
${catkin_INCLUDE_DIRS}
|
||||
${urdfdom_INCLUDE_DIRS}
|
||||
${urdfdom_headers_INCLUDE_DIRS}
|
||||
${TinyXML_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
link_directories(${Boost_LIBRARY_DIRS} ${catkin_LIBRARY_DIRS})
|
||||
|
||||
add_library(${PROJECT_NAME} src/model.cpp src/rosconsole_bridge.cpp)
|
||||
target_link_libraries(${PROJECT_NAME} ${TinyXML_LIBRARIES} ${catkin_LIBRARIES} ${urdfdom_LIBRARIES})
|
||||
|
||||
if(APPLE)
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
|
||||
endif(APPLE)
|
||||
|
||||
if(CATKIN_ENABLE_TESTING)
|
||||
find_package(catkin REQUIRED COMPONENTS rostest)
|
||||
add_rostest_gtest(test_urdf_parser test/test_robot_model_parser.launch test/test_robot_model_parser.cpp)
|
||||
target_link_libraries(test_urdf_parser ${PROJECT_NAME})
|
||||
endif()
|
||||
|
||||
# no idea how CATKIN does this
|
||||
# rosbuild_add_rostest(${PROJECT_SOURCE_DIR}/test/test_robot_model_parser.launch)
|
||||
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
|
||||
|
||||
install(DIRECTORY include/${PROJECT_NAME}/
|
||||
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
|
|
@ -1,74 +0,0 @@
|
|||
/*********************************************************************
|
||||
* Software License Agreement (BSD License)
|
||||
*
|
||||
* Copyright (c) 2008, 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: Wim Meeussen */
|
||||
|
||||
#ifndef URDF_MODEL_H
|
||||
#define URDF_MODEL_H
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <urdf_model/model.h>
|
||||
#include <urdf/urdfdom_compatibility.h>
|
||||
#include <tinyxml.h>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/weak_ptr.hpp>
|
||||
#include <ros/ros.h>
|
||||
|
||||
namespace urdf{
|
||||
|
||||
class Model: public ModelInterface
|
||||
{
|
||||
public:
|
||||
/// \brief Load Model from TiXMLElement
|
||||
bool initXml(TiXmlElement *xml);
|
||||
/// \brief Load Model from TiXMLDocument
|
||||
bool initXml(TiXmlDocument *xml);
|
||||
/// \brief Load Model given a filename
|
||||
bool initFile(const std::string& filename);
|
||||
/// \brief Load Model given the name of a parameter on the parameter server
|
||||
bool initParam(const std::string& param);
|
||||
/// \brief Load Model given the name of a parameter on the parameter server using provided nodehandle
|
||||
bool initParamWithNodeHandle(const std::string& param, const ros::NodeHandle& nh = ros::NodeHandle());
|
||||
/// \brief Load Model from a XML-string
|
||||
bool initString(const std::string& xmlstring);
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<Model> ModelSharedPtr;
|
||||
typedef boost::shared_ptr<const Model> ModelConstSharedPtr;
|
||||
typedef boost::weak_ptr<Model> ModelWeakPtr;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,159 +0,0 @@
|
|||
/**
|
||||
\mainpage
|
||||
\htmlinclude manifest.html
|
||||
|
||||
urdf::Model is a class containing robot model data structure.
|
||||
Every Robot Description File (URDF) can be described as a list of Links (urdf::Model::links_) and Joints (urdf::Model::joints_).
|
||||
The connection between links(nodes) and joints(edges) should define a tree (i.e. 1 parent link, 0+ children links).
|
||||
\li Here is an example Robot Description Describing a Parent Link 'P', a Child Link 'C', and a Joint 'J'
|
||||
@verbatim
|
||||
<joint name="J" type="revolute">
|
||||
<dynamics damping="1" friction="0"/>
|
||||
<limit lower="0.9" upper="2.1" effort="1000" velocity="1"/>
|
||||
<safety_controller soft_lower_limit="0.7" soft_upper_limit="2.1" k_position="1" k_velocity="1" />
|
||||
<calibration reference_position="0.7" />
|
||||
<mimic joint="J100" offset="0" multiplier="0.7" />
|
||||
|
||||
<!-- origin: origin of the joint in the parent frame -->
|
||||
<!-- child link frame is the joint frame -->
|
||||
<!-- axis is in the joint frame -->
|
||||
<origin xyz="0 0 0" rpy="0 0 0"/>
|
||||
<axis xyz="0 1 0"/>
|
||||
<parent link="P"/>
|
||||
<child link="C"/>
|
||||
</joint>
|
||||
|
||||
<link name="C">
|
||||
<inertial>
|
||||
<mass value="10"/>
|
||||
<origin xyz="0 0 0" rpy="0 0 0"/>
|
||||
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
||||
</inertial>
|
||||
|
||||
<visual>
|
||||
<origin xyz="0 0 0" rpy="0 0 0"/>
|
||||
<geometry>
|
||||
<box size="1 1 1"/>
|
||||
</geometry>
|
||||
<material name="Green"/>
|
||||
</visual>
|
||||
|
||||
<collision>
|
||||
<origin xyz="0 0 0" rpy="0 0 0"/>
|
||||
<geometry>
|
||||
<box size="1.01 1.01 1.01"/>
|
||||
</geometry>
|
||||
<contact_coefficient mu="0" resitution="0" k_p="0" k_d="0" />
|
||||
</collision>
|
||||
</link>
|
||||
|
||||
<material name="Green">
|
||||
<texture filename="...texture file..." />
|
||||
<!--color rgb="255 255 255" /-->
|
||||
</material>
|
||||
@endverbatim
|
||||
|
||||
|
||||
|
||||
\section codeapi Code API
|
||||
|
||||
The URDF parser API contains the following methods:
|
||||
\li Parse and build tree from XML: urdf::Model::initXml
|
||||
\li Parse and build tree from File: urdf::Model::initFile
|
||||
\li Parse and build tree from String: urdf::Model::initString
|
||||
\li Get Root Link: urdf::Model::getRoot
|
||||
\li Get Link by name urdf::Model::getLink
|
||||
\li Get all Link's urdf::Model::getLinks
|
||||
\li Get Joint by name urdf::Model::getJoint
|
||||
|
||||
<!--
|
||||
\section rosapi ROS API
|
||||
|
||||
Names are very important in ROS because they can be remapped on the
|
||||
command-line, so it is VERY IMPORTANT THAT YOU LIST NAMES AS THEY
|
||||
APPEAR IN THE CODE. You should list names of every topic, service and
|
||||
parameter used in your code. There is a template below that you can
|
||||
use to document each node separately.
|
||||
|
||||
List of nodes:
|
||||
- \b node_name1
|
||||
- \b node_name2
|
||||
-->
|
||||
|
||||
<!-- START: copy from here to 'END' for each node
|
||||
|
||||
<hr>
|
||||
|
||||
\subsection node_name node_name
|
||||
|
||||
node_name does (provide a basic description of your node)
|
||||
|
||||
\subsubsection Usage
|
||||
\verbatim
|
||||
$ node_type1 [standard ROS args]
|
||||
\endverbatim
|
||||
|
||||
\par Example
|
||||
|
||||
\verbatim
|
||||
$ node_type1
|
||||
\endverbatim
|
||||
|
||||
|
||||
\subsubsection topics ROS topics
|
||||
|
||||
Subscribes to:
|
||||
- \b "in": [std_msgs/FooType] description of in
|
||||
|
||||
Publishes to:
|
||||
- \b "out": [std_msgs/FooType] description of out
|
||||
|
||||
|
||||
\subsubsection parameters ROS parameters
|
||||
|
||||
Reads the following parameters from the parameter server
|
||||
|
||||
- \b "~param_name" : \b [type] description of param_name
|
||||
- \b "~my_param" : \b [string] description of my_param
|
||||
|
||||
Sets the following parameters on the parameter server
|
||||
|
||||
- \b "~param_name" : \b [type] description of param_name
|
||||
|
||||
|
||||
\subsubsection services ROS services
|
||||
- \b "foo_service": [std_srvs/FooType] description of foo_service
|
||||
|
||||
|
||||
END: copy for each node -->
|
||||
|
||||
|
||||
<!-- START: Uncomment if you have any command-line tools
|
||||
|
||||
\section commandline Command-line tools
|
||||
|
||||
This section is a catch-all for any additional tools that your package
|
||||
provides or uses that may be of use to the reader. For example:
|
||||
|
||||
- tools/scripts (e.g. rospack, roscd)
|
||||
- roslaunch .launch files
|
||||
- xmlparam files
|
||||
|
||||
\subsection script_name script_name
|
||||
|
||||
Description of what this script/file does.
|
||||
|
||||
\subsubsection Usage
|
||||
\verbatim
|
||||
$ ./script_name [args]
|
||||
\endverbatim
|
||||
|
||||
\par Example
|
||||
|
||||
\verbatim
|
||||
$ ./script_name foo bar
|
||||
\endverbatim
|
||||
|
||||
END: Command-Line Tools Section -->
|
||||
|
||||
*/
|
|
@ -1,40 +0,0 @@
|
|||
<package>
|
||||
<name>urdf</name>
|
||||
<version>1.12.9</version>
|
||||
<description>
|
||||
This package contains a C++ parser for the Unified Robot Description
|
||||
Format (URDF), which is an XML format for representing a robot model.
|
||||
The code API of the parser has been through our review process and will remain
|
||||
backwards compatible in future releases.
|
||||
</description>
|
||||
|
||||
<author email="isucan@gmail.com">Ioan Sucan</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/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 version_gte="0.5.68">catkin</buildtool_depend>
|
||||
|
||||
<build_depend>liburdfdom-dev</build_depend>
|
||||
<build_depend>liburdfdom-headers-dev</build_depend>
|
||||
<build_depend>rosconsole_bridge</build_depend>
|
||||
<build_depend>roscpp</build_depend>
|
||||
<build_depend>urdf_parser_plugin</build_depend>
|
||||
<build_depend>pluginlib</build_depend>
|
||||
<build_depend>cmake_modules</build_depend>
|
||||
<build_depend>rostest</build_depend>
|
||||
|
||||
<run_depend>liburdfdom-dev</run_depend>
|
||||
<run_depend>liburdfdom-headers-dev</run_depend>
|
||||
<run_depend>rosconsole_bridge</run_depend>
|
||||
<run_depend>roscpp</run_depend>
|
||||
<run_depend>urdf_parser_plugin</run_depend>
|
||||
<run_depend>pluginlib</run_depend>
|
||||
|
||||
</package>
|
|
@ -1,193 +0,0 @@
|
|||
/*********************************************************************
|
||||
* Software License Agreement (BSD License)
|
||||
*
|
||||
* Copyright (c) 2008, 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: Wim Meeussen */
|
||||
|
||||
#include "urdf/model.h"
|
||||
|
||||
/* 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 <boost/algorithm/string.hpp>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
#include <vector>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
namespace urdf{
|
||||
|
||||
static bool IsColladaData(const std::string& data)
|
||||
{
|
||||
return data.find("<COLLADA") != std::string::npos;
|
||||
}
|
||||
|
||||
|
||||
bool Model::initFile(const std::string& filename)
|
||||
{
|
||||
|
||||
// get the entire file
|
||||
std::string xml_string;
|
||||
std::fstream xml_file(filename.c_str(), std::fstream::in);
|
||||
if (xml_file.is_open())
|
||||
{
|
||||
while ( xml_file.good() )
|
||||
{
|
||||
std::string line;
|
||||
std::getline( xml_file, line);
|
||||
xml_string += (line + "\n");
|
||||
}
|
||||
xml_file.close();
|
||||
return Model::initString(xml_string);
|
||||
}
|
||||
else
|
||||
{
|
||||
ROS_ERROR("Could not open file [%s] for parsing.",filename.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
bool Model::initParam(const std::string& param)
|
||||
{
|
||||
return initParamWithNodeHandle(param, ros::NodeHandle());
|
||||
}
|
||||
|
||||
bool Model::initParamWithNodeHandle(const std::string& param, const ros::NodeHandle& nh)
|
||||
{
|
||||
std::string xml_string;
|
||||
|
||||
// gets the location of the robot description on the parameter server
|
||||
std::string full_param;
|
||||
if (!nh.searchParam(param, full_param)){
|
||||
ROS_ERROR("Could not find parameter %s on parameter server", param.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
// read the robot description from the parameter server
|
||||
if (!nh.getParam(full_param, xml_string)){
|
||||
ROS_ERROR("Could not read parameter %s on parameter server", full_param.c_str());
|
||||
return false;
|
||||
}
|
||||
return Model::initString(xml_string);
|
||||
}
|
||||
|
||||
bool Model::initXml(TiXmlDocument *xml_doc)
|
||||
{
|
||||
if (!xml_doc)
|
||||
{
|
||||
ROS_ERROR("Could not parse the xml document");
|
||||
return false;
|
||||
}
|
||||
|
||||
std::stringstream ss;
|
||||
ss << *xml_doc;
|
||||
|
||||
return Model::initString(ss.str());
|
||||
}
|
||||
|
||||
bool Model::initXml(TiXmlElement *robot_xml)
|
||||
{
|
||||
if (!robot_xml)
|
||||
{
|
||||
ROS_ERROR("Could not parse the xml element");
|
||||
return false;
|
||||
}
|
||||
|
||||
std::stringstream ss;
|
||||
ss << (*robot_xml);
|
||||
|
||||
return Model::initString(ss.str());
|
||||
}
|
||||
|
||||
bool Model::initString(const std::string& xml_string)
|
||||
{
|
||||
urdf::ModelInterfaceSharedPtr model;
|
||||
|
||||
// necessary for COLLADA compatibility
|
||||
if( IsColladaData(xml_string) ) {
|
||||
ROS_DEBUG("Parsing robot collada xml string");
|
||||
|
||||
static boost::mutex PARSER_PLUGIN_LOCK;
|
||||
static boost::scoped_ptr<pluginlib::ClassLoader<urdf::URDFParser> > PARSER_PLUGIN_LOADER;
|
||||
boost::mutex::scoped_lock _(PARSER_PLUGIN_LOCK);
|
||||
|
||||
try
|
||||
{
|
||||
if (!PARSER_PLUGIN_LOADER)
|
||||
PARSER_PLUGIN_LOADER.reset(new pluginlib::ClassLoader<urdf::URDFParser>("urdf_parser_plugin", "urdf::URDFParser"));
|
||||
const std::vector<std::string> &classes = PARSER_PLUGIN_LOADER->getDeclaredClasses();
|
||||
bool found = false;
|
||||
for (std::size_t i = 0 ; i < classes.size() ; ++i)
|
||||
if (classes[i].find("urdf/ColladaURDFParser") != std::string::npos)
|
||||
{
|
||||
boost::shared_ptr<urdf::URDFParser> instance = PARSER_PLUGIN_LOADER->createInstance(classes[i]);
|
||||
if (instance)
|
||||
model = instance->parse(xml_string);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
if (!found)
|
||||
ROS_ERROR_STREAM("No URDF parser plugin found for Collada files. Did you install the corresponding package?");
|
||||
}
|
||||
catch(pluginlib::PluginlibException& ex)
|
||||
{
|
||||
ROS_ERROR_STREAM("Exception while creating planning plugin loader " << ex.what() << ". Will not parse Collada file.");
|
||||
}
|
||||
}
|
||||
else {
|
||||
ROS_DEBUG("Parsing robot urdf xml string");
|
||||
model = parseURDF(xml_string);
|
||||
}
|
||||
|
||||
// copy data from model into this object
|
||||
if (model){
|
||||
this->links_ = model->links_;
|
||||
this->joints_ = model->joints_;
|
||||
this->materials_ = model->materials_;
|
||||
this->name_ = model->name_;
|
||||
this->root_link_ = model->root_link_;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}// namespace
|
|
@ -1,38 +0,0 @@
|
|||
/*********************************************************************
|
||||
* Software License Agreement (BSD License)
|
||||
*
|
||||
* Copyright (c) 2011, 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.
|
||||
*********************************************************************/
|
||||
|
||||
#include <rosconsole_bridge/bridge.h>
|
||||
|
||||
REGISTER_ROSCONSOLE_BRIDGE;
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" ?>
|
||||
|
||||
<robot name="pr2">
|
||||
<joint name="fl_caster_rotation_joint" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit effort="100" k_velocity="10" velocity="100"/>
|
||||
<calibration reference_position="0.0" values="1.5 -1"/>
|
||||
<joint_properties damping="0.0" friction="0.0"/>
|
||||
<origin rpy="0 0 1 }" xyz="0.2225 0.2225 0.0282"/>
|
||||
<parent link="base_link"/>
|
||||
<child link="fl_caster_rotation_link"/>
|
||||
</joint>
|
||||
<link name="fl_caster_rotation_link">
|
||||
<inertial>
|
||||
<mass value="3.473082"/>
|
||||
<origin xyz="0 0 0.07"/>
|
||||
<inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983" iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
</link>
|
||||
</robot>
|
|
@ -1,39 +0,0 @@
|
|||
<?xml version="1.0" ?>
|
||||
|
||||
<robot name="pr2">
|
||||
|
||||
<joint name="fl_caster_rotation_joint" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit effort="100" k_velocity="10" velocity="100"/>
|
||||
<calibration reference_position="0.0" values="1.5 -1"/>
|
||||
<joint_properties damping="0.0" friction="0.0"/>
|
||||
<origin rpy="0 0 1" xyz="0.2225 0.2225 0.0282"/>
|
||||
<parent link="base_link"/>
|
||||
<child link="fl_caster_rotation_link"/>
|
||||
</joint>
|
||||
<link name="fl_caster_rotation_link">
|
||||
<inertial>
|
||||
<mass value="3.473082"/>
|
||||
<origin xyz="0 0 0.07"/>
|
||||
<inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983" iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<joint name="fr_caster_rotation_joint" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit effort="100" k_velocity="10" velocity="100"/>
|
||||
<calibration reference_position="0.0" values="1.5 -1"/>
|
||||
<joint_properties damping="0.0" friction="0.0"/>
|
||||
<origin rpy="0 0 1" xyz="0.2225 0.2225 0.0282"/>
|
||||
<parent link="base_link"/>
|
||||
<child link="fl_caster_rotation_link"/>
|
||||
</joint>
|
||||
<link name="fl_caster_rotation_link">
|
||||
<inertial>
|
||||
<mass value="3.473082"/>
|
||||
<origin xyz="0 0 0.07"/>
|
||||
<inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983" iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
</robot>
|
|
@ -1,38 +0,0 @@
|
|||
<?xml version="1.0" ?>
|
||||
|
||||
<robot name="pr2">
|
||||
<joint name="fl_caster_rotation_joint" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit effort="100" k_velocity="10" velocity="100"/>
|
||||
<calibration reference_position="0.0" values="1.5 -1"/>
|
||||
<joint_properties damping="0.0" friction="0.0"/>
|
||||
<origin rpy="0 0 1" xyz="0.2225 0.2225 0.0282"/>
|
||||
<parent link="base_link"/>
|
||||
<child link="fl_caster_rotation_link"/>
|
||||
</joint>
|
||||
<link name="fl_caster_rotation_link">
|
||||
<inertial>
|
||||
<mass value="3.473082"/>
|
||||
<origin xyz="0 0 0.07"/>
|
||||
<inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983" iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<joint name="fl_caster_rotation_joint" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit effort="100" k_velocity="10" velocity="100"/>
|
||||
<calibration reference_position="0.0" values="1.5 -1"/>
|
||||
<joint_properties damping="0.0" friction="0.0"/>
|
||||
<origin rpy="0 0 1" xyz="0.2225 0.2225 0.0282"/>
|
||||
<parent link="fl_caster_rotation_link"/>
|
||||
<child link="fr_caster_rotation_joint"/>
|
||||
</joint>
|
||||
<link name="fr_caster_rotation_link">
|
||||
<inertial>
|
||||
<mass value="3.473082"/>
|
||||
<origin xyz="0 0 0.07"/>
|
||||
<inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983" iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
</robot>
|
|
@ -1,39 +0,0 @@
|
|||
<?xml version="1.0" ?>
|
||||
|
||||
<robot name="pr2">
|
||||
|
||||
<joint name="fl_caster_rotation_joint" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit effort="100" k_velocity="10" velocity="100"/>
|
||||
<calibration reference_position="0.0" values="1.5 -1"/>
|
||||
<joint_properties damping="0.0" friction="0.0"/>
|
||||
<origin rpy="0 0 1" xyz="0.2225 0.2225 0.0282"/>
|
||||
<parent link="base_link"/>
|
||||
<child link="fl_caster_rotation_link"/>
|
||||
</joint>
|
||||
<link name="fl_caster_rotation_link">
|
||||
<inertial>
|
||||
<mass value="3.473082"/>
|
||||
<origin xyz="0 0 0.07"/>
|
||||
<inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983" iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<joint name="fr_caster_rotation_joint" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit effort="100" k_velocity="10" velocity="100"/>
|
||||
<calibration reference_position="0.0" values="1.5 -1"/>
|
||||
<joint_properties damping="0.0" friction="0.0"/>
|
||||
<origin rpy="0 0 1" xyz="0.2225 0.2225 0.0282"/>
|
||||
<parent link="fl_caster_rotation_link"/>
|
||||
<child link="base_link"/>
|
||||
</joint>
|
||||
<link name="base_link">
|
||||
<inertial>
|
||||
<mass value="3.473082"/>
|
||||
<origin xyz="0 0 0.07"/>
|
||||
<inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983" iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
</robot>
|
File diff suppressed because it is too large
Load Diff
|
@ -1,21 +0,0 @@
|
|||
<?xml version="1.0" ?>
|
||||
|
||||
<robot name="pr2">
|
||||
<joint name="fl_caster_rotation_joint" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit effort="100" k_velocity="10" velocity="100"/>
|
||||
<calibration reference_position="0.0" values="1.5 -1"/>
|
||||
<joint_properties damping="0.0" friction="0.0"/>
|
||||
<origin rpy="0 0 1" xyz="0.2225 0.2225 0.0282"/>
|
||||
<parent link="base_link"//>
|
||||
<child link="fl_caster_rotation_link"//>
|
||||
</joint>
|
||||
|
||||
<link name="fl_caster_rotation_link">
|
||||
<inertial>
|
||||
<mass value="3.473082"/>
|
||||
<origin xyz="0 0 0.07"/>
|
||||
<inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983" iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
</link>
|
||||
</robot>
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" ?>
|
||||
|
||||
<robot name="pr2">
|
||||
<joint name="fl_caster_rotation_joint" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit effort="100" k_velocity="10" velocity="100"/>
|
||||
<calibration reference_position="0.0" values="1.5 -1"/>
|
||||
<joint_properties damping="0.0" friction="0.0"/>
|
||||
<origin rpy="0 0 1" xyz="0.2225 0.2225 0.0282"/>
|
||||
<parent link="base_link"/>
|
||||
<child link="base_link"/>
|
||||
</joint>
|
||||
<link name="base_link">
|
||||
<inertial>
|
||||
<mass value="3.473082"/>
|
||||
<origin xyz="0 0 0.07"/>
|
||||
<inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983" iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
</link>
|
||||
</robot>
|
|
@ -1,39 +0,0 @@
|
|||
<?xml version="1.0" ?>
|
||||
|
||||
<robot name="pr2">
|
||||
<joint name="fl_caster_rotation_joint" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit effort="100" k_velocity="10" velocity="100"/>
|
||||
<calibration reference_position="0.0" values="1.5 -1"/>
|
||||
<joint_properties damping="0.0" friction="0.0"/>
|
||||
<origin rpy="0 0 1" xyz="0.2225 0.2225 0.0282"/>
|
||||
<parent link="base_link"/>
|
||||
<child link="fl_caster_rotation_link"/>
|
||||
</joint>
|
||||
<link name="fl_caster_rotation_link">
|
||||
<inertial>
|
||||
<mass value="3.473082"/>
|
||||
<origin xyz="0 0 0.07"/>
|
||||
<inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983" iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<joint name="fr_caster_rotation_joint" type="revolute">
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit effort="100" k_velocity="10" velocity="100"/>
|
||||
<calibration reference_position="0.0" values="1.5 -1"/>
|
||||
<joint_properties damping="0.0" friction="0.0"/>
|
||||
<origin rpy="0 0 1" xyz="0.2225 0.2225 0.0282"/>
|
||||
<parent link="world"/>
|
||||
<child link="fr_caster_rotation_link"/>
|
||||
</joint>
|
||||
<link name="fr_caster_rotation_link">
|
||||
|
||||
<inertial>
|
||||
<mass value="3.473082"/>
|
||||
<origin xyz="0 0 0.07"/>
|
||||
<inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983" iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
</robot>
|
|
@ -1,25 +0,0 @@
|
|||
<?xml verison="1.0"?>
|
||||
<robot name="no_visual">
|
||||
<link name="link1">
|
||||
<inertial>
|
||||
<mass value="1"/>
|
||||
<inertia ixx="1" iyy="1" izz="1" ixy="0" ixz="0" iyz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<link name="link3">
|
||||
<inertial>
|
||||
<mass value="1"/>
|
||||
<inertia ixx="1" iyy="1" izz="1" ixy="0" ixz="0" iyz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<link name="link2">
|
||||
<inertial>
|
||||
<mass value="1"/>
|
||||
<inertia ixx="1" iyy="1" izz="1" ixy="0" ixz="0" iyz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="joint12" type="fixed">
|
||||
<parent link="link1"/>
|
||||
<child link="link2"/>
|
||||
</link>
|
||||
</robot>
|
|
@ -1,14 +0,0 @@
|
|||
<?xml verison="1.0"?>
|
||||
<robot name="no_visual">
|
||||
<link name="link1">
|
||||
<inertial>
|
||||
<mass value="1"/>
|
||||
<inertia ixx="1" iyy="1" izz="1" ixy="0" ixz="0" iyz="0"/>
|
||||
</inertial>
|
||||
<collision>
|
||||
<geometry>
|
||||
<box size="1 1 1"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
</robot>
|
|
@ -1,19 +0,0 @@
|
|||
<?xml verison="1.0"?>
|
||||
<robot name="one_link">
|
||||
<link name="link1">
|
||||
<inertial>
|
||||
<mass value="1"/>
|
||||
<inertia ixx="1" iyy="1" izz="1" ixy="0" ixz="0" iyz="0"/>
|
||||
</inertial>
|
||||
<visual>
|
||||
<geometry>
|
||||
<box size="1 1 1"/>
|
||||
</geometry>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<box size="1 1 1"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
</robot>
|
File diff suppressed because it is too large
Load Diff
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" ?>
|
||||
|
||||
<robot name="pr2">
|
||||
<link name="fl_caster_rotation_link">
|
||||
<inertial>
|
||||
<mass value="3.473082"/>
|
||||
<origin xyz="0 0 0.07"/>
|
||||
<inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983" iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
</link>
|
||||
</robot>
|
|
@ -1,31 +0,0 @@
|
|||
<?xml verison="1.0"?>
|
||||
<robot name="no_visual">
|
||||
<link name="link1">
|
||||
<inertial>
|
||||
<mass value="1"/>
|
||||
<inertia ixx="1" iyy="1" izz="1" ixy="0" ixz="0" iyz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<link name="link2">
|
||||
<inertial>
|
||||
<mass value="1"/>
|
||||
<inertia ixx="1" iyy="1" izz="1" ixy="0" ixz="0" iyz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="joint12" type="fixed">
|
||||
<parent link="link1"/>
|
||||
<child link="link2"/>
|
||||
<origin xyz="0 0 0" rpy="1.0 1.5707963267948966 0.5707963267948966"/>
|
||||
</joint>
|
||||
<link name="link3">
|
||||
<inertial>
|
||||
<mass value="1"/>
|
||||
<inertia ixx="1" iyy="1" izz="1" ixy="0" ixz="0" iyz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="joint13" type="fixed">
|
||||
<parent link="link2"/>
|
||||
<child link="link3"/>
|
||||
<origin xyz="0 0 0" rpy="1.5707963267948966 1.5707963267948966 1.5707963267948966"/>
|
||||
</joint>
|
||||
</robot>
|
|
@ -1,425 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<robot name="r2d2">
|
||||
|
||||
<material name="blue">
|
||||
<color rgba="0 0 .8 1"/>
|
||||
</material>
|
||||
<material name="black">
|
||||
<color rgba="0 0 0 1"/>
|
||||
</material>
|
||||
<material name="white">
|
||||
<color rgba="1 1 1 1"/>
|
||||
</material>
|
||||
|
||||
<link name="dummy_link"/>
|
||||
|
||||
<link name="base_link">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length="0.6" radius="0.2"/>
|
||||
</geometry>
|
||||
<material name="blue"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<cylinder length="0.6" 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"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<joint name="dummy_to_base" type="fixed">
|
||||
<parent link="dummy_link"/>
|
||||
<child link="base_link"/>
|
||||
</joint>
|
||||
|
||||
<link name="right_leg">
|
||||
<visual>
|
||||
<geometry>
|
||||
<box size="0.6 .1 .2"/>
|
||||
</geometry>
|
||||
<origin rpy="0 1.57075 0" xyz="0 0 -0.3"/>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<box size="0.6 .1 .2"/>
|
||||
</geometry>
|
||||
<origin rpy="0 1.57075 0" xyz="0 0 -0.3"/>
|
||||
</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>
|
||||
<joint name="base_to_right_leg" type="fixed">
|
||||
<parent link="base_link"/>
|
||||
<child link="right_leg"/>
|
||||
<origin xyz="0 -0.22 .25"/>
|
||||
</joint>
|
||||
|
||||
<link name="right_base">
|
||||
<visual>
|
||||
<geometry>
|
||||
<box size="0.4 .1 .1"/>
|
||||
</geometry>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<box size="0.4 .1 .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>
|
||||
|
||||
<joint name="right_base_joint" type="fixed">
|
||||
<parent link="right_leg"/>
|
||||
<child link="right_base"/>
|
||||
<origin xyz="0 0 -0.6"/>
|
||||
</joint>
|
||||
|
||||
<link name="right_front_wheel">
|
||||
<visual>
|
||||
<origin rpy="1.57075 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<cylinder length="0.1" radius="0.035"/>
|
||||
</geometry>
|
||||
<material name="black"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="1.57075 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<cylinder length="0.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 name="right_front_wheel_joint" type="continuous">
|
||||
<axis rpy="0 0 0" xyz="0 1 0"/>
|
||||
<parent link="right_base"/>
|
||||
<child link="right_front_wheel"/>
|
||||
<origin rpy="0 0 0" xyz="0.133333333333 0 -0.085"/>
|
||||
</joint>
|
||||
|
||||
<link name="right_back_wheel">
|
||||
<visual>
|
||||
<origin rpy="1.57075 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<cylinder length="0.1" radius="0.035"/>
|
||||
</geometry>
|
||||
<material name="black"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="1.57075 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<cylinder length="0.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 name="right_back_wheel_joint" type="continuous">
|
||||
<axis rpy="0 0 0" xyz="0 1 0"/>
|
||||
<parent link="right_base"/>
|
||||
<child link="right_back_wheel"/>
|
||||
<origin rpy="0 0 0" xyz="-0.133333333333 0 -0.085"/>
|
||||
</joint>
|
||||
|
||||
<link name="left_leg">
|
||||
<visual>
|
||||
<geometry>
|
||||
<box size="0.6 .1 .2"/>
|
||||
</geometry>
|
||||
<origin rpy="0 1.57075 0" xyz="0 0 -0.3"/>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<box size="0.6 .1 .2"/>
|
||||
</geometry>
|
||||
<origin rpy="0 1.57075 0" xyz="0 0 -0.3"/>
|
||||
</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>
|
||||
|
||||
<joint name="base_to_left_leg" type="fixed">
|
||||
<parent link="base_link"/>
|
||||
<child link="left_leg"/>
|
||||
<origin xyz="0 0.22 .25"/>
|
||||
</joint>
|
||||
|
||||
<link name="left_base">
|
||||
<visual>
|
||||
<geometry>
|
||||
<box size="0.4 .1 .1"/>
|
||||
</geometry>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<box size="0.4 .1 .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>
|
||||
|
||||
<joint name="left_base_joint" type="fixed">
|
||||
<parent link="left_leg"/>
|
||||
<child link="left_base"/>
|
||||
<origin xyz="0 0 -0.6"/>
|
||||
</joint>
|
||||
|
||||
<link name="left_front_wheel">
|
||||
<visual>
|
||||
<origin rpy="1.57075 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<cylinder length="0.1" radius="0.035"/>
|
||||
</geometry>
|
||||
<material name="black"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="1.57075 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<cylinder length="0.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 name="left_front_wheel_joint" type="continuous">
|
||||
<axis rpy="0 0 0" xyz="0 1 0"/>
|
||||
<parent link="left_base"/>
|
||||
<child link="left_front_wheel"/>
|
||||
<origin rpy="0 0 0" xyz="0.133333333333 0 -0.085"/>
|
||||
</joint>
|
||||
|
||||
<link name="left_back_wheel">
|
||||
<visual>
|
||||
<origin rpy="1.57075 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<cylinder length="0.1" radius="0.035"/>
|
||||
</geometry>
|
||||
<material name="black"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="1.57075 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<cylinder length="0.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 name="left_back_wheel_joint" type="continuous">
|
||||
<axis rpy="0 0 0" xyz="0 1 0"/>
|
||||
<parent link="left_base"/>
|
||||
<child link="left_back_wheel"/>
|
||||
<origin rpy="0 0 0" xyz="-0.133333333333 0 -0.085"/>
|
||||
</joint>
|
||||
|
||||
<joint name="gripper_extension" type="prismatic">
|
||||
<parent link="base_link"/>
|
||||
<child link="gripper_pole"/>
|
||||
<limit effort="1000.0" lower="-0.38" upper="0" velocity="0.5"/>
|
||||
<origin rpy="0 0 0" xyz="0.19 0 .2"/>
|
||||
</joint>
|
||||
|
||||
<link name="gripper_pole">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder length="0.2" radius=".01"/>
|
||||
</geometry>
|
||||
<origin rpy="0 1.57075 0 " xyz="0.1 0 0"/>
|
||||
</visual>
|
||||
<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 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 rpy="0 0 0" xyz="0.2 0.01 0"/>
|
||||
<parent link="gripper_pole"/>
|
||||
<child link="left_gripper"/>
|
||||
</joint>
|
||||
|
||||
<link name="left_gripper">
|
||||
<visual>
|
||||
<origin rpy="0.0 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<mesh filename="package://pr2_description/meshes/gripper_v0/l_finger.dae"/>
|
||||
</geometry>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<mesh filename="package://pr2_description/meshes/gripper_v0/l_finger.dae"/>
|
||||
</geometry>
|
||||
<origin rpy="0.0 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"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<joint name="left_tip_joint" type="fixed">
|
||||
<parent link="left_gripper"/>
|
||||
<child link="left_tip"/>
|
||||
</joint>
|
||||
|
||||
<link name="left_tip">
|
||||
<visual>
|
||||
<origin rpy="0.0 0 0" xyz="0.09137 0.00495 0"/>
|
||||
<geometry>
|
||||
<mesh filename="package://pr2_description/meshes/gripper_v0/l_finger_tip.dae"/>
|
||||
</geometry>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<mesh filename="package://pr2_description/meshes/gripper_v0/l_finger_tip.dae"/>
|
||||
</geometry>
|
||||
<origin rpy="0.0 0 0" xyz="0.09137 0.00495 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 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 name="right_gripper">
|
||||
<visual>
|
||||
<origin rpy="-3.1415 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<mesh filename="package://pr2_description/meshes/gripper_v0/l_finger.dae"/>
|
||||
</geometry>
|
||||
</visual>
|
||||
<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"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<joint name="right_tip_joint" type="fixed">
|
||||
<parent link="right_gripper"/>
|
||||
<child link="right_tip"/>
|
||||
</joint>
|
||||
|
||||
<link name="right_tip">
|
||||
<visual>
|
||||
<origin rpy="-3.1415 0 0" xyz="0.09137 0.00495 0"/>
|
||||
<geometry>
|
||||
<mesh filename="package://pr2_description/meshes/gripper_v0/l_finger_tip.dae"/>
|
||||
</geometry>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<mesh filename="package://pr2_description/meshes/gripper_v0/l_finger_tip.dae"/>
|
||||
</geometry>
|
||||
<origin rpy="-3.1415 0 0" xyz="0.09137 0.00495 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>
|
||||
|
||||
<link name="head">
|
||||
<visual>
|
||||
<geometry>
|
||||
<sphere radius="0.2"/>
|
||||
</geometry>
|
||||
<material name="white"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<sphere radius="0.2"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="2"/>
|
||||
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<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>
|
||||
|
||||
<link name="box">
|
||||
<visual>
|
||||
<geometry>
|
||||
<box size=".08 .08 .08"/>
|
||||
</geometry>
|
||||
<material name="blue"/>
|
||||
<origin xyz="-0.04 0 0"/>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<box size=".08 .08 .08"/>
|
||||
</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 name="tobox" type="fixed">
|
||||
<parent link="head"/>
|
||||
<child link="box"/>
|
||||
<origin xyz="0.1814 0 0.1414"/>
|
||||
</joint>
|
||||
|
||||
</robot>
|
||||
|
|
@ -1,172 +0,0 @@
|
|||
/*********************************************************************
|
||||
* Software License Agreement (BSD License)
|
||||
*
|
||||
* Copyright (c) 2008, 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: Wim Meeussen */
|
||||
|
||||
#include <string>
|
||||
#include <gtest/gtest.h>
|
||||
#include "urdf/model.h"
|
||||
|
||||
// Including ros, just to be able to call ros::init(), to remove unwanted
|
||||
// args from command-line.
|
||||
#include <ros/ros.h>
|
||||
|
||||
using namespace urdf;
|
||||
|
||||
int g_argc;
|
||||
char** g_argv;
|
||||
|
||||
class TestParser : public testing::Test
|
||||
{
|
||||
public:
|
||||
|
||||
bool checkModel(urdf::Model & robot)
|
||||
{
|
||||
// get root link
|
||||
urdf::LinkConstSharedPtr root_link = robot.getRoot();
|
||||
if (!root_link)
|
||||
{
|
||||
ROS_ERROR("no root link %s", robot.getName().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
// go through entire tree
|
||||
return this->traverse_tree(root_link);
|
||||
|
||||
};
|
||||
|
||||
protected:
|
||||
/// constructor
|
||||
// num_links starts at 1 because traverse_tree doesn't count the root node
|
||||
TestParser() : num_joints(0), num_links(1)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/// Destructor
|
||||
~TestParser()
|
||||
{
|
||||
}
|
||||
|
||||
bool traverse_tree(urdf::LinkConstSharedPtr link,int level = 0)
|
||||
{
|
||||
ROS_INFO("Traversing tree at level %d, link size %lu", level, link->child_links.size());
|
||||
level+=2;
|
||||
bool retval = true;
|
||||
for (std::vector<urdf::LinkSharedPtr>::const_iterator child = link->child_links.begin(); child != link->child_links.end(); child++)
|
||||
{
|
||||
++num_links;
|
||||
if (*child && (*child)->parent_joint)
|
||||
{
|
||||
++num_joints;
|
||||
// check rpy
|
||||
double roll,pitch,yaw;
|
||||
(*child)->parent_joint->parent_to_joint_origin_transform.rotation.getRPY(roll,pitch,yaw);
|
||||
|
||||
if (std::isnan(roll) || std::isnan(pitch) || std::isnan(yaw))
|
||||
{
|
||||
ROS_ERROR("getRPY() returned nan!");
|
||||
return false;
|
||||
}
|
||||
// recurse down the tree
|
||||
retval &= this->traverse_tree(*child,level);
|
||||
}
|
||||
else
|
||||
{
|
||||
ROS_ERROR("root link: %s has a null child!",link->name.c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// no more children
|
||||
return retval;
|
||||
};
|
||||
|
||||
size_t num_joints;
|
||||
size_t num_links;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
TEST_F(TestParser, test)
|
||||
{
|
||||
ASSERT_GE(g_argc, 3);
|
||||
std::string folder = std::string(g_argv[1]) + "/test/";
|
||||
ROS_INFO("Folder %s",folder.c_str());
|
||||
std::string file = std::string(g_argv[2]);
|
||||
bool expect_success = (file.substr(0,5) != "fail_");
|
||||
urdf::Model robot;
|
||||
ROS_INFO("Parsing file %s, expecting %d",(folder + file).c_str(), expect_success);
|
||||
if (!expect_success) {
|
||||
ASSERT_FALSE(robot.initFile(folder + file));
|
||||
return;
|
||||
}
|
||||
|
||||
ASSERT_EQ(g_argc, 7);
|
||||
std::string robot_name = std::string(g_argv[3]);
|
||||
std::string root_name = std::string(g_argv[4]);
|
||||
size_t expected_num_joints = atoi(g_argv[5]);
|
||||
size_t expected_num_links = atoi(g_argv[6]);
|
||||
|
||||
ASSERT_TRUE(robot.initFile(folder + file));
|
||||
|
||||
EXPECT_EQ(robot.getName(), robot_name);
|
||||
urdf::LinkConstSharedPtr root = robot.getRoot();
|
||||
ASSERT_TRUE(static_cast<bool>(root));
|
||||
EXPECT_EQ(root->name, root_name);
|
||||
|
||||
ASSERT_TRUE(checkModel(robot));
|
||||
EXPECT_EQ(num_joints, expected_num_joints);
|
||||
EXPECT_EQ(num_links, expected_num_links);
|
||||
EXPECT_EQ(robot.joints_.size(), expected_num_joints);
|
||||
EXPECT_EQ(robot.links_.size(), expected_num_links);
|
||||
|
||||
// test reading from parameter server
|
||||
ASSERT_TRUE(robot.initParam("robot_description"));
|
||||
ASSERT_FALSE(robot.initParam("robot_description_wim"));
|
||||
SUCCEED();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// Calling ros::init(), just to remove unwanted args from command-line.
|
||||
ros::init(argc, argv, "test", ros::init_options::AnonymousName);
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
g_argc = argc;
|
||||
g_argv = argv;
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
<launch>
|
||||
<param name="robot_description" textfile="$(find urdf)/test/test_robot.urdf" />
|
||||
|
||||
<!-- args: path, urdf file, robot name, root name, #joints, #links-->
|
||||
<test test-name="robot_model_parser_test" pkg="urdf" type="test_urdf_parser" args="$(find urdf) test_robot.urdf r2d2 dummy_link 16 17" />
|
||||
|
||||
<test test-name="robot_model_parser_test_no_visual" pkg="urdf" type="test_urdf_parser" args="$(find urdf) no_visual.urdf no_visual link1 0 1" />
|
||||
<test test-name="robot_model_parser_test_one_link" pkg="urdf" type="test_urdf_parser" args="$(find urdf) one_link.urdf one_link link1 0 1" />
|
||||
<test test-name="robot_model_parser_test_two_links" pkg="urdf" type="test_urdf_parser" args="$(find urdf) two_links_one_joint.urdf two_links_one_joint link1 1 2" />
|
||||
|
||||
<!-- Cases expected not to parse correctly only get filename information (path, urdf file) -->
|
||||
<test test-name="robot_model_parser_test_fail_bracket" pkg="urdf" type="test_urdf_parser" args="$(find urdf) fail_pr2_desc_bracket.urdf" />
|
||||
<test test-name="robot_model_parser_test_fail_joint_mismatch" pkg="urdf" type="test_urdf_parser" args="$(find urdf) fail_three_links_one_joint.urdf" />
|
||||
<test test-name="robot_model_parser_test_fail_double_joint" pkg="urdf" type="test_urdf_parser" args="$(find urdf) fail_pr2_desc_double_joint.urdf" />
|
||||
<test test-name="robot_model_parser_test_fail_loop" pkg="urdf" type="test_urdf_parser" args="$(find urdf) fail_pr2_desc_loop.urdf" />
|
||||
<test test-name="robot_model_parser_test_fail_no_filename" pkg="urdf" type="test_urdf_parser" args="$(find urdf) fail_pr2_desc_no_filename_in_mesh.urdf" />
|
||||
<test test-name="robot_model_parser_test_fail_no_joint" pkg="urdf" type="test_urdf_parser" args="$(find urdf) fail_pr2_desc_no_joint2.urdf" />
|
||||
<test test-name="robot_model_parser_test_fail_two_trees" pkg="urdf" type="test_urdf_parser" args="$(find urdf) fail_pr2_desc_two_trees.urdf" />
|
||||
</launch>
|
|
@ -1,19 +0,0 @@
|
|||
<?xml verison="1.0"?>
|
||||
<robot name="two_links_one_joint">
|
||||
<link name="link1">
|
||||
<inertial>
|
||||
<mass value="1"/>
|
||||
<inertia ixx="1" iyy="1" izz="1" ixy="0" ixz="0" iyz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<link name="link2">
|
||||
<inertial>
|
||||
<mass value="1"/>
|
||||
<inertia ixx="1" iyy="1" izz="1" ixy="0" ixz="0" iyz="0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
<joint name="joint12" type="fixed">
|
||||
<parent link="link1"/>
|
||||
<child link="link2"/>
|
||||
</joint>
|
||||
</robot>
|
|
@ -1,94 +0,0 @@
|
|||
/*********************************************************************
|
||||
* Software License Agreement (BSD License)
|
||||
*
|
||||
* Copyright (c) 2016, CITEC, Bielefeld University
|
||||
* 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.
|
||||
*********************************************************************/
|
||||
|
||||
/* Robert Haschke */
|
||||
|
||||
#ifndef URDF_URDFDOM_COMPATIBILITY_
|
||||
#define URDF_URDFDOM_COMPATIBILITY_
|
||||
|
||||
#define URDFDOM_HEADERS_MAJOR_VERSION @URDFDOM_HEADERS_MAJOR_VERSION@
|
||||
#define URDFDOM_HEADERS_MINOR_VERSION @URDFDOM_HEADERS_MINOR_VERSION@
|
||||
#define URDFDOM_HEADERS_REVISION_VERSION @URDFDOM_HEADERS_REVISION_VERSION@
|
||||
|
||||
// for Wily: maintain compatibility between urdfdom 0.3 and 0.4 (definining SharedPtr types)
|
||||
#if URDFDOM_HEADERS_MAJOR_VERSION == 0 && URDFDOM_HEADERS_MINOR_VERSION <= 4
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/weak_ptr.hpp>
|
||||
|
||||
#define URDF_TYPEDEF_CLASS_POINTER(Class) \
|
||||
class Class; \
|
||||
typedef boost::shared_ptr<Class> Class##SharedPtr; \
|
||||
typedef boost::shared_ptr<const Class> Class##ConstSharedPtr; \
|
||||
typedef boost::weak_ptr<Class> Class##WeakPtr
|
||||
|
||||
namespace urdf {
|
||||
URDF_TYPEDEF_CLASS_POINTER(Box);
|
||||
URDF_TYPEDEF_CLASS_POINTER(Collision);
|
||||
URDF_TYPEDEF_CLASS_POINTER(Cylinder);
|
||||
URDF_TYPEDEF_CLASS_POINTER(Geometry);
|
||||
URDF_TYPEDEF_CLASS_POINTER(Inertial);
|
||||
|
||||
URDF_TYPEDEF_CLASS_POINTER(Joint);
|
||||
URDF_TYPEDEF_CLASS_POINTER(JointCalibration);
|
||||
URDF_TYPEDEF_CLASS_POINTER(JointDynamics);
|
||||
URDF_TYPEDEF_CLASS_POINTER(JointLimits);
|
||||
URDF_TYPEDEF_CLASS_POINTER(JointMimic);
|
||||
URDF_TYPEDEF_CLASS_POINTER(JointSafety);
|
||||
|
||||
URDF_TYPEDEF_CLASS_POINTER(Link);
|
||||
URDF_TYPEDEF_CLASS_POINTER(Material);
|
||||
URDF_TYPEDEF_CLASS_POINTER(Mesh);
|
||||
URDF_TYPEDEF_CLASS_POINTER(Sphere);
|
||||
URDF_TYPEDEF_CLASS_POINTER(Visual);
|
||||
|
||||
URDF_TYPEDEF_CLASS_POINTER(ModelInterface);
|
||||
}
|
||||
|
||||
#undef URDF_TYPEDEF_CLASS_POINTER
|
||||
|
||||
#else // urdfdom <= 0.4
|
||||
|
||||
#include <urdf_model/types.h>
|
||||
#include <urdf_world/types.h>
|
||||
|
||||
namespace urdf {
|
||||
typedef std::shared_ptr<ModelInterface> ModelInterfaceSharedPtr;
|
||||
typedef std::shared_ptr<const ModelInterface> ModelInterfaceConstSharedPtr;
|
||||
typedef std::weak_ptr<ModelInterface> ModelInterfaceWeakPtr;
|
||||
}
|
||||
|
||||
#endif // urdfdom > 0.4
|
||||
|
||||
#endif // URDF_URDFDOM_COMPATIBILITY_
|
|
@ -1,76 +0,0 @@
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Changelog for package urdf_parser_plugin
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
1.12.9 (2017-04-26)
|
||||
-------------------
|
||||
|
||||
1.12.8 (2017-03-27)
|
||||
-------------------
|
||||
* add Chris and Shane as maintainers (`#184 <https://github.com/ros/robot_model/issues/184>`_)
|
||||
* Contributors: William Woodall
|
||||
|
||||
1.12.7 (2017-01-26)
|
||||
-------------------
|
||||
|
||||
1.12.6 (2017-01-04)
|
||||
-------------------
|
||||
* Now using ``urdf::*ShredPtr`` instead of ``boost::shared_ptr`` (`#144 <https://github.com/ros/robot_model/issues/144>`_)
|
||||
* Contributors: Jochen Sprickerhof
|
||||
|
||||
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)
|
||||
-------------------
|
||||
|
||||
1.11.8 (2015-09-11)
|
||||
-------------------
|
||||
|
||||
1.11.7 (2015-04-22)
|
||||
-------------------
|
||||
|
||||
1.11.6 (2014-11-30)
|
||||
-------------------
|
||||
|
||||
1.11.5 (2014-07-24)
|
||||
-------------------
|
||||
|
||||
1.11.4 (2014-07-07)
|
||||
-------------------
|
||||
* moving to new dependency for urdfdom and urdfdom_headers. https://github.com/ros/rosdistro/issues/4633
|
||||
* Contributors: Tully Foote
|
||||
|
||||
1.11.3 (2014-06-24)
|
||||
-------------------
|
||||
* update usage of urdfdom_headers for indigo/trusty
|
||||
* Contributors: William Woodall
|
||||
|
||||
1.11.2 (2014-03-22)
|
||||
-------------------
|
||||
|
||||
1.11.1 (2014-03-20)
|
||||
-------------------
|
||||
|
||||
1.11.0 (2014-02-21)
|
||||
-------------------
|
||||
|
||||
1.10.18 (2013-12-04)
|
||||
--------------------
|
||||
* add DEPENDS for kdl_parser
|
||||
* Contributors: Ioan Sucan
|
||||
|
||||
1.10.16 (2013-11-18)
|
||||
--------------------
|
||||
|
||||
1.10.15 (2013-08-17)
|
||||
--------------------
|
|
@ -1,13 +0,0 @@
|
|||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(urdf_parser_plugin)
|
||||
|
||||
find_package(catkin REQUIRED)
|
||||
find_package(urdfdom_headers REQUIRED)
|
||||
|
||||
catkin_package(
|
||||
INCLUDE_DIRS include
|
||||
DEPENDS urdfdom_headers
|
||||
)
|
||||
|
||||
install(DIRECTORY include/${PROJECT_NAME}/
|
||||
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
|
|
@ -1,62 +0,0 @@
|
|||
/*********************************************************************
|
||||
* 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 */
|
||||
|
||||
#ifndef URDF_PARSER_PLUGIN_H
|
||||
#define URDF_PARSER_PLUGIN_H
|
||||
|
||||
#include <urdf/urdfdom_compatibility.h>
|
||||
|
||||
namespace urdf
|
||||
{
|
||||
|
||||
/** \brief Base class for URDF parsers */
|
||||
class URDFParser
|
||||
{
|
||||
public:
|
||||
URDFParser()
|
||||
{
|
||||
}
|
||||
virtual ~URDFParser()
|
||||
{
|
||||
}
|
||||
|
||||
/// \brief Load Model from string
|
||||
virtual urdf::ModelInterfaceSharedPtr parse(const std::string &xml_string) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,23 +0,0 @@
|
|||
<package>
|
||||
<name>urdf_parser_plugin</name>
|
||||
<version>1.12.9</version>
|
||||
<description>
|
||||
This package contains a C++ base class for URDF parsers.
|
||||
</description>
|
||||
|
||||
<author email="isucan@gmail.com">Ioan Sucan</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/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>liburdfdom-headers-dev</build_depend>
|
||||
<run_depend>liburdfdom-headers-dev</run_depend>
|
||||
|
||||
</package>
|
Loading…
Reference in New Issue