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

Allow users to set planner_id and pipeline_id #48

Merged

Conversation

amalnanavati
Copy link
Contributor

Description

Currently, pymoveit2 implicitly uses the default pipeline_id and planner_id that the robot was configured with. However, for different motions, one may want to use different pipelines/planners. Hence, this PR allows users to configure those properties of the planning calls.

Testing

  • Launch the simulated panda arm with log_level info: ros2 launch panda_moveit_config ex_fake_control.launch.py log_level:=info
  • Have the robot move to a joint goal using the default planner. Verify in MoveGroup logs that it uses RRTConnect: ros2 run pymoveit2 ex_joint_goal.py --ros-args -p joint_positions:="[1.57, -1.57, 0.0, -1.57, 0.0, 1.57, 0.7854]"
  • Restore to initial joint positions: ros2 run pymoveit2 ex_joint_goal.py --ros-args -p joint_positions:="[0.0, -0.7853981633974483, 0.0, -2.356194490192345, 0.0, 1.5707963267948966, 0.7853981633974483]"
  • Have the robot move to a joint goal using a different planner. Verify in MoveGroup logs that it uses the specified planner (PRMstar): ros2 run pymoveit2 ex_joint_goal.py --ros-args -p joint_positions:="[1.57, -1.57, 0.0, -1.57, 0.0, 1.57, 0.7854]" -p planner_id:="PRMstarkConfigDefault"
  • Restore to initial positions.
  • Have the robot move to a joint goal using the default planner. Verify in MoveGroup logs that it uses RRTConnect: ros2 run pymoveit2 ex_pose_goal.py --ros-args -p position:="[0.25, 0.0, 1.0]" -p quat_xyzw:="[0.0, 0.0, 0.0, 1.0]" -p cartesian:=False
  • Restore to initial joint positions.
  • Have the robot move to a joint goal using a different planner. Verify in MoveGroup logs that it uses the specified planner (PRMstar): ros2 run pymoveit2 ex_pose_goal.py --ros-args -p position:="[0.25, 0.0, 1.0]" -p quat_xyzw:="[0.0, 0.0, 0.0, 1.0]" -p cartesian:=False -p planner_id:="PRMstarkConfigDefault"

@amalnanavati amalnanavati mentioned this pull request Feb 20, 2024
@AndrejOrsula
Copy link
Owner

Very good @amalnanavati! Thank you so much for your contribution. 🙂

@AndrejOrsula AndrejOrsula merged commit 8bf71ae into AndrejOrsula:devel Feb 27, 2024
1 check passed
AndrejOrsula added a commit that referenced this pull request Mar 6, 2024
* Add asynchronous planning and execution (#40)

* Add joint goal example for Kinova JACO2

* [WIP] Added execution cancellation and polling

* Switch to ExecuteTrajectory action

* [WIP] Goal cancellation is broken

* Added cancellation via topic publication

* Full cancellation example

* Need option for both move action and direct planning

* Created get_trajectory, so users of plan_async can easily get the result

* Reset last error code before action execution

Consider two cases, one where action server (either for execute or MoveGroup) is not available, and another where the action succeeds very fast. Both cases are currently indistinguishable from the client perspective, because they will request a goal, and then when they query the state it will be IDLE. This commit resolves that, because if the error code is set that means the action completed very fast, whereas if it is None that means the action did not complete.

* Reverted to original example

* Small fixes from rebase

* Update examples

* Update docstrings

* Update docstrings

* Addressed PR comments

* Ran pre-commit hook

* Addressed PR comments

* Fixed gripper interface

---------

Co-authored-by: Ethan K. Gordon <[email protected]>

* Add Path Constraints (#42)

* [WIP] Add ability to do path constraints

* [WIP] Change API to be more intelligible

* Allowed different orientation tolerances per axes

* Make change not breaking by adding float option

* Added parameterization option

* Updated set_pose_goal

* Rearranged parameterization to not be a breaking change

* Formatting changes form pre-commit

* Add orientation path constraint example

* Reused constraint creation code from goal constraints

* Pre-commit formatting fix

---------

Co-authored-by: Ethan Gordon <[email protected]>

* Added Async Forward/Inverse Kinematics (#43)

* [WIP] Add async service call for FK/IK analogous to planning

* Compute FK returns a list of post_stampeds

* Pre-commit formatting

* Added FK example

* Comment changes to orientation path constraint examples

* Added IK example

* Update examples/ex_fk.py

Co-authored-by: Andrej Orsula <[email protected]>

* Update examples/ex_ik.py

Co-authored-by: Andrej Orsula <[email protected]>

* Update moveit2.py

---------

Co-authored-by: Ethan Gordon <[email protected]>
Co-authored-by: Andrej Orsula <[email protected]>

* Allow users to set `planner_id` and `pipeline_id` (#48)

* Added set_planner_id

* Make planner_id and pipeline_id properties

* Add planner_id param to example files

* Formatting

---------

Co-authored-by: Amal Nanavati <[email protected]>
Co-authored-by: Ethan K. Gordon <[email protected]>
@amalnanavati amalnanavati deleted the amaln/set_planner_id branch April 23, 2024 17:13
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.

2 participants