Skip to content

Commit

Permalink
A lot of changes. Related to ros#25 ros#15 ros#21 and ros#24.
Browse files Browse the repository at this point in the history
ros#25 first version of data collector

ros#15 and ros#21 usign a pr2 bag file downloaded from https://projects.csail.mit.edu/stata/downloads.php

ros#24 data collector is already prepared to handle dynamic transforms
  • Loading branch information
miguelriemoliveira committed May 20, 2019
1 parent fe369ca commit 44af5d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/urdf_parser_py/urdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

xmlr.start_namespace('urdf')

xmlr.add_type('topic_name', xmlr.SimpleElementType('topic', str))
xmlr.add_type('element_link', xmlr.SimpleElementType('link', str))
xmlr.add_type('element_xyz', xmlr.SimpleElementType('xyz', 'vector3'))

Expand Down Expand Up @@ -527,9 +528,8 @@ def __init__(self, horizontal=None, vertical=None):
xmlr.Element('vertical', RaySpecs, False)
])


class Sensor(xmlr.Object):
def __init__(self, name=None, update_rate=0.0, parent=None, camera=None, ray=None, origin=None, calibration_parent=None, calibration_child=None):
def __init__(self, name=None, update_rate=0.0, parent=None, camera=None, ray=None, origin=None, calibration_parent=None, calibration_child=None, topic=None):
self.aggregate_init()
self.name = name
self.parent = parent
Expand All @@ -539,6 +539,7 @@ def __init__(self, name=None, update_rate=0.0, parent=None, camera=None, ray=Non
self.origin = origin
self.calibration_parent = calibration_parent
self.calibration_child = calibration_child
self.topic = topic

def __get_camera(self):
"""Return the first camera or None."""
Expand Down Expand Up @@ -579,6 +580,7 @@ def __set_ray(self, ray):
xmlr.AggregateElement('ray', Ray),
xmlr.Element('calibration_parent', 'element_link', False),
xmlr.Element('calibration_child', 'element_link', False),
xmlr.Element('topic', 'topic_name', False),

])

Expand Down

0 comments on commit 44af5d5

Please sign in to comment.