39 from moveit_commander
import RobotCommander, roscpp_initialize, roscpp_shutdown
40 from moveit_msgs.msg
import RobotState, Constraints
41 from geometry_msgs.msg
import Pose
43 if __name__==
'__main__':
46 rospy.init_node(
'moveit_py_demo', anonymous=
True)
48 robot = RobotCommander()
52 a.set_start_state(RobotState())
55 print a.get_current_pose()
59 waypoints.append(a.get_current_pose().pose)
63 wpose.position.x = wpose.position.x + 0.1
64 waypoints.append(wpose)
67 wpose.position.z -= 0.10
68 waypoints.append(wpose)
71 wpose.position.y += 0.05
72 waypoints.append(wpose)
74 plan, fraction = a.compute_cartesian_path(waypoints, 0.01, 0.0, path_constraints=c)
75 print 'Plan success percent: ', fraction
def roscpp_initialize(args)