|
@@ -60,8 +60,8 @@ pilot_autoware_bridge::pilot_autoware_bridge() : Node("pilot_autoware_bridge")
|
|
|
pose_sub_ = create_subscription<geometry_msgs::msg::PoseStamped>(
|
|
|
"pose", queue_size, std::bind(&pilot_autoware_bridge::callbackPose, this, _1));
|
|
|
|
|
|
- // detected_object_with_feature_sub_ = create_subscription<tier4_perception_msgs::msg::DetectedObjectsWithFeature>(
|
|
|
- // "/perception/object_recognition/detection/labeled_clusters", queue_size, std::bind(&pilot_autoware_bridge::callbackObject, this, _1));
|
|
|
+ detected_object_with_feature_sub_ = create_subscription<tier4_perception_msgs::msg::DetectedObjectsWithFeature>(
|
|
|
+ "/perception/object_recognition/detection/labeled_clusters", queue_size, std::bind(&pilot_autoware_bridge::callbackObject, this, _1));
|
|
|
|
|
|
|
|
|
pointcloud_pub_ = this->create_publisher<sensor_msgs::msg::PointCloud2>("/perception/obstacle_segmentation/pointcloud", durable_qos);
|
|
@@ -688,6 +688,9 @@ void pilot_autoware_bridge::callbackTimerTestSim()
|
|
|
feature_object.object.kinematics.orientation_availability =
|
|
|
autoware_auto_perception_msgs::msg::DetectedObjectKinematics::UNAVAILABLE;
|
|
|
feature_object.object.kinematics.has_twist = false;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// feature_object.object.shape = object.shape;
|
|
|
|
|
|
|
|
@@ -770,6 +773,18 @@ void pilot_autoware_bridge::ConvertObjAndPub(iv::lidar::objectarray * pobjarray)
|
|
|
feature_object.object.kinematics.has_twist = false;
|
|
|
// feature_object.object.shape = object.shape;
|
|
|
|
|
|
+ // shape
|
|
|
+
|
|
|
+ autoware_auto_perception_msgs::msg::Shape shape;
|
|
|
+ shape.type = autoware_auto_perception_msgs::msg::Shape::BOUNDING_BOX;
|
|
|
+ shape.dimensions.x = pobj->dimensions().x();
|
|
|
+ shape.dimensions.y = pobj->dimensions().y();
|
|
|
+ shape.dimensions.z = pobj->dimensions().z();
|
|
|
+
|
|
|
+ feature_object.object.set__shape(shape);
|
|
|
+
|
|
|
+ std::cout<<" set shape. "<<std::endl;
|
|
|
+
|
|
|
output_dynamic_object_msg.feature_objects.push_back(feature_object);
|
|
|
|
|
|
}
|
|
@@ -791,6 +806,6 @@ void pilot_autoware_bridge::ConvertObjAndPub(iv::lidar::objectarray * pobjarray)
|
|
|
output_pointcloud_msg.header.frame_id = "base_link";
|
|
|
output_pointcloud_msg.header.stamp = current_time;
|
|
|
// publish
|
|
|
- pointcloud_pub_->publish(output_pointcloud_msg);
|
|
|
+ // pointcloud_pub_->publish(output_pointcloud_msg);
|
|
|
}
|
|
|
|