Skip to content

Commit 4a7aa99

Browse files
authored
Merge pull request #5 from PickNikRobotics/pre-commit-formatting
Pre commit formatting
2 parents 454dcac + 217a42e commit 4a7aa99

File tree

91 files changed

+5130
-1530
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+5130
-1530
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# pre-commit autoupdate
1212
#
1313
# See https://github.com/pre-commit/pre-commit
14+
exclude: ^src/external_dependencies/
1415
repos:
1516
# Standard hooks
1617
- repo: https://github.com/pre-commit/pre-commit-hooks

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ git submodule update --recursive --init
1616
## Working with Git Subtrees
1717

1818
This repository was created through the combination of multiple repositories using git subtree.
19-
If you have no intrest in manually pulling or pushing upstream changes, you can ignore the following section and treat this repository as a single repository.
19+
If you have no interest in manually pulling or pushing upstream changes, you can ignore the following section and treat this repository as a single repository.
2020

2121
### Repository Structure
2222

src/example_behaviors/src/ndt_registration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ BT::PortsList NDTRegistration::providedPorts()
7575
}
7676
BT::KeyValueVector NDTRegistration::metadata()
7777
{
78-
return { {"description", "Finds the pose of a target point cloud relative to the base frame of a base point cloud using the Normal Distributions Transform (NDT) algorithm"} };
78+
return { {"subcategory", "Perception - 3D Point Cloud"}, {"description", "Finds the pose of a target point cloud relative to the base frame of a base point cloud using the Normal Distributions Transform (NDT) algorithm"} };
7979
}
8080

8181

src/example_behaviors/src/ransac_registration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ BT::PortsList RANSACRegistration::providedPorts()
8282

8383
BT::KeyValueVector RANSACRegistration::metadata()
8484
{
85-
return { {"description", "Finds the pose of a target point cloud relative to the base frame of a base point cloud using the Normal Distributions Transform (NDT) algorithm"} };
85+
return { {"subcategory", "Perception - 3D Point Cloud"}, {"description", "Finds the pose of a target point cloud relative to the base frame of a base point cloud using the Normal Distributions Transform (NDT) algorithm"} };
8686
}
8787

8888

Lines changed: 51 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,52 @@
11
<root BTCPP_format="4" main_tree_to_execute="Move to Waypoint">
2-
<BehaviorTree ID="Move to Waypoint" _description="This Objective is used when moving to one of the saved waypoints in your site configuration" _subtreeOnly="true">
3-
<Control ID="Sequence" name="root">
4-
<Action ID="RetrieveWaypoint" waypoint_joint_state="{target_joint_state}" waypoint_name="{waypoint_name}" joint_group_name="{joint_group_name}"/>
5-
<Action ID="InitializeMTCTask" task_id="move_to_named_pose" controller_names="{controller_names}" task="{move_to_waypoint_task}"/>
6-
<Action ID="SetupMTCCurrentState" task="{move_to_waypoint_task}"/>
7-
<Action ID="SetupMTCMoveToJointState" joint_state="{target_joint_state}" name="SetupMTCMoveToJointState" planning_group_name="{joint_group_name}" planner_interface="{planner_interface}" constraints="{constraints}" task="{move_to_waypoint_task}"/>
8-
<Action ID="PlanMTCTask" solution="{move_to_waypoint_solution}" task="{move_to_waypoint_task}"/>
9-
<Action ID="BlockingExecuteMTCTask" solution="{move_to_waypoint_solution}"/>
10-
</Control>
11-
</BehaviorTree>
12-
<TreeNodesModel>
13-
<SubTree ID="Move to Waypoint">
14-
<input_port name="waypoint_name" default="Point A"/>
15-
<input_port name="joint_group_name" default="manipulator"/>
16-
<input_port name="planner_interface" default="moveit_default"/>
17-
<input_port name="controller_names" default="/joint_trajectory_controller"/>
18-
</SubTree>
19-
</TreeNodesModel>
20-
</root>
2+
<BehaviorTree
3+
ID="Move to Waypoint"
4+
_description="This Objective is used when moving to one of the saved waypoints in your site configuration"
5+
_subtreeOnly="true"
6+
>
7+
<Control ID="Sequence" name="root">
8+
<Action
9+
ID="RetrieveWaypoint"
10+
waypoint_joint_state="{target_joint_state}"
11+
waypoint_name="{waypoint_name}"
12+
joint_group_name="{joint_group_name}"
13+
/>
14+
<Action
15+
ID="InitializeMTCTask"
16+
task_id="move_to_named_pose"
17+
controller_names="{controller_names}"
18+
task="{move_to_waypoint_task}"
19+
/>
20+
<Action ID="SetupMTCCurrentState" task="{move_to_waypoint_task}" />
21+
<Action
22+
ID="SetupMTCMoveToJointState"
23+
joint_state="{target_joint_state}"
24+
name="SetupMTCMoveToJointState"
25+
planning_group_name="{joint_group_name}"
26+
planner_interface="{planner_interface}"
27+
constraints="{constraints}"
28+
task="{move_to_waypoint_task}"
29+
/>
30+
<Action
31+
ID="PlanMTCTask"
32+
solution="{move_to_waypoint_solution}"
33+
task="{move_to_waypoint_task}"
34+
/>
35+
<Action
36+
ID="BlockingExecuteMTCTask"
37+
solution="{move_to_waypoint_solution}"
38+
/>
39+
</Control>
40+
</BehaviorTree>
41+
<TreeNodesModel>
42+
<SubTree ID="Move to Waypoint">
43+
<input_port name="waypoint_name" default="Point A" />
44+
<input_port name="joint_group_name" default="manipulator" />
45+
<input_port name="planner_interface" default="moveit_default" />
46+
<input_port
47+
name="controller_names"
48+
default="/joint_trajectory_controller"
49+
/>
50+
</SubTree>
51+
</TreeNodesModel>
52+
</root>
Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
<root BTCPP_format="4" main_tree_to_execute="Teleoperate">
2-
<!--//////////-->
3-
<BehaviorTree ID="Teleoperate" _description="Handles the different variations of teleoperation from the web UI. Can be used standalone." _favorite="false" _hardcoded="false">
4-
<SubTree ID="Request Teleoperation" enable_user_interaction="false" user_interaction_prompt="" initial_teleop_mode="3"/>
5-
</BehaviorTree>
6-
</root>
2+
<!--//////////-->
3+
<BehaviorTree
4+
ID="Teleoperate"
5+
_description="Handles the different variations of teleoperation from the web UI. Can be used standalone."
6+
_favorite="false"
7+
_hardcoded="false"
8+
>
9+
<SubTree
10+
ID="Request Teleoperation"
11+
enable_user_interaction="false"
12+
user_interaction_prompt=""
13+
initial_teleop_mode="3"
14+
/>
15+
</BehaviorTree>
16+
</root>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[]
1+
[]
Lines changed: 122 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,122 @@
1-
<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"><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" waypoint_name="Look at Table" joint_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller" planner_interface="moveit_default" constraints="{constraints}"/><Action ID="MoveGripperAction" gripper_command_action_name="/robotiq_gripper_controller/gripper_cmd" position="0"/><!--Run pick and place on loop--><Decorator ID="KeepRunningUntilFailure"><Control ID="Sequence"><!--Pick object from original location, put it down at a different part of the table, and go back to center pose--><Control ID="Sequence"><SubTree ID="Move to Waypoint" waypoint_name="Pick Cube" joint_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller" planner_interface="moveit_default" constraints="{constraints}"/><Action ID="MoveGripperAction" gripper_command_action_name="/robotiq_gripper_controller/gripper_cmd" position="0.7929"/><SubTree ID="Move to Waypoint" waypoint_name="Look at Table" joint_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller" planner_interface="moveit_default" constraints="{constraints}"/><SubTree ID="Move to Waypoint" joint_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller" planner_interface="moveit_default" constraints="{constraints}" waypoint_name="Place Cube"/><Action ID="MoveGripperAction" gripper_command_action_name="/robotiq_gripper_controller/gripper_cmd" position="0"/><SubTree ID="Move to Waypoint" waypoint_name="Look at Table" joint_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller" planner_interface="moveit_default" constraints="{constraints}"/></Control><!--Pick object from where it was placed, put it down on the original location, and go back to center pose--><Control ID="Sequence"><SubTree ID="Move to Waypoint" waypoint_name="Place Cube" joint_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller" planner_interface="moveit_default" constraints="{constraints}"/><Action ID="MoveGripperAction" gripper_command_action_name="/robotiq_gripper_controller/gripper_cmd" position="0.7929"/><SubTree ID="Move to Waypoint" waypoint_name="Look at Table" joint_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller" planner_interface="moveit_default" constraints="{constraints}"/><SubTree ID="Move to Waypoint" waypoint_name="Pick Cube" joint_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller" planner_interface="moveit_default" constraints="{constraints}"/><Action ID="MoveGripperAction" gripper_command_action_name="/robotiq_gripper_controller/gripper_cmd" position="0"/><SubTree ID="Move to Waypoint" waypoint_name="Look at Table" joint_group_name="manipulator" controller_names="/joint_trajectory_controller /robotiq_gripper_controller" planner_interface="moveit_default" constraints="{constraints}"/></Control></Control></Decorator></Control></BehaviorTree></root>
1+
<root BTCPP_format="4" main_tree_to_execute="3 Waypoints Pick and Place">
2+
<!--//////////-->
3+
<BehaviorTree
4+
ID="3 Waypoints Pick and Place"
5+
_description="Basic example of repeatedly grabbing a small (invisible) object, placing it at desired destination, and then moving back to a home position"
6+
_favorite="false"
7+
>
8+
<Control ID="Sequence">
9+
<!--Reset the planning scene to ensure no old collision objects are hanging around-->
10+
<Action ID="ClearSnapshot" />
11+
<!--Setup the environment to its "home" configuration - move to center and open gripper-->
12+
<SubTree
13+
ID="Move to Waypoint"
14+
waypoint_name="Look at Table"
15+
joint_group_name="manipulator"
16+
controller_names="/joint_trajectory_controller /robotiq_gripper_controller"
17+
planner_interface="moveit_default"
18+
constraints="{constraints}"
19+
/>
20+
<Action
21+
ID="MoveGripperAction"
22+
gripper_command_action_name="/robotiq_gripper_controller/gripper_cmd"
23+
position="0"
24+
/>
25+
<!--Run pick and place on loop-->
26+
<Decorator ID="KeepRunningUntilFailure">
27+
<Control ID="Sequence">
28+
<!--Pick object from original location, put it down at a different part of the table, and go back to center pose-->
29+
<Control ID="Sequence">
30+
<SubTree
31+
ID="Move to Waypoint"
32+
waypoint_name="Pick Cube"
33+
joint_group_name="manipulator"
34+
controller_names="/joint_trajectory_controller /robotiq_gripper_controller"
35+
planner_interface="moveit_default"
36+
constraints="{constraints}"
37+
/>
38+
<Action
39+
ID="MoveGripperAction"
40+
gripper_command_action_name="/robotiq_gripper_controller/gripper_cmd"
41+
position="0.7929"
42+
/>
43+
<SubTree
44+
ID="Move to Waypoint"
45+
waypoint_name="Look at Table"
46+
joint_group_name="manipulator"
47+
controller_names="/joint_trajectory_controller /robotiq_gripper_controller"
48+
planner_interface="moveit_default"
49+
constraints="{constraints}"
50+
/>
51+
<SubTree
52+
ID="Move to Waypoint"
53+
joint_group_name="manipulator"
54+
controller_names="/joint_trajectory_controller /robotiq_gripper_controller"
55+
planner_interface="moveit_default"
56+
constraints="{constraints}"
57+
waypoint_name="Place Cube"
58+
/>
59+
<Action
60+
ID="MoveGripperAction"
61+
gripper_command_action_name="/robotiq_gripper_controller/gripper_cmd"
62+
position="0"
63+
/>
64+
<SubTree
65+
ID="Move to Waypoint"
66+
waypoint_name="Look at Table"
67+
joint_group_name="manipulator"
68+
controller_names="/joint_trajectory_controller /robotiq_gripper_controller"
69+
planner_interface="moveit_default"
70+
constraints="{constraints}"
71+
/>
72+
</Control>
73+
<!--Pick object from where it was placed, put it down on the original location, and go back to center pose-->
74+
<Control ID="Sequence">
75+
<SubTree
76+
ID="Move to Waypoint"
77+
waypoint_name="Place Cube"
78+
joint_group_name="manipulator"
79+
controller_names="/joint_trajectory_controller /robotiq_gripper_controller"
80+
planner_interface="moveit_default"
81+
constraints="{constraints}"
82+
/>
83+
<Action
84+
ID="MoveGripperAction"
85+
gripper_command_action_name="/robotiq_gripper_controller/gripper_cmd"
86+
position="0.7929"
87+
/>
88+
<SubTree
89+
ID="Move to Waypoint"
90+
waypoint_name="Look at Table"
91+
joint_group_name="manipulator"
92+
controller_names="/joint_trajectory_controller /robotiq_gripper_controller"
93+
planner_interface="moveit_default"
94+
constraints="{constraints}"
95+
/>
96+
<SubTree
97+
ID="Move to Waypoint"
98+
waypoint_name="Pick Cube"
99+
joint_group_name="manipulator"
100+
controller_names="/joint_trajectory_controller /robotiq_gripper_controller"
101+
planner_interface="moveit_default"
102+
constraints="{constraints}"
103+
/>
104+
<Action
105+
ID="MoveGripperAction"
106+
gripper_command_action_name="/robotiq_gripper_controller/gripper_cmd"
107+
position="0"
108+
/>
109+
<SubTree
110+
ID="Move to Waypoint"
111+
waypoint_name="Look at Table"
112+
joint_group_name="manipulator"
113+
controller_names="/joint_trajectory_controller /robotiq_gripper_controller"
114+
planner_interface="moveit_default"
115+
constraints="{constraints}"
116+
/>
117+
</Control>
118+
</Control>
119+
</Decorator>
120+
</Control>
121+
</BehaviorTree>
122+
</root>
Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,38 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8" ?>
22
<root BTCPP_format="4" main_tree_to_execute="Add Waypoints to MTC Task">
33
<!--//////////-->
44
<BehaviorTree ID="Add Waypoints to MTC Task">
55
<Control ID="Sequence">
6-
<Decorator ID="ForEachString" vector_in="{waypoint_names}" out="{waypoint_name}">
6+
<Decorator
7+
ID="ForEachString"
8+
vector_in="{waypoint_names}"
9+
out="{waypoint_name}"
10+
>
711
<Control ID="Sequence">
8-
<Action ID="RetrieveWaypoint" waypoint_joint_state="{target_joint_state}" waypoint_name="{waypoint_name}" joint_group_name="{joint_group_name}"/>
9-
<Action ID="SetupMTCMoveToJointState" joint_state="{target_joint_state}" name="SetupMTCMoveToJointState" planning_group_name="{joint_group_name}" planner_interface="{planner_interface}" task="{mtc_task}"/>
12+
<Action
13+
ID="RetrieveWaypoint"
14+
waypoint_joint_state="{target_joint_state}"
15+
waypoint_name="{waypoint_name}"
16+
joint_group_name="{joint_group_name}"
17+
/>
18+
<Action
19+
ID="SetupMTCMoveToJointState"
20+
joint_state="{target_joint_state}"
21+
name="SetupMTCMoveToJointState"
22+
planning_group_name="{joint_group_name}"
23+
planner_interface="{planner_interface}"
24+
task="{mtc_task}"
25+
/>
1026
</Control>
1127
</Decorator>
1228
</Control>
1329
</BehaviorTree>
1430
<TreeNodesModel>
1531
<SubTree ID="Add Waypoints to MTC Task">
16-
<input_port name="joint_group_name" default="manipulator"/>
17-
<input_port name="waypoint_names" default="Pick Cube;Place Cube"/>
18-
<inout_port name="mtc_task" default="{mtc_task}"/>
19-
<input_port name="planner_interface" default="moveit_default"/>
32+
<input_port name="joint_group_name" default="manipulator" />
33+
<input_port name="waypoint_names" default="Pick Cube;Place Cube" />
34+
<inout_port name="mtc_task" default="{mtc_task}" />
35+
<input_port name="planner_interface" default="moveit_default" />
2036
</SubTree>
2137
</TreeNodesModel>
2238
</root>

0 commit comments

Comments
 (0)