# normal/orthogonal orientation to a surface

Hello!

(This can be a bit noob question, but im confused, so i ask)

Lets say I have a surface, a wall, described by YZ points of the world coordinate frame.

I want my robot EEF to go to a desired XYZ position, and *its orientation can be anything* that is normal/ortogonal to the aforementioned wall.

Is it OK to describe this constraint by giving for the desired points the following orientation?

wpoint.orientation.x = 0
wpoint.orientation.y = 0
wpoint.orientation.z = 0
wpoint.orientation.w = 1


I have a weird feeling, that this is not the right way to do it.

This way i have the feeling that the ROLL rotation (e.g. around x axis) is limited, even though it could be anything between 0-2pi. I hope i wrote this clearly.

What is the right way to solve this?

edit retag close merge delete

Sort by » oldest newest most voted

If I can just summarise what you're trying to achieve, you want the end effector to point directly at the wall but you don't care what the roll along the axis of the end effector is?

Are you using MoveIt to control your arm?

The problem here is that you have to fully define the position of the end effector in order to pass a planning request to MoveIt as far as I know. So you can't give it a partially defined EE pose. The orientation you have given in your question is the identity quaternion equivalent to an identity rotation matrix, this is setting the orientation of the end effector so it's frame of reference is at the same angle as the world frame of reference.

There is a slightly inelegant trick that I've used to pickup square boxes (where there are 4 orientations that are possible). You simply plan several different trajectories with the end effector at several different roll angles and pick the shortest/fastest trajectory. In your case if you picked 8 different angles then you should be quite close to the shortest trajectory, if you don't mind you planning time being 8 times longer!

Hope I've answered the right question for you.

more

Hello @PeteBlackerThe3rd. Yes, you did well understood my problem :) Your answer was super informative!! Thank you for the information!

( 2018-09-27 13:08:27 -0500 )edit

@PeteBlackerThe3rd May i ask, why exactly 8 angles are enough? and how would you choose these roll angles? Thank you!

( 2018-09-27 13:36:38 -0500 )edit
1

I was thinking that if you pick 8 angles evenly distributed from 0-360 degrees than you'll be at worst 22 degrees away from the easiest angle. It's a trade off, the more angles you try the closer to ideal your solution will be at the expense of more planning time.

( 2018-09-28 09:12:07 -0500 )edit