MoveIt only moves one joint
I am facing issues when trying to move more than one joint. I am following the MoveIt tutorial for Python but adding more than one joint, in example:
group_variable_values = group.get_current_joint_values()
# shoulder_pan_joint
group_variable_values[0] = 0.0
#shoulder_lift_joint
group_variable_values[1] = 0.0
#elbow_joint
group_variable_values[2] = 0.0
#wrist_1_joint
group_variable_values[3] = 0.0
#wrist_2_joint
group_variable_values[4] = 2.57
#wrist_3_joint
group_variable_values[5] = -3.14
group.set_joint_value_target(group_variable_values)
plan = group.plan()
rospy.sleep(5)
group.execute(plan)
I have looked at https://answers.ros.org/question/2737... and it seems I am trying to accomplish the same goal but the answer seems to be my current implementation (unless there is an equivalent of move
in Python and I should not be using execute
)
It is probably worth noting I am using universal_robot library and the model of UR5. The group which I am modifying is group = moveit_commander.MoveGroupCommander("manipulator")
As it stands with the above implementation only one joint moves, I would like for all the joints to move. Is there something I am doing wrong in the above?