4 Copyright (c) 2016, Aumann Florian, Heller Florian, Hutmacher Robin, Meissner Pascal, Stoeckle Patrick, Stroh Daniel 7 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 9 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 11 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. 13 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. 15 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. 18 from asr_msgs.msg
import AsrObject
19 from asr_recognizer_prediction_ism.srv
import FindScenes, FindScenesRequest
25 req = FindScenesRequest()
31 obj.poseEstimation.pose.position.x = -0.895672837120925
32 obj.poseEstimation.pose.position.y = 0.876364548041306
33 obj.poseEstimation.pose.position.z = 0.675630282005366
34 obj.poseEstimation.pose.orientation.w = 0.0438159930101303
35 obj.poseEstimation.pose.orientation.x = -0.00274503713451766
36 obj.poseEstimation.pose.orientation.y = -0.673982743489664
37 obj.poseEstimation.pose.orientation.z = 0.737441445137044
40 obj1.type =
'PlateDeep' 41 obj1.poseEstimation.pose.position.x = -0.884891287861248
42 obj1.poseEstimation.pose.position.y = 0.639571172744163
43 obj1.poseEstimation.pose.position.z = 0.660505174542679
44 obj1.poseEstimation.pose.orientation.w = 0.650782548685679
45 obj1.poseEstimation.pose.orientation.x = -0.64554621902581
46 obj1.poseEstimation.pose.orientation.y = -0.27131992194386
47 obj1.poseEstimation.pose.orientation.z = 0.293492169203933
53 rospy.wait_for_service(
'/rp_ism_node/find_scenes', timeout=5)
54 except rospy.exceptions.ROSException, e:
55 rospy.loginfo(
'Could not reach service')
58 find_scenes = rospy.ServiceProxy(
'/rp_ism_node/find_scenes',
60 print find_scenes(objects)
61 except rospy.ServiceException, e:
62 rospy.loginfo(
'Could not find scene')
64 if __name__ ==
'__main__':
67 except rospy.ROSInterruptException:
pass