-
Notifications
You must be signed in to change notification settings - Fork 4
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
Revamp MoveToMouth/MoveFromMouth with MoveIt2Plan/Execute and BlackboardBehavior #124
Conversation
Remaining: - Move behaviors to separate folder - Test / cleanup / remove unused code
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 don't think any comments are dealbreakers. And it would be good to merge this in so I can fix up #122 based on the updates here.
) | ||
from .move_to import MoveTo | ||
from .move_to_dummy import MoveToDummy | ||
from .toggle_collision_object import ToggleCollisionObject |
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.
This breaks egordon/full_schema
as-is, so we should merge this first and then fix egordon/full_schema before merging.
ada_feeding/ada_feeding/behaviors/transfer/compute_move_to_mouth_position.py
Outdated
Show resolved
Hide resolved
ada_feeding/ada_feeding/behaviors/transfer/compute_move_to_mouth_position.py
Show resolved
Hide resolved
|
||
# Third-party imports | ||
from overrides import override | ||
import py_trees | ||
|
||
# Local imports | ||
from ada_feeding import ActionServerBT | ||
from ada_feeding.visitors import MoveToVisitor | ||
|
||
|
||
class MoveToTree(ActionServerBT, ABC): |
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.
self.start_time = self.node.get_clock().now() | ||
self.feedback.is_planning = behaviour.tree_blackboard.is_planning | ||
elif ( | ||
if ( |
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.
Description
Since MoveToMouth/MoveFromMouth was originally written, a lot of intermediate classes have been added to the codebase that make it easier to write cleaner code (e.g., #102 #114 #115 ). This PR focuses on moving the old movement trees and its associated behaviors to the new paradigm.
Testing procedure
Run the code as documented in the README. Then, run the below sequence of actions and verify that they work as expected.
ros2 action send_goal /MoveAbovePlate ada_feeding_msgs/action/MoveTo "{}" --feedback
ros2 action send_goal /MoveToRestingPosition ada_feeding_msgs/action/MoveTo "{}" --feedback
ros2 action send_goal /MoveToMouth ada_feeding_msgs/action/MoveTo "{}" --feedback
ros2 action send_goal /MoveFromMouthToRestingPosition ada_feeding_msgs/action/MoveTo "{}" --feedback
ros2 action send_goal /MoveToMouth ada_feeding_msgs/action/MoveTo "{}" --feedback
ros2 action send_goal /MoveFromMouthToAbovePlate ada_feeding_msgs/action/MoveTo "{}" --feedback
ros2 action send_goal /MoveAbovePlate ada_feeding_msgs/action/MoveTo "{}" --feedback
ros2 action send_goal /MoveToRestingPosition ada_feeding_msgs/action/MoveTo "{}" --feedback
ros2 action send_goal /MoveToMouth ada_feeding_msgs/action/MoveTo "{}" --feedback
ros2 action send_goal /MoveFromMouthToRestingPosition ada_feeding_msgs/action/MoveTo "{}" --feedback
ros2 action send_goal /MoveToMouth ada_feeding_msgs/action/MoveTo "{}" --feedback
ros2 action send_goal /MoveFromMouthToAbovePlate ada_feeding_msgs/action/MoveTo "{}" --feedback
Before opening a pull request
python3 -m black .
ada_feeding
directory, run:pylint --recursive=y --rcfile=.pylintrc .
.Before Merging
Squash & Merge