Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(image_diagnostics): fix namespace and directory structure #7915

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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)

Check warning on line 279 in sensing/image_diagnostics/src/image_diagnostics_node.cpp

View check run for this annotation

Codecov / codecov/patch

sensing/image_diagnostics/src/image_diagnostics_node.cpp#L279

Added line #L279 was not covered by tests
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_
Loading