4 Copyright (c) 2016, Allgeyer Tobias, Aumann Florian, Borella Jocelyn, Hutmacher Robin, Karrenbauer Oliver, Marek Felix, Meissner Pascal, Trautmann Jeremias, Wittenbeck Valerij 8 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 10 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 12 2. 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. 14 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 16 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 HOLDER 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. 28 from geometry_msgs.msg
import Pose, Point, Quaternion, Twist
29 from asr_msgs.msg
import AsrAttributedPointCloud, AsrAttributedPoint
33 Generate sample pointcloud using normal distribution for defined accumulation 36 This calls is adapted from Ralfs NBV Test class. 40 """ adapted from MathHelper in NBV """ 42 for i
in xrange(len(mean)):
43 result.append(np.random.normal(mean[i], standard_deviaton[i]))
47 """ adapted from MathHelper in NBV """ 49 return tf.transformations.quaternion_from_euler(random_angles[0],
57 outcomes=[
'succeeded',
'aborted'],
58 output_keys=[
'object_pointcloud'])
62 pcl = AsrAttributedPointCloud()
66 hp.append([16.0, 16.0, 0.98])
67 hp.append([25.0, 11.0, 1.32])
69 hp.append([1.916, 22.485, 1.0])
71 object_type_names = [
'Smacks']
72 for idx
in xrange(len(hp)):
73 for cnt
in xrange(sample_size):
77 element = AsrAttributedPoint()
79 pose.orientation = Quaternion(*random_quaternion)
80 pose.position = Point(*random_vector)
81 element.type =
'Smacks' 83 pcl.elements.append(element)
85 userdata.object_pointcloud = pcl
def get_random_quaternion(self)
def execute(self, userdata)
def get_random_vector(self, mean, standard_deviaton)