Skip to content
This repository was archived by the owner on Apr 8, 2024. It is now read-only.

Commit 7d311f1

Browse files
author
Sharron LIU
authored
Merge pull request #68 from sharronliu/master
grasp_ros2: fixed typo 'pcl_conversions'
2 parents d29fc53 + 1f1c4b9 commit 7d311f1

File tree

5 files changed

+15
-16
lines changed

5 files changed

+15
-16
lines changed

grasp_apps/random_pick/cfg/random_pick.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ GraspPlanner:
2323
grasp_score_threshold: 1
2424
grasp_frame_id: "base"
2525
grasp_approach: [0.0, 0.0, -1.0] # expect approaching in -z axis
26-
grasp_approach_angle: 0.785 # 1.047=PI/3 # 0.785=PI/4 # 0.523=PI/6 # 0.345=PI/9 # acceptable approaching angle
27-
grasp_offset: [0.000, -0.004, 0.000]
26+
grasp_approach_angle: 0.6 # 1.047=PI/3 # 0.785=PI/4 # 0.523=PI/6 # 0.345=PI/9 # acceptable approaching angle
27+
grasp_offset: [0.006, -0.003, 0.000]
2828
# grasp boundry in grasp_frame_id
29-
grasp_boundry: [-0.25, 0.25, -0.73, -0.27, -0.15, 0.15]
30-
eef_offset: 0.16
31-
eef_yaw_offset: -0.7854 # M_PI/4
29+
grasp_boundry: [-0.2, 0.2, -0.65, -0.30, -0.15, 0.15]
30+
eef_offset: 0.154
31+
eef_yaw_offset: 0.7854 # M_PI/4
3232
finger_joint_names: ["panda_finger_joint1", "panda_finger_joint2"]

grasp_apps/recognize_pick/cfg/recognize_pick.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ GraspPlanner:
2424
grasp_score_threshold: 1
2525
grasp_frame_id: "base"
2626
grasp_approach: [0.0, 0.0, -1.0] # expect approaching in -z axis
27-
grasp_approach_angle: 0.785 # 1.047=PI/3 # 0.785=PI/4 # 0.523=PI/6 # 0.345=PI/9 # acceptable approaching angle
28-
grasp_offset: [0.000, -0.004, 0.000]
27+
grasp_approach_angle: 0.7 # 1.047=PI/3 # 0.785=PI/4 # 0.523=PI/6 # 0.345=PI/9 # acceptable approaching angle
28+
grasp_offset: [0.006, -0.003, 0.000]
2929
# grasp boundry in grasp_frame_id
30-
grasp_boundry: [-0.25, 0.25, -0.73, -0.27, -0.15, 0.15]
31-
eef_offset: 0.16
32-
eef_yaw_offset: -0.7854 # M_PI/4
30+
grasp_boundry: [-0.2, 0.2, -0.65, -0.30, -0.15, 0.15]
31+
eef_offset: 0.154
32+
eef_yaw_offset: 0.7854 # M_PI/4
3333
finger_joint_names: ["panda_finger_joint1", "panda_finger_joint2"]

grasp_apps/recognize_pick/src/recognize_pick.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ int main(int argc, char **argv)
114114
robot_->moveToJointValues(joint_values_place, vel_, acc_);
115115
robot_->place(place_[0], place_[1], place_[2], place_[3], place_[4], place_[5], vel_, acc_, vscale_, appr_);
116116
#endif
117+
rclcpp::spin_some(node_);
117118
place_pose_ = nullptr;
118119
}
119120

grasp_ros2/src/grasp_detector_gpd.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,6 @@ std::vector<Grasp> GraspDetectorGPD::detectGraspPosesInTopic()
123123
std::vector<Grasp> grasps;
124124

125125
{
126-
if (object_sub_) {
127-
cloud_camera_->filterWorkspace(grasp_ws_);
128-
}
129126
// preprocess the point cloud
130127
grasp_detector_->preprocessPointCloud(*cloud_camera_);
131128
// detect grasps in the point cloud
@@ -240,15 +237,15 @@ void GraspDetectorGPD::cloud_callback(const sensor_msgs::msg::PointCloud2::Share
240237
xyz.row(1).minCoeff(), xyz.row(1).maxCoeff(),
241238
xyz.row(2).minCoeff(), xyz.row(2).maxCoeff()};
242239
found = true;
243-
filter1 = filter2;
240+
cloud = filter2;
244241
break;
245242
}
246243
}
247244
if (!found) {return;}
248245
}
249246
if (filtered_pub_) {
250247
sensor_msgs::msg::PointCloud2 msg2;
251-
pcl::toROSMsg(*filter1, msg2);
248+
pcl::toROSMsg(*cloud, msg2);
252249
// workaround rviz rgba
253250
msg2.fields[3].name = "rgb";
254251
msg2.fields[3].datatype = 7;

grasp_ros2/tests/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ find_package(ament_cmake_gtest REQUIRED)
33
find_package(rclcpp REQUIRED)
44
find_package(grasp_msgs REQUIRED)
55
find_package(moveit_msgs REQUIRED)
6+
find_package(pcl_conversions REQUIRED)
67
set(TEST_NAME tgrasp_ros2)
78

89
ament_add_gtest(${TEST_NAME} tgrasp_ros2.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../src/consts.cpp)
@@ -16,7 +17,7 @@ if(TARGET ${TEST_NAME})
1617
${grasp_library_INCLUDE_DIRS}
1718
)
1819
ament_target_dependencies(${TEST_NAME}
19-
pcl_conversion
20+
pcl_conversions
2021
rclcpp
2122
grasp_msgs
2223
moveit_msgs

0 commit comments

Comments
 (0)