ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ur3e: planning infinite motions for wrist_3: how?

asked 2021-10-21 01:47:19 -0600

aip gravatar image

updated 2022-03-25 17:30:24 -0600

lucasw gravatar image

I'm trying to get UR3e to work with Move it. I want to rotate wrist3 infinitely clockwise like the movement of tightening a screw, but if I define the posture using a quaternion, I can not determine clockwise and counterclockwise rotation. If you have any good ideas, please let me know.

At the moment, 180 degree rotation is defined as follows. pose_goal.orientation is the pose seen from the base coordinate system. '''

#180degree
pose_goal = move_group.get_current_pose().pose
pose_goal.position.y += 0.002
# pose_goal.orientation.w = 0.707106
# pose_goal.orientation.x = 0
# pose_goal.orientation.y = 0
# pose_goal.orientation.z = 0.707106

q = quaternion_from_euler(0, 0, 1.570796327)
pose_goal.orientation.w = q[3]
pose_goal.orientation.x = q[0]
pose_goal.orientation.y = q[1]
pose_goal.orientation.z = q[2]

move_group.set_pose_target(pose_goal)
plan = move_group.go(wait=True)
move_group.stop()
current_pose = move_group.get_current_pose().pose

return all_close(pose_goal, current_pose, 0.01)

'''image description

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-10-21 03:05:30 -0600

gvdhoorn gravatar image

updated 2021-10-21 03:13:32 -0600

I want to rotate wrist3 infinitely clockwise like the movement of tightening a screw

MoveIt is a position control framework (nuance: by default, with the default settings, without using work-arounds/tricks/etc).

"Infinite motion" in one direction is not possible. You can set a goal which is very far away -- in joint space -- but not with a Cartesian pose (as MoveIt has no concept of a "turn number" or posture, as many industrial robot control systems do, so it will always plan the shortest path (in joint space) to the goal position).

Additionally, infinite motions on wrist_3 are not supported by the URDF, unless you have modified it. All joint position limits are set to +- 2 PI (except the elbow_joint).

I'm not saying what you want (ie: screw motions) can't be done with ur_robot_driver, but probably not with MoveIt by planning vanilla pose goals. As a work-around / alternative approach:

  • perhaps you could put the EEF in position with regular MoveIt planning, then
  • switch to a velocity based controller
  • use that to rotate just wrist_3 in the way you want and when you're done
  • switch back to the default JointTrajectoryController (so MoveIt can be used again)

Alternatively: a JointGroupPositionController could be used with a setpoint (in joint space) which is very far away. You'd have to make sure to update the joint limits of wrist_3 though.

edit flag offensive delete link more

Comments

I want to change wrist_3 of urdf so that it can rotate infinitely. How should I change it?

you could either configure very large joint position limits, or change the joint's type to continuous (from revolute).

Note: this has not been tested AFAIK. So I can't guarantee this works.

Also, is it possible to create a program that does not use moveit by another node to perform infinite rotation as I want?

of course. In the end, the "only thing" MoveIt does for you is produce a JointTrajectory. Any program could be used to create such a message. Then submit it as a FollowJointTrajectory action goal to the driver's action server and that would be it.

But note that this will not solve your problem immediately: a JointTrajectory is still a position-based encoding of a trajectory. It does not support "infinite motion" directly.

gvdhoorn gravatar image gvdhoorn  ( 2021-10-21 03:19:11 -0600 )edit

Thank you for teaching me so kindly.

But I'm ignorant about ROS, so I can't imagine how to do what you've been taught. I would like to know how you can understand these and where you can learn them.

aip gravatar image aip  ( 2021-10-21 03:26:52 -0600 )edit

If you're just starting out, I would recommend to try and first get a working knowledge of ROS. Complete the tutorials, perhaps find a book (or two). Complete the urdf tutorials, then do the MoveIt tutorials.

Asking questions is always a good thing to do.

gvdhoorn gravatar image gvdhoorn  ( 2021-10-21 03:33:27 -0600 )edit

I appreciate your help. I'll do my best.

aip gravatar image aip  ( 2021-10-21 03:42:16 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2021-10-21 01:47:19 -0600

Seen: 278 times

Last updated: Oct 21 '21