-
Notifications
You must be signed in to change notification settings - Fork 938
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
tool to generate constraint approximation databases #1253
Conversation
The flags are never checked anyway below, so it does not build without OpenMP at the moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this. Some minor comments. Is there a tutorial that should be updated?
moveit_core/kinematic_constraints/include/moveit/kinematic_constraints/utils.h
Show resolved
Hide resolved
I plan to extend the constraint manifold tutorial once I got an approval on the current design. I'm not sure where to document the structure for the Thanks for the feedback, I will address it later this week. |
moveit_planners/ompl/ompl_interface/src/generate_state_database.cpp
Outdated
Show resolved
Hide resolved
moveit_planners/ompl/ompl_interface/src/generate_state_database.cpp
Outdated
Show resolved
Hide resolved
moveit_planners/ompl/ompl_interface/src/generate_state_database.cpp
Outdated
Show resolved
Hide resolved
moveit_planners/ompl/ompl_interface/src/generate_state_database.cpp
Outdated
Show resolved
Hide resolved
moveit_planners/ompl/ompl_interface/src/generate_state_database.cpp
Outdated
Show resolved
Hide resolved
moveit_planners/ompl/ompl_interface/src/generate_state_database.cpp
Outdated
Show resolved
Hide resolved
moveit_planners/ompl/ompl_interface/src/generate_state_database.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Factoring out the parsing functions already improved readability a lot.
Please re-consider the remaining comment.
@v4hn Do you want to squash the cleanup commits into the first 4 commits? |
I will clean up the commit history and merge. |
In some situations, it makes sense to define Constraints via ros parameters to ease configuration or circumvent repeated definitions. A constraint can constructed from ROS parameters with the following structure: path_constraint: name: tool0_upright constraints: - type: orientation frame_id: world link_name: tool0 orientation: [0, 0, 0] tolerances: [0.01, 0.01, 3.15] weight: 1.0 - type: joint joint_name: pan_joint position: 0.0 tolerance: 1.0 weight: 1.0 - type: position frame_id: world link_name: tool0 target_offset: [.5,0,1.0] region: x: [0,2] y: [-2,2] z: [.5,2.5]
Previously, we only shipped a demo_construct_state_database.cpp that hard-coded all parameters for a specific setup. This work generalizes the code and provides a utility that can be configured via ROS parameters. Assuming a MoveIt configuration is running, an example launch file to use the utility might look like this: <launch> <node name="generate_state_database" pkg="moveit_planners_ompl" type="generate_state_database" output="screen"> <param name="use_current_scene" value="false"/> <param name="planning_group" value="arm"/> <remap from="~output_folder" to="move_group/constraint_approximations_path"/> <rosparam ns="constraints"> path_constraint: name: tool0_upright constraints: - type: orientation frame_id: world link_name: tool0 orientation: [0, 0, 0] tolerances: [0.01, 0.01, 3.15] weight: 1.0 </rosparam> </node> </launch>
d59e151
to
b08abe1
Compare
merged I'll try to get around to add the tutorial soon. |
This feature was on my todo list for quite some time now.
MoveIt provides some C++ demo code to generate constraint approximations.
These can be used for constraint path planning.
The demo is all hard-coded though and users had to copy&paste the code for their own use case.
This pull-request provides a way to describe constraints on the parameter server and applies the feature to configure a generic tool to generate the databases.
I'm open to change & move parts of this code if someone has a better proposal for where things should go.
Please look at the individual commits for more details.