Skip to content

Commit 0107cfa

Browse files
committed
sim works, need to test on hw, added mid-left-traverse waypoint to allow pre_drop_ctb space to plan, changed pre_drop_ctb to non-cartesian
1 parent 741228c commit 0107cfa

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

clr_pick_and_place_demo/config/waypoints.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ waypoints:
5151
- 0.500
5252
planning_group: "rail"
5353
cartesian: false
54-
5554
stow:
5655
# config:
5756
# - 4.17133 # 238 deg
@@ -119,22 +118,27 @@ waypoints:
119118
planning_group: "ur_manipulator"
120119
cartesian: true
121120
relative: true
122-
traverse_left:
121+
traverse_left_1:
123122
config:
124-
- 0.000
123+
- 0.700
125124
planning_group: "rail"
126125
cartesian: false
127126
pre_drop_ctb:
128127
pose:
129-
x: -1.708
128+
x: -1.006
130129
y: 0.811
131130
z: 1.580
132131
qx: 0.725
133132
qy: 0.688
134133
qz: 0.032
135134
qw: -0.004
136135
planning_group: "ur_manipulator"
137-
cartesian: true
136+
cartesian: false
137+
traverse_left_2:
138+
config:
139+
- 0.000
140+
planning_group: "rail"
141+
cartesian: false
138142
drop_arm:
139143
pose:
140144
x: 0.0

clr_pick_and_place_demo/src/run_demo.cpp

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -262,16 +262,21 @@ class RunDemoNode : public rclcpp::Node
262262
RCLCPP_ERROR(LOGGER, "Failed to lift CTB. Exiting.");
263263
return;
264264
}
265-
if (!this->traverse_left())
265+
if (!this->traverse_left_1())
266266
{
267-
RCLCPP_ERROR(LOGGER, "Failed to traverse to CTB dropoff location. Exiting.");
267+
RCLCPP_ERROR(LOGGER, "Failed to traverse left. Exiting.");
268268
return;
269269
}
270270
if (!this->pre_drop_ctb())
271271
{
272272
RCLCPP_ERROR(LOGGER, "Failed to approach CTB dropoff location. Exiting.");
273273
return;
274274
}
275+
if (!this->traverse_left_2())
276+
{
277+
RCLCPP_ERROR(LOGGER, "Failed to traverse to CTB dropoff location. Exiting.");
278+
return;
279+
}
275280
if (!this->drop_ctb())
276281
{
277282
RCLCPP_ERROR(LOGGER, "Failed to lower CTB. Exiting.");
@@ -456,10 +461,10 @@ class RunDemoNode : public rclcpp::Node
456461
plan_and_execute(wp_map.at("stow_ctb"));
457462
}
458463

459-
bool traverse_left()
464+
bool traverse_left_1()
460465
{
461466
RCLCPP_INFO(LOGGER, "Traversing to bench seat location.");
462-
return plan_and_execute(wp_map.at("traverse_left"));
467+
return plan_and_execute(wp_map.at("traverse_left_1"));
463468
}
464469

465470
bool pre_drop_ctb()
@@ -472,9 +477,17 @@ class RunDemoNode : public rclcpp::Node
472477
}
473478
Waypoint approach_wp_1 = Waypoint(eef.transform.translation.x, eef.transform.translation.y,
474479
eef.transform.translation.z, 0.725, 0.688, 0.032, -0.004, "ur_manipulator", true);
475-
return plan_and_execute({ approach_wp_1, wp_map.at("pre_drop_ctb") });
480+
// return plan_and_execute({ approach_wp_1, wp_map.at("pre_drop_ctb") });
481+
return plan_and_execute(approach_wp_1) && plan_and_execute(wp_map.at("pre_drop_ctb"));
476482
}
477483

484+
bool traverse_left_2()
485+
{
486+
RCLCPP_INFO(LOGGER, "Traversing to bench seat location.");
487+
return plan_and_execute(wp_map.at("traverse_left_2"));
488+
}
489+
490+
478491
bool drop_ctb()
479492
{
480493
RCLCPP_INFO(LOGGER, "Dropping CTB.");

0 commit comments

Comments
 (0)