I am currently working on a project utilizing ROS Noetic and MoveIt for robotic arm path planning. I have a robot arm that has to pick up items from between shelves on its left and right side. However, when it is moving from the left to the right shelf, I want to force it to rotate in the direction close to its body EVERYTIME.

I understand that MoveIt typically employs SLERP (Spherical Linear Interpolation) for quaternion interpolation, aiming for the shortest rotational path to reach a target pose.

However, I would like to impose a task constraint for the robot to prioritize the "inward rotation" rather than going in the shortest rotational path. What would be the best approach to implement this constraint?

Here are my current considerations:

  • Utilize Approximated Constraint Manifold: I'm thinking about using the Approximated Constraint Manifold approach as documented by MoveIt. This would involve creating a database of constraints and loading it whenever this specific customization is needed.
  • Send a Constraint Message in ROS: Another idea is to send a constraint message through ROS when this customization is needed, signaling the system to alter its path planning strategy.
  • Modify the SLERP Algorithm in MoveIt: I am also contemplating directly modifying the SLERP algorithm used in MoveIt, although I am uncertain about the best way to approach this modification. I would greatly appreciate any advice or insights into these methods or suggestions for alternative approaches.
  • $\begingroup$ Which version of ros are you using? The ompl path planners in ros do general path planning between two arbitrary poses, but this flexibility is often not needed to solve a particular problem. Please edit your post to provide more detail about the specific problem you are trying to solve. $\endgroup$
    – Mike973
    Commented Dec 31, 2023 at 15:23
  • $\begingroup$ @Mike973 I am using ROS Noetic and I have added a bit more context in my post. Thank you. In terms of the flexibility of ompl path planner, what other options are you suggesting for more specific path planner? Because right now it seems that I would use the "general" path planner and impose some constraints onto it. $\endgroup$
    – Steven Oh
    Commented Jan 1 at 1:29

1 Answer 1


I believe what you are confusing two different levels of operations.

There are constraint based motion planning such as


Which is I think what you're looking for which can be configured to keep an end effector upright or any other constraint your want to apply.

This is very different than changing the implementation of SLERP. SLERP is a very low level algorithm for just doing interpolation between two orientations.

In most scenarios the planned sequences of positions should be dense enough such that the interpolation between points in the motions should not risk violating your constraints. If the interpolation is at risk of doing that you should probably make sure that the planner is creating a denser trajectory to be more confident it doesn't violate your constraints.

  • $\begingroup$ Thank you for your comment, but the link you attached does not work... $\endgroup$
    – Steven Oh
    Commented Jan 1 at 1:31
  • $\begingroup$ try this one: moveit.picknik.ai/main/doc/how_to_guides/… $\endgroup$
    – cst0
    Commented Jan 1 at 13:44
  • $\begingroup$ Fixed link to the new branch name $\endgroup$
    – Tully
    Commented Jan 1 at 18:36
  • $\begingroup$ @Tully thank you for your answer. I have added a bit more details in my post but essentially I want to prioritize one direction of rotation over the other to reach its target orientation. Do you have any advice on setting constraints for this specific problem? $\endgroup$
    – Steven Oh
    Commented Jan 4 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.