Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
fb8bf92
mobile_manipulation_config: revisit favorites
marioprats Nov 25, 2024
d064820
Merge pull request #16 from PickNikRobotics/mobile-manipulation-favor…
davetcoleman Nov 25, 2024
2a8a2ef
Merge branch 'main' into v6.5
MikeWrock Nov 25, 2024
9ece954
Syncing main to 6.5 (#25)
MikeWrock Dec 2, 2024
63f19d8
Ci fix (#28)
MikeWrock Dec 3, 2024
d46cfba
fixing-kinovas (#26)
MikeWrock Dec 3, 2024
8d44152
Colcon ignoring example behaviors (#27)
MikeWrock Dec 3, 2024
2535e9c
Merge branch 'main' into v6.5
MikeWrock Dec 3, 2024
d765ec8
Fixes for kinova (#30)
MikeWrock Dec 3, 2024
77e4dcd
removing ignored dependency
MikeWrock Dec 3, 2024
6f98b9e
Added categories for more objectives
MikeWrock Dec 4, 2024
45cf19f
Add 'Example' prefix to all behavior classnames and filenames in exam…
MikeWrock Dec 4, 2024
bee9479
Updated commentsin example objectives
MikeWrock Dec 4, 2024
c9986ee
fix(workspace): categories readded for lab_sim (#35)
shaur-k Dec 5, 2024
95c43b9
Updating favourites (#36)
MikeWrock Dec 5, 2024
916b049
Improve lab sim example objectives with story telling
davetcoleman Dec 12, 2024
efdcc91
Added move beakers to burners
davetcoleman Dec 12, 2024
15f1393
Updating pick orientation
MikeWrock Dec 12, 2024
507c2d9
updated waypoints and formatting
MikeWrock Dec 15, 2024
0d12a45
Merge branch 'main' into improve_lab_sim_examples
MikeWrock Dec 31, 2024
a8d310a
added links to SRDF to fix objective
MikeWrock Dec 31, 2024
651cc2c
updating metadata
MikeWrock Jan 1, 2025
07fd3b3
Merge branch 'main' into improve_lab_sim_examples
MikeWrock Jan 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/lab_sim/config/moveit/picknik_ur.srdf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
<disable_collisions link1="base_link_inertia" link2="shoulder_link" reason="Adjacent"/>
<disable_collisions link1="forearm_link" link2="upper_arm_link" reason="Adjacent"/>
<disable_collisions link1="forearm_link" link2="wrist_1_link" reason="Adjacent"/>
<disable_collisions link1="base_link_inertia" link2="upper_arm_link" reason="Adjacent"/>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't know why these links end up in collision after planning a waypoint, but this is my workaround

<disable_collisions link1="forearm_link" link2="wrist_2_link" reason="Never"/>
<disable_collisions link1="forearm_pinch_link" link2="forearm_link" reason="Adjacent"/>
<disable_collisions link1="forearm_pinch_link" link2="tool_changer_link" reason="Never"/>
Expand Down
1 change: 1 addition & 0 deletions src/lab_sim/description/picknik_ur.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,7 @@
<param name="render_publish_rate">10</param>
<param name="tf_publish_rate">60</param>
<param name="lidar_publish_rate">10</param>
<param name="mujoco_viewer">false</param>
</hardware>
</ros2_control>
</robot>
5 changes: 2 additions & 3 deletions src/lab_sim/objectives/3_waypoint_pick_and_place.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<root BTCPP_format="4" main_tree_to_execute="3 Waypoints Pick and Place">
<!--//////////-->
<BehaviorTree
ID="3 Waypoints Pick and Place"
_description="Basic example of repeatedly grabbing a small (invisible) object, placing it at desired destination, and then moving back to a home position"
_favorite="false"
_favorite="true"
>
<Control ID="Sequence">
<!--Reset the planning scene to ensure no old collision objects are hanging around-->
<Action ID="ClearSnapshot" />
<!--Setup the environment to its "home" configuration - move to center and open gripper-->
<SubTree
ID="Move to Waypoint"
Expand Down
33 changes: 33 additions & 0 deletions src/lab_sim/objectives/_scan_scene.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8" ?>
<root BTCPP_format="4" main_tree_to_execute="_Scan Scene">
<!--//////////-->
<BehaviorTree
ID="_Scan Scene"
_description="Move robot our of scene to enable full snapshot of scene."
_favorite="true"
>
<Control ID="Sequence" name="TopLevelSequence">
<Action ID="ClearSnapshot" />
<SubTree
ID="Move to Waypoint"
_collapsed="true"
joint_group_name="manipulator"
planner_interface="moveit_default"
controller_names="/joint_trajectory_controller"
waypoint_name="Park Far Right"
/>
<SubTree ID="Take scene camera snapshot" _collapsed="true" />
<SubTree
ID="Move to Waypoint"
_collapsed="true"
joint_group_name="manipulator"
planner_interface="moveit_default"
controller_names="/joint_trajectory_controller"
waypoint_name="Look at Table"
/>
</Control>
</BehaviorTree>
<TreeNodesModel>
<SubTree ID="_Scan Scene" />
</TreeNodesModel>
</root>
106 changes: 106 additions & 0 deletions src/lab_sim/objectives/constrained_pick_and_place_subtree.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="utf-8" ?>
<root
BTCPP_format="4"
main_tree_to_execute="Constrained Pick and Place Subtree"
>
<!--//////////-->
<BehaviorTree
ID="Constrained Pick and Place Subtree"
_subtreeOnly="true"
_description=""
>
<Control ID="Sequence">
<!--Create a special type of motion planning configuration that includes an upwards orientation requirement-->
<Action
ID="InitializeMotionConstraints"
constraints_name="gripper pointing down"
constraints="{constraints}"
/>
<Action
ID="AppendOrientationConstraint"
config_file_name="my_constraints.yaml"
constraints="{constraints}"
/>
<!--Move to pick location-->
<!--Note: Sampling based planners can be non-deterministic. The retry decorator improves the likelihood of success-->
<Decorator ID="RetryUntilSuccessful" num_attempts="3">
<SubTree
ID="Move to Waypoint"
waypoint_name="{pre_pick}"
joint_group_name="manipulator"
controller_names="/joint_trajectory_controller /robotiq_gripper_controller"
planner_interface="moveit_default"
constraints="{constraints}"
/>
</Decorator>
<Decorator ID="RetryUntilSuccessful" num_attempts="3">
<SubTree
ID="Move to Waypoint"
waypoint_name="{pick}"
joint_group_name="manipulator"
controller_names="/joint_trajectory_controller /robotiq_gripper_controller"
planner_interface="moveit_default"
constraints="{constraints}"
/>
</Decorator>
<!--We force success as the gripper closes, since we are commanding a position it will never reach (fingers fully closed)-->
<Decorator ID="ForceSuccess">
<SubTree ID="Close Gripper" />
</Decorator>
<!--Move to place (drop) location-->
<Decorator ID="RetryUntilSuccessful" num_attempts="3">
<SubTree
ID="Move to Waypoint"
controller_names="/joint_trajectory_controller /robotiq_gripper_controller"
joint_group_name="manipulator"
planner_interface="moveit_default"
constraints="{constraints}"
_collapsed="true"
waypoint_name="{pre_pick}"
/>
</Decorator>
<Decorator ID="RetryUntilSuccessful" num_attempts="3">
<SubTree
ID="Move to Waypoint"
controller_names="/joint_trajectory_controller /robotiq_gripper_controller"
joint_group_name="manipulator"
planner_interface="moveit_default"
constraints="{constraints}"
_collapsed="true"
waypoint_name="{pre_place}"
/>
</Decorator>
<Decorator ID="RetryUntilSuccessful" num_attempts="3">
<SubTree
ID="Move to Waypoint"
controller_names="/joint_trajectory_controller /robotiq_gripper_controller"
joint_group_name="manipulator"
planner_interface="moveit_default"
constraints="{constraints}"
_collapsed="true"
waypoint_name="{place}"
/>
</Decorator>
<SubTree ID="Open Gripper" />
<Decorator ID="RetryUntilSuccessful" num_attempts="3">
<SubTree
ID="Move to Waypoint"
controller_names="/joint_trajectory_controller /robotiq_gripper_controller"
joint_group_name="manipulator"
planner_interface="moveit_default"
constraints="{constraints}"
_collapsed="true"
waypoint_name="{pre_place}"
/>
</Decorator>
</Control>
</BehaviorTree>
<TreeNodesModel>
<SubTree ID="Constrained Pick and Place Subtree">
<inout_port name="pre_pick" default="" />
<inout_port name="pick" default="" />
<inout_port name="pre_place" default="" />
<inout_port name="place" default="" />
</SubTree>
</TreeNodesModel>
</root>
168 changes: 32 additions & 136 deletions src/lab_sim/objectives/constrained_pick_place.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<root BTCPP_format="4" main_tree_to_execute="Constrained Pick and Place">
<root BTCPP_format="4" main_tree_to_execute="Move Beakers to Burners">
Copy link
Collaborator

Choose a reason for hiding this comment

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

@jeremydbronson please test this objective

<!--//////////-->
<BehaviorTree
ID="Constrained Pick and Place"
_description="More advanced example of picking and placing an (invisible) object with orientation constraints enforced on the gripper's motion"
_favorite="false"
ID="Move Beakers to Burners"
_description="Example of picking and placing objects with orientation constraints enforced on the arm's motion"
_favorite="true"
_subtreeOnly="false"
>
<Control ID="Sequence">
<SubTree
ID="Move to Waypoint"
_collapsed="true"
waypoint_name="Look at Table"
constraints="{constraints}"
waypoint_name="Beaker 1a - Pre Pick"
joint_group_name="manipulator"
controller_names="/joint_trajectory_controller"
velocity_scale_factor="1.0"
Expand All @@ -20,139 +22,33 @@
keep_orientation="false"
/>
<SubTree ID="Open Gripper" />
<Decorator ID="KeepRunningUntilFailure">
<Control ID="Sequence">
<!--Move to pick location-->
<SubTree
ID="Move to Waypoint"
waypoint_name="Above Pick Cube"
joint_group_name="manipulator"
controller_names="/joint_trajectory_controller"
velocity_scale_factor="1.0"
acceleration_scale_factor="1.0"
link_padding="0.01"
keep_orientation_tolerance="0.05"
keep_orientation="true"
/>
<SubTree
ID="Move to Waypoint"
waypoint_name="Pick Cube"
joint_group_name="manipulator"
controller_names="/joint_trajectory_controller"
velocity_scale_factor="1.0"
acceleration_scale_factor="1.0"
link_padding="0.01"
keep_orientation_tolerance="0.05"
keep_orientation="true"
/>
<!--We force success as the gripper closes, since we are commanding a position it will never reach (fingers fully closed)-->
<Decorator ID="ForceSuccess">
<SubTree ID="Close Gripper" />
</Decorator>
<!--Move to place (drop) location-->
<SubTree
ID="Move to Waypoint"
controller_names="/joint_trajectory_controller"
joint_group_name="manipulator"
_collapsed="true"
waypoint_name="Above Pick Cube"
velocity_scale_factor="1.0"
acceleration_scale_factor="1.0"
link_padding="0.01"
keep_orientation_tolerance="0.05"
keep_orientation="true"
/>
<SubTree
ID="Move to Waypoint"
controller_names="/joint_trajectory_controller"
joint_group_name="manipulator"
_collapsed="true"
waypoint_name="Above Place Cube"
velocity_scale_factor="1.0"
acceleration_scale_factor="1.0"
link_padding="0.01"
keep_orientation_tolerance="0.05"
keep_orientation="true"
/>
<SubTree
ID="Move to Waypoint"
controller_names="/joint_trajectory_controller"
joint_group_name="manipulator"
_collapsed="true"
waypoint_name="Place Cube"
velocity_scale_factor="1.0"
acceleration_scale_factor="1.0"
link_padding="0.01"
keep_orientation_tolerance="0.05"
keep_orientation="true"
/>
<SubTree ID="Open Gripper" />
<SubTree
ID="Move to Waypoint"
controller_names="/joint_trajectory_controller"
joint_group_name="manipulator"
_collapsed="true"
waypoint_name="Above Place Cube"
velocity_scale_factor="1.0"
acceleration_scale_factor="1.0"
link_padding="0.01"
keep_orientation_tolerance="0.05"
keep_orientation="true"
/>
<SubTree
ID="Move to Waypoint"
controller_names="/joint_trajectory_controller"
joint_group_name="manipulator"
_collapsed="true"
waypoint_name="Place Cube"
velocity_scale_factor="1.0"
acceleration_scale_factor="1.0"
link_padding="0.01"
keep_orientation_tolerance="0.05"
keep_orientation="true"
/>
<SubTree ID="Close Gripper" />
<SubTree
ID="Move to Waypoint"
controller_names="/joint_trajectory_controller"
joint_group_name="manipulator"
_collapsed="true"
waypoint_name="Above Place Cube"
velocity_scale_factor="1.0"
acceleration_scale_factor="1.0"
link_padding="0.01"
keep_orientation_tolerance="0.05"
keep_orientation="true"
/>
<SubTree
ID="Move to Waypoint"
controller_names="/joint_trajectory_controller"
joint_group_name="manipulator"
_collapsed="true"
waypoint_name="Above Pick Cube"
velocity_scale_factor="1.0"
acceleration_scale_factor="1.0"
link_padding="0.01"
keep_orientation_tolerance="0.05"
keep_orientation="true"
/>
<SubTree
ID="Move to Waypoint"
waypoint_name="Pick Cube"
joint_group_name="manipulator"
controller_names="/joint_trajectory_controller"
velocity_scale_factor="1.0"
acceleration_scale_factor="1.0"
link_padding="0.01"
keep_orientation_tolerance="0.05"
keep_orientation="true"
/>
<SubTree ID="Open Gripper" />
</Control>
</Decorator>
<SubTree
ID="Constrained Pick and Place Subtree"
pre_pick="Beaker 1a - Pre Pick"
pick="Beaker 1b - Pick"
pre_place="Beaker 1c - Pre Place"
place="Beaker 1d - Place"
name="Beaker 1"
/>
<SubTree
ID="Constrained Pick and Place Subtree"
pre_pick="Beaker 2a - Pre Pick"
pick="Beaker 2b - Pick"
pre_place="Beaker 2c - Pre Place"
place="Beaker 2d - Place"
name="Beaker 2"
/>
<SubTree
ID="Constrained Pick and Place Subtree"
pre_pick="Beaker 3a - Pre Pick"
pick="Beaker 3b - Pick"
pre_place="Beaker 3c - Pre Place"
place="Beaker 3d - Place"
name="Beaker 3"
/>
</Control>
</BehaviorTree>
<TreeNodesModel>
<SubTree ID="Constrained Pick and Place" />
<SubTree ID="Move Beakers to Burners" />
</TreeNodesModel>
</root>
2 changes: 1 addition & 1 deletion src/lab_sim/objectives/joint_diagnostic.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<BehaviorTree
ID="Joint Diagnostic"
_description="Example of cycling through the min and max limits of a single joint, for hardware testing"
_favorite="false"
_favorite="true"
>
<Control ID="Sequence" name="TopLevelSequence">
<!--Setup by moving home-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<BehaviorTree
ID="Load and Execute Joint Trajectory"
_description="Load a trajectory that was saved as a YAML file"
_favorite="false"
_favorite="true"
_subtreeOnly="false"
>
<Control ID="Sequence" name="TopLevelSequence">
Expand Down
2 changes: 1 addition & 1 deletion src/lab_sim/objectives/look_at_table.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<BehaviorTree
ID="Look at table"
_description="Move the arm to a position that faces the table surface"
_favorite="true"
_favorite="false"
_subtreeOnly="false"
>
<Control ID="Sequence" name="TopLevelSequence">
Expand Down
Loading
Loading