Skip to content

Commit

Permalink
refactor(image_projection_based_fusion): fix namespace and directory …
Browse files Browse the repository at this point in the history
…structure (autowarefoundation#7990)

* refactor: add autoware on namespace

Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>

* refactor: move headers under autoware

Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>

refactor: move image_projection_based_fusion headers under autoware namespace

* fix: remove unused dependencies

Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>

---------

Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
Signed-off-by: Y.Hisaki <yhisaki31@gmail.com>
  • Loading branch information
technolojin authored and yhisaki committed Jul 19, 2024
1 parent 1feeccd commit 62d3468
Show file tree
Hide file tree
Showing 33 changed files with 170 additions and 169 deletions.
10 changes: 5 additions & 5 deletions perception/image_projection_based_fusion/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@ target_link_libraries(${PROJECT_NAME}
)

rclcpp_components_register_node(${PROJECT_NAME}
PLUGIN "image_projection_based_fusion::RoiDetectedObjectFusionNode"
PLUGIN "autoware::image_projection_based_fusion::RoiDetectedObjectFusionNode"
EXECUTABLE roi_detected_object_fusion_node
)

rclcpp_components_register_node(${PROJECT_NAME}
PLUGIN "image_projection_based_fusion::RoiClusterFusionNode"
PLUGIN "autoware::image_projection_based_fusion::RoiClusterFusionNode"
EXECUTABLE roi_cluster_fusion_node
)

rclcpp_components_register_node(${PROJECT_NAME}
PLUGIN "image_projection_based_fusion::SegmentPointCloudFusionNode"
PLUGIN "autoware::image_projection_based_fusion::SegmentPointCloudFusionNode"
EXECUTABLE segmentation_pointcloud_fusion_node
)

rclcpp_components_register_node(${PROJECT_NAME}
PLUGIN "image_projection_based_fusion::RoiPointCloudFusionNode"
PLUGIN "autoware::image_projection_based_fusion::RoiPointCloudFusionNode"
EXECUTABLE roi_pointcloud_fusion_node
)

Expand Down Expand Up @@ -149,7 +149,7 @@ if(TRT_AVAIL AND CUDA_AVAIL AND CUDNN_AVAIL)
)

rclcpp_components_register_node(pointpainting_lib
PLUGIN "image_projection_based_fusion::PointPaintingFusionNode"
PLUGIN "autoware::image_projection_based_fusion::PointPaintingFusionNode"
EXECUTABLE pointpainting_fusion_node
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef IMAGE_PROJECTION_BASED_FUSION__DEBUGGER_HPP_
#define IMAGE_PROJECTION_BASED_FUSION__DEBUGGER_HPP_
#ifndef AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__DEBUGGER_HPP_
#define AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__DEBUGGER_HPP_

#define EIGEN_MPL2_ONLY

Expand All @@ -31,7 +31,7 @@
#include <string>
#include <vector>

namespace image_projection_based_fusion
namespace autoware::image_projection_based_fusion
{

using sensor_msgs::msg::RegionOfInterest;
Expand Down Expand Up @@ -66,6 +66,6 @@ class Debugger
std::size_t image_buffer_size_;
};

} // namespace image_projection_based_fusion
} // namespace autoware::image_projection_based_fusion

#endif // IMAGE_PROJECTION_BASED_FUSION__DEBUGGER_HPP_
#endif // AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__DEBUGGER_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef IMAGE_PROJECTION_BASED_FUSION__FUSION_NODE_HPP_
#define IMAGE_PROJECTION_BASED_FUSION__FUSION_NODE_HPP_
#ifndef AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__FUSION_NODE_HPP_
#define AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__FUSION_NODE_HPP_

#include <autoware/image_projection_based_fusion/debugger.hpp>
#include <autoware/universe_utils/ros/debug_publisher.hpp>
#include <autoware/universe_utils/system/stop_watch.hpp>
#include <image_projection_based_fusion/debugger.hpp>
#include <rclcpp/rclcpp.hpp>

#include <autoware_perception_msgs/msg/detected_objects.hpp>
Expand All @@ -44,7 +44,7 @@
#include <utility>
#include <vector>

namespace image_projection_based_fusion
namespace autoware::image_projection_based_fusion
{
using autoware_perception_msgs::msg::DetectedObject;
using autoware_perception_msgs::msg::DetectedObjects;
Expand Down Expand Up @@ -142,6 +142,6 @@ class FusionNode : public rclcpp::Node
std::unique_ptr<autoware::universe_utils::DebugPublisher> debug_publisher_;
};

} // namespace image_projection_based_fusion
} // namespace autoware::image_projection_based_fusion

#endif // IMAGE_PROJECTION_BASED_FUSION__FUSION_NODE_HPP_
#endif // AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__FUSION_NODE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__NODE_HPP_
#define IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__NODE_HPP_
#ifndef AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__NODE_HPP_
#define AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__NODE_HPP_

#include "image_projection_based_fusion/fusion_node.hpp"
#include "image_projection_based_fusion/pointpainting_fusion/pointpainting_trt.hpp"
#include "autoware/image_projection_based_fusion/fusion_node.hpp"
#include "autoware/image_projection_based_fusion/pointpainting_fusion/pointpainting_trt.hpp"
#include "lidar_centerpoint/postprocess/non_maximum_suppression.hpp"

#include <image_projection_based_fusion/utils/geometry.hpp>
#include <image_projection_based_fusion/utils/utils.hpp>
#include <autoware/image_projection_based_fusion/utils/geometry.hpp>
#include <autoware/image_projection_based_fusion/utils/utils.hpp>
#include <lidar_centerpoint/centerpoint_trt.hpp>
#include <lidar_centerpoint/detection_class_remapper.hpp>

Expand All @@ -29,7 +29,7 @@
#include <string>
#include <vector>

namespace image_projection_based_fusion
namespace autoware::image_projection_based_fusion
{
using Label = autoware_perception_msgs::msg::ObjectClassification;

Expand Down Expand Up @@ -78,5 +78,5 @@ class PointPaintingFusionNode

bool out_of_scope(const DetectedObjects & obj);
};
} // namespace image_projection_based_fusion
#endif // IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__NODE_HPP_
} // namespace autoware::image_projection_based_fusion
#endif // AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__NODE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__POINTCLOUD_DENSIFICATION_HPP_
#define IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__POINTCLOUD_DENSIFICATION_HPP_
#ifndef AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__POINTCLOUD_DENSIFICATION_HPP_
#define AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__POINTCLOUD_DENSIFICATION_HPP_

#include <tf2_ros/buffer.h>
#include <tf2_ros/transform_listener.h>
Expand All @@ -29,7 +29,7 @@
#include <string>
#include <utility>

namespace image_projection_based_fusion
namespace autoware::image_projection_based_fusion
{
struct PointCloudWithTransform
{
Expand Down Expand Up @@ -67,6 +67,7 @@ class PointCloudDensification
std::list<PointCloudWithTransform> pointcloud_cache_;
};

} // namespace image_projection_based_fusion
} // namespace autoware::image_projection_based_fusion

#endif // IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__POINTCLOUD_DENSIFICATION_HPP_
// NOLINTNEXTLINE(whitespace/line_length)
#endif // AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__POINTCLOUD_DENSIFICATION_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__POINTPAINTING_TRT_HPP_
#define IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__POINTPAINTING_TRT_HPP_
#ifndef AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__POINTPAINTING_TRT_HPP_
#define AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__POINTPAINTING_TRT_HPP_

#include <image_projection_based_fusion/pointpainting_fusion/voxel_generator.hpp>
#include <autoware/image_projection_based_fusion/pointpainting_fusion/voxel_generator.hpp>
#include <lidar_centerpoint/centerpoint_trt.hpp>

#include <memory>
#include <string>

namespace image_projection_based_fusion
namespace autoware::image_projection_based_fusion
{
class PointPaintingTRT : public centerpoint::CenterPointTRT
{
Expand All @@ -40,6 +40,6 @@ class PointPaintingTRT : public centerpoint::CenterPointTRT

std::unique_ptr<image_projection_based_fusion::VoxelGenerator> vg_ptr_pp_{nullptr};
};
} // namespace image_projection_based_fusion
} // namespace autoware::image_projection_based_fusion

#endif // IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__POINTPAINTING_TRT_HPP_
#endif // AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__POINTPAINTING_TRT_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__PREPROCESS_KERNEL_HPP_
#define IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__PREPROCESS_KERNEL_HPP_
#ifndef AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__PREPROCESS_KERNEL_HPP_
#define AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__PREPROCESS_KERNEL_HPP_

#include <cuda.h>
#include <cuda_runtime_api.h>

namespace image_projection_based_fusion
namespace autoware::image_projection_based_fusion
{
cudaError_t generateVoxels_random_launch(
const float * points, size_t points_size, float min_x_range, float max_x_range, float min_y_range,
Expand All @@ -38,6 +38,6 @@ cudaError_t generateFeatures_launch(
const float range_min_y, const float range_min_z, float * features,
const std::size_t encoder_in_feature_size, cudaStream_t stream);

} // namespace image_projection_based_fusion
} // namespace autoware::image_projection_based_fusion

#endif // IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__PREPROCESS_KERNEL_HPP_
#endif // AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__PREPROCESS_KERNEL_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__VOXEL_GENERATOR_HPP_
#define IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__VOXEL_GENERATOR_HPP_
#ifndef AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__VOXEL_GENERATOR_HPP_
#define AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__VOXEL_GENERATOR_HPP_

#include <image_projection_based_fusion/pointpainting_fusion/pointcloud_densification.hpp>
#include <autoware/image_projection_based_fusion/pointpainting_fusion/pointcloud_densification.hpp>
#include <lidar_centerpoint/preprocess/pointcloud_densification.hpp>
#include <lidar_centerpoint/preprocess/voxel_generator.hpp>

#include <bitset>
#include <memory>
#include <vector>

namespace image_projection_based_fusion
namespace autoware::image_projection_based_fusion
{

class VoxelGenerator
Expand All @@ -45,6 +45,6 @@ class VoxelGenerator
std::array<int, 3> grid_size_;
std::array<float, 3> recip_voxel_size_;
};
} // namespace image_projection_based_fusion
} // namespace autoware::image_projection_based_fusion

#endif // IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__VOXEL_GENERATOR_HPP_
#endif // AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__VOXEL_GENERATOR_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef IMAGE_PROJECTION_BASED_FUSION__ROI_CLUSTER_FUSION__NODE_HPP_
#define IMAGE_PROJECTION_BASED_FUSION__ROI_CLUSTER_FUSION__NODE_HPP_
#ifndef AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__ROI_CLUSTER_FUSION__NODE_HPP_
#define AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__ROI_CLUSTER_FUSION__NODE_HPP_

#include "image_projection_based_fusion/fusion_node.hpp"
#include "autoware/image_projection_based_fusion/fusion_node.hpp"

#include <map>
#include <memory>
#include <string>
namespace image_projection_based_fusion
namespace autoware::image_projection_based_fusion
{
const std::map<std::string, uint8_t> IOU_MODE_MAP{{"iou", 0}, {"iou_x", 1}, {"iou_y", 2}};

Expand Down Expand Up @@ -61,6 +61,6 @@ class RoiClusterFusionNode
// bool CheckUnknown(const DetectedObjectsWithFeature & obj);
};

} // namespace image_projection_based_fusion
} // namespace autoware::image_projection_based_fusion

#endif // IMAGE_PROJECTION_BASED_FUSION__ROI_CLUSTER_FUSION__NODE_HPP_
#endif // AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__ROI_CLUSTER_FUSION__NODE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef IMAGE_PROJECTION_BASED_FUSION__ROI_DETECTED_OBJECT_FUSION__NODE_HPP_
#define IMAGE_PROJECTION_BASED_FUSION__ROI_DETECTED_OBJECT_FUSION__NODE_HPP_
#ifndef AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__ROI_DETECTED_OBJECT_FUSION__NODE_HPP_
#define AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__ROI_DETECTED_OBJECT_FUSION__NODE_HPP_

#include "autoware/image_projection_based_fusion/fusion_node.hpp"
#include "autoware/universe_utils/ros/debug_publisher.hpp"
#include "image_projection_based_fusion/fusion_node.hpp"

#include <image_projection_based_fusion/utils/utils.hpp>
#include <autoware/image_projection_based_fusion/utils/utils.hpp>

#include "autoware_perception_msgs/msg/object_classification.hpp"

#include <map>
#include <memory>
#include <vector>

namespace image_projection_based_fusion
namespace autoware::image_projection_based_fusion
{

using sensor_msgs::msg::RegionOfInterest;
Expand Down Expand Up @@ -74,6 +74,6 @@ class RoiDetectedObjectFusionNode
ignored_object_flags_map_;
};

} // namespace image_projection_based_fusion
} // namespace autoware::image_projection_based_fusion

#endif // IMAGE_PROJECTION_BASED_FUSION__ROI_DETECTED_OBJECT_FUSION__NODE_HPP_
#endif // AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__ROI_DETECTED_OBJECT_FUSION__NODE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef IMAGE_PROJECTION_BASED_FUSION__ROI_POINTCLOUD_FUSION__NODE_HPP_
#define IMAGE_PROJECTION_BASED_FUSION__ROI_POINTCLOUD_FUSION__NODE_HPP_
#ifndef AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__ROI_POINTCLOUD_FUSION__NODE_HPP_
#define AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__ROI_POINTCLOUD_FUSION__NODE_HPP_

#include "image_projection_based_fusion/fusion_node.hpp"
#include "autoware/image_projection_based_fusion/fusion_node.hpp"

#include <image_projection_based_fusion/utils/utils.hpp>
#include <autoware/image_projection_based_fusion/utils/utils.hpp>

#include <string>
#include <vector>
namespace image_projection_based_fusion
namespace autoware::image_projection_based_fusion
{
class RoiPointCloudFusionNode
: public FusionNode<PointCloud2, DetectedObjectWithFeature, DetectedObjectsWithFeature>
Expand Down Expand Up @@ -52,5 +52,5 @@ class RoiPointCloudFusionNode
bool out_of_scope(const DetectedObjectWithFeature & obj);
};

} // namespace image_projection_based_fusion
#endif // IMAGE_PROJECTION_BASED_FUSION__ROI_POINTCLOUD_FUSION__NODE_HPP_
} // namespace autoware::image_projection_based_fusion
#endif // AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__ROI_POINTCLOUD_FUSION__NODE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef IMAGE_PROJECTION_BASED_FUSION__SEGMENTATION_POINTCLOUD_FUSION__NODE_HPP_
#define IMAGE_PROJECTION_BASED_FUSION__SEGMENTATION_POINTCLOUD_FUSION__NODE_HPP_
#ifndef AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__SEGMENTATION_POINTCLOUD_FUSION__NODE_HPP_
#define AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__SEGMENTATION_POINTCLOUD_FUSION__NODE_HPP_

#include "image_projection_based_fusion/fusion_node.hpp"
#include "autoware/image_projection_based_fusion/fusion_node.hpp"

#include <image_projection_based_fusion/utils/utils.hpp>
#include <autoware/image_projection_based_fusion/utils/utils.hpp>

#include <string>
#include <utility>
Expand All @@ -29,7 +29,7 @@
#include <cv_bridge/cv_bridge.h>
#endif

namespace image_projection_based_fusion
namespace autoware::image_projection_based_fusion
{
class SegmentPointCloudFusionNode : public FusionNode<PointCloud2, PointCloud2, Image>
{
Expand Down Expand Up @@ -66,5 +66,5 @@ class SegmentPointCloudFusionNode : public FusionNode<PointCloud2, PointCloud2,
}
};

} // namespace image_projection_based_fusion
#endif // IMAGE_PROJECTION_BASED_FUSION__SEGMENTATION_POINTCLOUD_FUSION__NODE_HPP_
} // namespace autoware::image_projection_based_fusion
#endif // AUTOWARE__IMAGE_PROJECTION_BASED_FUSION__SEGMENTATION_POINTCLOUD_FUSION__NODE_HPP_
Loading

0 comments on commit 62d3468

Please sign in to comment.