Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'flange' frames to all robot models #213

Merged
merged 1 commit into from May 19, 2017

Conversation

Projects
None yet
2 participants
@gavanderhoorn
Copy link
Member

commented May 6, 2017

As per subject. Commit comment from 71b7ae9:

Similar to 'tool0', but without the orientation change (to make Z+ parallel to X+).

The 'flange' frame is intended as attachment point for EEFs, while 'tool0' is meant to be a immutable frame that always encodes an "all-zeros tool centre point" configuration.

Both 'tool0' and 'flange' should not be changed.

There should be no functional changes.

Composite URDFs that attach EEFs to tool0 should be unaffected: flange is inserted between link_6 (or link_5) and tool0 which maintains its original orientation. In addition, since flange is connected to both by a fixed joint, no kinematics changes are required.


Edit: updated the commit msg:

The 'flange' frame is intended to function as an 'attachment point' for EEF xacros. In order to easily swap robot models, it is beneficial for such attachment points -- typically the last link in a robot xacro -- to have a consistent orientation.

'flange' is defined as always having x+ pointing out of the (physical) flange link. For robots that happen to have the link-local coordinate frame of their last link in their zero pose already aligned with REP-103 conventions (x+ forward, y+ left, z+ up), 'flange' will be an identity transform. In other cases, 'flange' includes appropriate rotations to orient x+ such that it again follows the above described convention.

Note that the above does not mean that 'flange' will always be world aligned, only that x+ will always point away from the (physical) flange / last link of the robot model. Rotations and translations will impact 'flange's pose just as they do other robot links.

It's sibling frame, 'tool0', is similar, but this frame is always located and oriented such that it corresponds to whatever is configured on the robot controller as an 'all zeros' tool frame.

Both 'tool0' and 'flange' are to be considered immutable frames, and are not intended to be changed or updated by consumers of xacro macros including them.

@gavanderhoorn

This comment has been minimized.

Copy link
Member Author

commented May 6, 2017

I intend to follow up with a (modified) REP that takes the current (fragmented) documentation on the base and tool0 frames and extends it to include the new flange frame.

@gavanderhoorn gavanderhoorn force-pushed the add_flange branch from 71b7ae9 to 2bdc85e May 6, 2017

@shaun-edwards

This comment has been minimized.

Copy link
Member

commented May 11, 2017

Does the flange frame have a common orientation? Is it always Z out?

@gavanderhoorn

This comment has been minimized.

Copy link
Member Author

commented May 11, 2017

Basically, flange is meant as an attachment point in the urdf/xacro. It is what many ppl now (ab)use tool0 for, but without the awkward z-pointing-out-of-the-last-link problem, and associated 'fixup' rotations I see in composite xacros that try to attach an EEF model to it.

flange follows regular ROS conventions: x forward, y to the left, z up. tool0 then adds the rotations necessary to orient that frame so it corresponds to whatever the mfg ctrlr has.

The point of introducing this frame is to separate responsibilities: flange is the common attachment point that (I propose) we add to all our models and to which EEF models should be attached (still using a fixed joint), and tool0 should always correspond to an 'all-zeros' tool frame (and thus should never be changed, users should always add new frames that correspond to whatever toolframe they really want to / need to use).

A second goal is to add some abstractions to our kinematic chains: base and tool0 already did that, now flange adds another abstraction.

@shaun-edwards

This comment has been minimized.

Copy link
Member

commented May 11, 2017

I agree with your reasoning, but wouldn't flange be more useful if the orientation could be counted on across robots? I've had a lot of trouble swapping arms because the X-forward convention relies on the zero position of the robot.

@gavanderhoorn

This comment has been minimized.

Copy link
Member Author

commented May 11, 2017

The idea of flange is indeed to have a frame that always has the same orientation.

I'm not too enthousiastic about it, but we could perhaps require that X+ should always be aligned such that it is perpendicular to the (main?) surface of the end-of-arm.

For some robots that will mean that tool0 will then perhaps undo some of the rotations (depending on whether flange and tool0 are parent-child or siblings of course), but it would at least force ROS conventions on it and keep things interchangable.

@shaun-edwards

This comment has been minimized.

Copy link
Member

commented May 11, 2017

We could say the flange should be located at the center of the mounting plate (center of the bolt pattern) with the x-axis pointing out (in the direction of the end-effector). The only ambiguity is the rotation about the x-axis.

@gavanderhoorn

This comment has been minimized.

Copy link
Member Author

commented May 11, 2017

We could say the flange should be located at the center of the mounting plate (center of the bolt pattern) with the x-axis pointing out (in the direction of the end-effector)

isn't that basically what I just wrote ? :)

The only ambiguity is the rotation about the x-axis.

yes. If we additionally add that Z+ should be pointing 'up' (ie: towards the sky / away from the ground) we should avoid any ambiguity given that ROS uses a right-handed system.

@gavanderhoorn

This comment has been minimized.

Copy link
Member Author

commented May 12, 2017

Thanks for the review.

I'm going to update flange on the two M-430iA variants and then merge the PR if I receive no further comments.

support: add 'flange' frame.
The 'flange' frame is intended to function as an 'attachment point' for
EEF xacros. In order to easily swap robot models, it is beneficial for
such attachment points -- typically the last link in a robot xacro -- to
have a consistent orientation.

'flange' is defined as always having x+ pointing out of the (physical)
flange link. For robots that happen to have the link-local coordinate
frame of their last link in their zero pose already aligned with REP-103
conventions (x+ forward, y+ left, z+ up), 'flange' will be an identity
transform. In other cases, 'flange' includes appropriate rotations to
orient x+ such that it again follows the above described convention.

Note that the above does not mean that 'flange' will *always* be world
aligned, only that x+ will always point away from the (physical) flange /
last link of the robot model. Rotations and translations will impact
'flange's pose just as they do other robot links.

It's sibling frame, 'tool0', is similar, but this frame is *always*
located and oriented such that it corresponds to whatever is configured on
the robot controller as an 'all zeros' tool frame.

Both 'tool0' and 'flange' are to be considered immutable frames, and are
not intended to be changed or updated by consumers of xacro macros
including them.

@gavanderhoorn gavanderhoorn force-pushed the add_flange branch from 2bdc85e to aba7f6c May 18, 2017

@gavanderhoorn

This comment has been minimized.

Copy link
Member Author

commented May 18, 2017

@shaun-edwards: I've updated the definition of the frame, made tool0 not a child but a sibling (so both have the last link in the main chain of the robot as their parent) and fixed the orientation on the M-430iA variants (the only series that doesn't have link_5 / link_6 world aligned in its zero position).

flange will now always have x+ pointing away from the (physical) flange / last link of the robot. This should make it a good attachment point for EEF models, as this orientation should be identical across all supported robot series and variants.

@gavanderhoorn gavanderhoorn merged commit aba7f6c into indigo-devel May 19, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@gavanderhoorn gavanderhoorn deleted the add_flange branch May 19, 2017

@gavanderhoorn

This comment has been minimized.

Copy link
Member Author

commented May 19, 2017

Thanks for the review @shaun-edwards. 🍔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.