acceptancetest_ros.py
Go to the documentation of this file.
1 # -*- coding: utf-8 -*-
2 
3 # Software License Agreement (BSD License)
4 #
5 # Copyright (c) 2014, TORK (Tokyo Opensource Robotics Kyokai Association)
6 # All rights reserved.
7 #
8 # Redistribution and use in source and binary forms, with or without
9 # modification, are permitted provided that the following conditions
10 # are met:
11 #
12 # * Redistributions of source code must retain the above copyright
13 # notice, this list of conditions and the following disclaimer.
14 # * Redistributions in binary form must reproduce the above
15 # copyright notice, this list of conditions and the following
16 # disclaimer in the documentation and/or other materials provided
17 # with the distribution.
18 # * Neither the name of TORK. nor the
19 # names of its contributors may be used to endorse or promote products
20 # derived from this software without specific prior written permission.
21 #
22 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 # POSSIBILITY OF SUCH DAMAGE.
34 
35 import rospy
36 
37 from hironx_ros_bridge.testutil.abst_acceptancetest import AbstAcceptanceTest
38 
39 
41 
42  def __init__(self, robot_client):
43  '''
44  @type robot_client: hironx_ros_bridge.ros_client.ROS_Client
45  '''
46  self._robotclient = robot_client
47 
48  def go_initpos(self, default_task_duration=7.0):
49  self._robotclient.go_init(task_duration = default_task_duration)
50 
51  def set_joint_angles(self, joint_group, joint_angles, msg_tasktitle=None,
52  task_duration=7.0, do_wait=True):
53  '''
54  @see: AbstAcceptanceTest.move_armbyarm_impl
55  '''
56  rospy.loginfo("'''{}'''".format(msg_tasktitle))
57  self._robotclient.set_joint_angles_deg(
58  joint_group, joint_angles, task_duration, do_wait)
59 
60  def set_pose(self, joint_group, posision, rpy, msg_tasktitle=None,
61  task_duration=7.0, do_wait=True, ref_frame_name=None):
62  '''
63  @see: AbstAcceptanceTest.set_pose
64  '''
65  rospy.loginfo('ROS {}'.format(msg_tasktitle))
66  self._robotclient.set_pose(joint_group, posision, rpy, task_duration,
67  do_wait, ref_frame_name)
68 
70  self, joint_group, dx=0, dy=0, dz=0, dr=0, dp=0, dw=0,
71  msg_tasktitle=None, task_duration=7.0, do_wait=True):
72  rospy.logerr('AcceptanceTestROS; set_pose_relative is not implemented yet')
73  pass
def set_pose_relative(self, joint_group, dx=0, dy=0, dz=0, dr=0, dp=0, dw=0, msg_tasktitle=None, task_duration=7.0, do_wait=True)
def set_pose(self, joint_group, posision, rpy, msg_tasktitle=None, task_duration=7.0, do_wait=True, ref_frame_name=None)
def set_joint_angles(self, joint_group, joint_angles, msg_tasktitle=None, task_duration=7.0, do_wait=True)


hironx_ros_bridge
Author(s): Kei Okada , Isaac I.Y. Saito
autogenerated on Mon Feb 28 2022 23:45:15