39 from moveit_commander
import (
41 PlanningSceneInterface,
45 from geometry_msgs.msg
import PoseStamped
47 if __name__ ==
"__main__":
50 rospy.init_node(
"moveit_py_demo", anonymous=
True)
57 scene.remove_world_object(
"pole")
58 scene.remove_world_object(
"table")
59 scene.remove_world_object(
"part")
63 p.header.frame_id = robot.get_planning_frame()
64 p.pose.position.x = 0.7
65 p.pose.position.y = -0.4
66 p.pose.position.z = 0.85
67 p.pose.orientation.w = 1.0
68 scene.add_box(
"pole", p, (0.3, 0.1, 1.0))
70 p.pose.position.y = -0.2
71 p.pose.position.z = 0.175
72 scene.add_box(
"table", p, (0.5, 1.5, 0.35))
74 p.pose.position.x = 0.6
75 p.pose.position.y = -0.7
76 p.pose.position.z = 0.5
77 scene.add_box(
"part", p, (0.15, 0.1, 0.3))
82 robot.right_arm.pick(
"part")
def roscpp_initialize(args)