Skip to content

Commit

Permalink
refactor(glog_component): prefix package and namespace with autoware
Browse files Browse the repository at this point in the history
Signed-off-by: Esteve Fernandez <[email protected]>
  • Loading branch information
esteve committed Nov 20, 2024
1 parent 41cec87 commit ec44652
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ common/autoware_component_interface_tools/** [email protected]
common/autoware_component_interface_utils/** [email protected] [email protected]
common/autoware_fake_test_node/** [email protected] [email protected] [email protected] [email protected]
common/autoware_geography_utils/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
common/autoware_glog_component/** [email protected]
common/autoware_goal_distance_calculator/** [email protected]
common/autoware_grid_map_utils/** [email protected]
common/autoware_interpolation/** [email protected] [email protected]
Expand All @@ -30,7 +31,6 @@ common/autoware_universe_utils/** [email protected] [email protected]
common/autoware_vehicle_info_utils/** [email protected] [email protected] [email protected] [email protected]
common/bag_time_manager_rviz_plugin/** [email protected]
common/global_parameter_loader/** [email protected]
common/glog_component/** [email protected]
common/tier4_adapi_rviz_plugin/** [email protected] [email protected] [email protected]
common/tier4_api_utils/** [email protected]
common/tier4_camera_view_rviz_plugin/** [email protected] [email protected]
Expand Down
2 changes: 1 addition & 1 deletion common/.pages
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ nav:
- 'autoware_point_types': common/autoware_point_types
- 'Geography Utils': common/autoware_geography_utils
- 'Global Parameter Loader': common/global_parameter_loader/Readme
- 'Glog Component': common/glog_component
- 'Glog Component': common/autoware_glog_component
- 'interpolation': common/autoware_interpolation
- 'Kalman Filter': common/autoware_kalman_filter
- 'Motion Utils': common/autoware_motion_utils
Expand Down
File renamed without changes.
18 changes: 18 additions & 0 deletions common/autoware_glog_component/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
cmake_minimum_required(VERSION 3.14)
project(autoware_glog_component)

find_package(autoware_cmake REQUIRED)
autoware_package()


ament_auto_add_library(${PROJECT_NAME} SHARED
src/glog_component.cpp
)
target_link_libraries(${PROJECT_NAME} glog::glog)

rclcpp_components_register_node(${PROJECT_NAME}
PLUGIN "GlogComponent"
EXECUTABLE ${PROJECT_NAME}_node
)

ament_auto_package()
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,22 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef GLOG_COMPONENT__GLOG_COMPONENT_HPP_
#define GLOG_COMPONENT__GLOG_COMPONENT_HPP_
#ifndef AUTOWARE__GLOG_COMPONENT__GLOG_COMPONENT_HPP_
#define AUTOWARE__GLOG_COMPONENT__GLOG_COMPONENT_HPP_

#include <rclcpp/rclcpp.hpp>

#include <glog/logging.h>

namespace autoware::glog_component
{

class GlogComponent : public rclcpp::Node
{
public:
explicit GlogComponent(const rclcpp::NodeOptions & node_options);
};

#endif // GLOG_COMPONENT__GLOG_COMPONENT_HPP_
} // namespace autoware::glog_component

#endif // AUTOWARE__GLOG_COMPONENT__GLOG_COMPONENT_HPP_
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>glog_component</name>
<name>autoware_glog_component</name>
<version>0.38.0</version>
<description>The glog_component package</description>
<description>The autoware_glog_component package</description>
<maintainer email="[email protected]">Takamasa Horibe</maintainer>
<license>Apache License 2.0</license>

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

#include "glog_component/glog_component.hpp"
#include "autoware/glog_component/glog_component.hpp"

namespace autoware::glog_component
{

GlogComponent::GlogComponent(const rclcpp::NodeOptions & node_options)
: Node("glog_component", node_options)
Expand All @@ -23,5 +26,7 @@ GlogComponent::GlogComponent(const rclcpp::NodeOptions & node_options)
}
}

} // namespace autoware::glog_component

#include <rclcpp_components/register_node_macro.hpp>
RCLCPP_COMPONENTS_REGISTER_NODE(GlogComponent)
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::glog_component::GlogComponent)

Check warning on line 32 in common/autoware_glog_component/src/glog_component.cpp

View check run for this annotation

Codecov / codecov/patch

common/autoware_glog_component/src/glog_component.cpp#L32

Added line #L32 was not covered by tests
18 changes: 0 additions & 18 deletions common/glog_component/CMakeLists.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
<extra_arg name="use_intra_process_comms" value="false"/>
</composable_node>

<composable_node pkg="glog_component" plugin="GlogComponent" name="glog_component" namespace=""/>
<composable_node pkg="autoware_glog_component" plugin="GlogComponent" name="glog_component" namespace=""/>
</node_container>

<group if="$(var launch_compare_map_pipeline)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<let name="motion_velocity_planner_launch_modules" value="$(eval &quot;'$(var motion_velocity_planner_launch_modules)' + '$(var launch_module_list_end)'&quot;)"/>

<node_container pkg="rclcpp_components" exec="$(var container_type)" name="motion_planning_container" namespace="" args="" output="screen">
<composable_node pkg="glog_component" plugin="GlogComponent" name="glog_component" namespace=""/>
<composable_node pkg="autoware_glog_component" plugin="GlogComponent" name="glog_component" namespace=""/>
</node_container>

<!-- path smoothing -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<extra_arg name="use_intra_process_comms" value="false"/>
</composable_node>

<composable_node pkg="glog_component" plugin="GlogComponent" name="glog_component" namespace=""/>
<composable_node pkg="autoware_glog_component" plugin="GlogComponent" name="glog_component" namespace=""/>
</node_container>
</group>
</launch>
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<remap from="~/input/operation_mode_state" to="/system/operation_mode/state"/>
<remap from="~/output/current_velocity_limit_mps" to="/planning/scenario_planning/current_max_velocity"/>
</composable_node>
<composable_node pkg="glog_component" plugin="GlogComponent" name="glog_component" namespace=""/>
<composable_node pkg="autoware_glog_component" plugin="GlogComponent" name="glog_component" namespace=""/>
</node_container>
</group>
</group>
Expand Down
2 changes: 1 addition & 1 deletion launch/tier4_planning_launch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<exec_depend>autoware_external_cmd_selector</exec_depend>
<exec_depend>autoware_external_velocity_limit_selector</exec_depend>
<exec_depend>autoware_freespace_planner</exec_depend>
<exec_depend>autoware_glog_component</exec_depend>
<exec_depend>autoware_mission_planner</exec_depend>
<exec_depend>autoware_obstacle_cruise_planner</exec_depend>
<exec_depend>autoware_obstacle_stop_planner</exec_depend>
Expand All @@ -74,7 +75,6 @@
<exec_depend>autoware_scenario_selector</exec_depend>
<exec_depend>autoware_surround_obstacle_checker</exec_depend>
<exec_depend>autoware_velocity_smoother</exec_depend>
<exec_depend>glog_component</exec_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_lint_common</test_depend>
Expand Down

0 comments on commit ec44652

Please sign in to comment.