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 functions to set pick and place goal fields #1498

Merged
merged 8 commits into from
Jun 24, 2019
Merged

Conversation

mvieth
Copy link
Contributor

@mvieth mvieth commented Jun 10, 2019

Description

Add functions to set fields in the pick and place goals, namely place_eef and allow_gripper_support_collision. Also some minor formatting changes by clang-format.
See also issue #631

@mvieth mvieth requested a review from rhaschke as a code owner June 10, 2019 14:11
@welcome
Copy link

welcome bot commented Jun 10, 2019

Thanks for helping in improving MoveIt!

Copy link
Contributor

@BryceStevenWilley BryceStevenWilley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with suggested changes.

@BryceStevenWilley BryceStevenWilley added the awaits 2nd review one maintainer approved this request label Jun 12, 2019
Copy link
Contributor

@rhaschke rhaschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general I approve these changes as well.
@mvieth, please consider Bryce's comments and also add an appropriate python wrapper in wrap_python_move_group.cpp.
Unfortunately, clang-format requires to revert some of your formatting improvements.

@rhaschke
Copy link
Contributor

Having thought a little bit more about this PR, I suggest to remove the extra member variables and instead pass those flags as arguments to the corresponding constructGoal() and pick() / place() functions - providing the old hard-coded values as defaults. My reasoning for this is, that those flags usually will change from call to call. What do you think @BryceStevenWilley?

@BryceStevenWilley
Copy link
Contributor

I don't think those parameters should change every call. Whatever is providing the goals targets won't change it's transform math, so Place EEF shouldn't change. And, at least for every pick or every place, collision with support should also stay the same. But in general, I agree that less saved state in the class is better, so I'm okay with that implementation as well.

@mvieth
Copy link
Contributor Author

mvieth commented Jun 13, 2019

Maybe it would even make sense to expose the constructGoal() functions for the Pickup and Place Goals? There are more fields and options a user might want access to (e.g. attached_object_touch_links, minimize_object_distance, allowed_touch_objects), and making setter functions/optional arguments for all of them would not be so elegant. Instead, the goals could be optional arguments for the pick/place functions, so that a user could call the constructGoal()function, then change any option in the goal, and pass it on to pick/place.

@rhaschke
Copy link
Contributor

Maybe it would even make sense to expose the constructGoal()

I like this idea. Maybe the function names should become more descriptive if exposed, i.e. constructPickGoal and constructPlaceGoal.

@mvieth
Copy link
Contributor Author

mvieth commented Jun 16, 2019

Ok, I pushed the proposed changes. Looking forward to your feedback @rhaschke @BryceStevenWilley . I did not remove the setPlaceEEF() and setAllowGripperTouchSupport() functions yet because they do not conflict with the new pick() and place() functions, but could do so.

@rhaschke
Copy link
Contributor

I did not remove the setPlaceEEF() and setAllowGripperTouchSupport()

My original intention was to get rid off the extra state variables 😉
I pushed some extra commits to your PR branch to reflect my vision of this PR.
You can now decide whether to add those place_eef, allow_touching_support arguments to constructPickGoal and constructPlaceGoal.

@rhaschke rhaschke dismissed stale reviews from BryceStevenWilley and themself June 22, 2019 03:45

I addressed the remaining issues myself. Awaiting feedback.

@rhaschke rhaschke removed the awaits 2nd review one maintainer approved this request label Jun 22, 2019
@mvieth
Copy link
Contributor Author

mvieth commented Jun 23, 2019

I would change this line and the previous one to how they originally were, with goal.allow_gripper_support_collision = true (same for constructPlaceGoal).

You can now decide whether to add those place_eef, allow_touching_support arguments to constructPickGoal and constructPlaceGoal

I would say that's not necessary any more because a user could just use constructPickupGoal and change the place_eef and allow_gripper_support_collision fields in the goal before calling pick(PickupGoal)

@rhaschke
Copy link
Contributor

I would change this line and the previous one to how they originally were, with goal.allow_gripper_support_collision = true

I'm fine with this. Didn't noticed the original state.

Copy link
Contributor

@rhaschke rhaschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @mvieth seems to be happy with the current state, I can approve the PR in its present state.

Copy link
Contributor

@v4hn v4hn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve as long as someone cleans up the history before merging.

@rhaschke rhaschke merged commit 4fe1f64 into moveit:master Jun 24, 2019
@welcome
Copy link

welcome bot commented Jun 24, 2019

Congrats on getting your first MoveIt! pull request merged and improving open source robotics!

@v4hn
Copy link
Contributor

v4hn commented Jun 25, 2019 via email

v4hn pushed a commit to v4hn/moveit that referenced this pull request Mar 30, 2020
v4hn pushed a commit to v4hn/moveit that referenced this pull request Mar 31, 2020
v4hn pushed a commit to v4hn/moveit that referenced this pull request Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants