Skip to content

Commit

Permalink
refactor(image_diagnostics): fix namespace and directory structure (a…
Browse files Browse the repository at this point in the history
…utowarefoundation#7915)

refactor: update include paths and namespace for image_diagnostics

Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
  • Loading branch information
technolojin authored and Ariiees committed Jul 22, 2024
1 parent 59af212 commit 4ff69bf
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
8 changes: 4 additions & 4 deletions sensing/image_diagnostics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ include_directories(
)


ament_auto_add_library(image_diagnostics SHARED
ament_auto_add_library(${PROJECT_NAME} SHARED
src/image_diagnostics_node.cpp
)
target_link_libraries(image_diagnostics
target_link_libraries(${PROJECT_NAME}
${OpenCV_LIBRARIES}
)
rclcpp_components_register_node(image_diagnostics
PLUGIN "image_diagnostics::ImageDiagNode"
rclcpp_components_register_node(${PROJECT_NAME}
PLUGIN "autoware::image_diagnostics::ImageDiagNode"
EXECUTABLE image_diagnostics_node
)

Expand Down
10 changes: 6 additions & 4 deletions sensing/image_diagnostics/src/image_diagnostics_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "image_diagnostics/image_diagnostics_node.hpp"
#include "image_diagnostics_node.hpp"

#include <std_msgs/msg/header.hpp>

namespace image_diagnostics
#include <vector>

namespace autoware::image_diagnostics
{
using image_diagnostics::Image_State;
ImageDiagNode::ImageDiagNode(const rclcpp::NodeOptions & node_options)
Expand Down Expand Up @@ -271,7 +273,7 @@ void ImageDiagNode::shiftImage(cv::Mat & img)
tmp.copyTo(left_bottom);
}

} // namespace image_diagnostics
} // namespace autoware::image_diagnostics

#include <rclcpp_components/register_node_macro.hpp>
RCLCPP_COMPONENTS_REGISTER_NODE(image_diagnostics::ImageDiagNode)
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::image_diagnostics::ImageDiagNode)
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_DIAGNOSTICS__IMAGE_DIAGNOSTICS_NODE_HPP_
#define IMAGE_DIAGNOSTICS__IMAGE_DIAGNOSTICS_NODE_HPP_
#ifndef IMAGE_DIAGNOSTICS_NODE_HPP_
#define IMAGE_DIAGNOSTICS_NODE_HPP_

#include <diagnostic_updater/diagnostic_updater.hpp>
#include <image_transport/image_transport.hpp>
Expand All @@ -34,7 +34,8 @@

#include <string>
#include <unordered_map>
namespace image_diagnostics

namespace autoware::image_diagnostics
{
using diagnostic_updater::DiagnosticStatusWrapper;
using diagnostic_updater::Updater;
Expand Down Expand Up @@ -98,6 +99,6 @@ class ImageDiagNode : public rclcpp::Node
rclcpp::Publisher<tier4_debug_msgs::msg::Int32Stamped>::SharedPtr image_state_pub_;
};

} // namespace image_diagnostics
} // namespace autoware::image_diagnostics

#endif // IMAGE_DIAGNOSTICS__IMAGE_DIAGNOSTICS_NODE_HPP_
#endif // IMAGE_DIAGNOSTICS_NODE_HPP_

0 comments on commit 4ff69bf

Please sign in to comment.