20 self.
_move_client = SimpleActionClient(
"move_group", MoveGroupAction)
23 moveit_commander.roscpp_initialize(sys.argv)
24 group_name = moveit_commander.RobotCommander().get_group_names()[0]
25 group = moveit_commander.MoveGroupCommander(group_name)
29 self.
_goal.request.group_name = group_name
30 self.
_goal.request.max_velocity_scaling_factor = 0.1
31 self.
_goal.request.max_acceleration_scaling_factor = 0.1
32 self.
_goal.request.start_state.is_diff =
True
34 goal_constraint = Constraints()
35 joint_values = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6]
36 joint_names = group.get_active_joints()
37 for i
in range(len(joint_names)):
38 joint_constraint = JointConstraint()
39 joint_constraint.joint_name = joint_names[i]
40 joint_constraint.position = joint_values[i]
41 joint_constraint.weight = 1.0
42 goal_constraint.joint_constraints.append(joint_constraint)
44 self.
_goal.request.goal_constraints.append(goal_constraint)
45 self.
_goal.planning_options.planning_scene_diff.robot_state.is_diff =
True