21 from simple_moveit_interface
import *
24 def gen_pose(frame_id="/odom_combined", pos=[0,0,0], euler=[0,0,0]):
26 pose.header.frame_id = frame_id
27 pose.header.stamp = rospy.Time.now()
28 pose.pose.position.x, pose.pose.position.y, pose.pose.position.z = pos
29 pose.pose.orientation.x, pose.pose.orientation.y, pose.pose.orientation.z, pose.pose.orientation.w = quaternion_from_euler(*euler)
32 if __name__ ==
'__main__':
33 rospy.init_node(
'spawn_grasp_object')
34 while rospy.get_time() == 0.0:
pass 36 psi = get_planning_scene_interface()
40 object_name =
"pringles" 41 pose =
gen_pose(frame_id=
"base_footprint", pos=[-0.7, 0.5, 1.05], euler=[0, 0, 0])
42 filename = roslib.packages.get_pkg_dir(
'cob_grasp_generation')+
'/files/meshes/'+object_name+
'.stl' 44 psi.add_box(object_name, pose, size=(0.1, 0.1, 0.1))
def gen_pose(frame_id="/odom_combined", pos=[0, euler=[0)