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

Planning example with user-defined constraint available? #581

Closed
ndehio opened this issue Jan 25, 2021 · 5 comments
Closed

Planning example with user-defined constraint available? #581

ndehio opened this issue Jan 25, 2021 · 5 comments

Comments

@ndehio
Copy link

ndehio commented Jan 25, 2021

Where can I find a c++/python example that demonstrates how to use the OMPL planner?

For my specific use case with the panda robot, the planner should output a trajectory with a goal state that minimizes a custom, user-specified cost (or, in other words, that is feasible with respect to a custom, user-specified constraint). The goal state to be optimized will have a non-zero velocity.

I read the MoveIt tutorials, but it is not clear to me how to approach this problem exactly.
Thanks for your suggestions!

@tylerjw
Copy link
Member

tylerjw commented Jan 25, 2021

There is this tutorial PR: #518

That depends on this PR on moveit: moveit/moveit#2273

If that is what you are looking for you'll need to build moveit from source to follow that tutorial. It is not currently merged in because it is not passing CI. Currently, the CI failure may or may not be a result of this PR. We have not had time to yet figure it out unfortunatly.

@ndehio
Copy link
Author

ndehio commented Jan 25, 2021

Thanks for your quick answer.
This interesting PR-example imposes a path constraint:

pcm = moveit_msgs.msg.PositionConstraint()
...
path_constraints = moveit_msgs.msg.Constraints()
...
path_constraints.position_constraints.append(pcm)
...
move_group.set_path_constraints(path_constraints)

In my case, I want to impose a constraint on the goal state only. While approaching the target, the constraint will be violated. Is that possible?

(I will use a user-defined constraint.)

@ndehio
Copy link
Author

ndehio commented Jan 27, 2021

I will try to rephrase my question:

How can I plan a trajectory that ensures the feasibility of a user-defined constraint for at least one of the discrete steps?

@ndehio ndehio changed the title OMPL planning example available? Planning example with user-defined constraint available? Jan 27, 2021
@JafarAbdi
Copy link
Member

I'm not sure about the Python interface, but for the C++ one in the MotionPlanRequest you can set the goal_constraints

@ndehio
Copy link
Author

ndehio commented Feb 8, 2021

Thanks for your comments!

@ndehio ndehio closed this as completed Feb 8, 2021
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

No branches or pull requests

3 participants