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
…9302)

Signed-off-by: Esteve Fernandez <[email protected]>
Co-authored-by: Takagi, Isamu <[email protected]>
  • Loading branch information
esteve and isamu-takagi authored Dec 4, 2024
1 parent ed133eb commit 6ab469d
Show file tree
Hide file tree
Showing 16 changed files with 47 additions and 37 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 @@ -31,7 +32,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 "autoware::glog_component::GlogComponent"
EXECUTABLE ${PROJECT_NAME}_node
)

ament_auto_package()
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ When you load the `glog_component` in container, the launch file can be like bel

```py
glog_component = ComposableNode(
package="glog_component",
plugin="GlogComponent",
package="autoware_glog_component",
plugin="autoware::glog_component::GlogComponent",
name="glog_component",
)

Expand Down
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)
18 changes: 0 additions & 18 deletions common/glog_component/CMakeLists.txt

This file was deleted.

4 changes: 2 additions & 2 deletions launch/tier4_control_launch/launch/control.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<group>
<!-- set a control container to run all required components in the same process -->
<node_container pkg="rclcpp_components" exec="$(var container_executable)" name="control_container" namespace="">
<composable_node pkg="glog_component" plugin="GlogComponent" name="glog_control_container_component"/>
<composable_node pkg="autoware_glog_component" plugin="GlogComponent" name="glog_control_container_component"/>
<!-- shift decider -->
<composable_node pkg="autoware_shift_decider" plugin="autoware::shift_decider::ShiftDecider" name="autoware_shift_decider">
<remap from="input/control_cmd" to="/control/trajectory_follower/control_cmd"/>
Expand Down Expand Up @@ -177,7 +177,7 @@
<group>
<!-- set a control check container to run all control checker components in the same process -->
<node_container pkg="rclcpp_components" exec="$(var container_executable)" name="control_check_container" namespace="">
<composable_node pkg="glog_component" plugin="GlogComponent" name="glog_control_check_container_component"/>
<composable_node pkg="autoware_glog_component" plugin="GlogComponent" name="glog_control_check_container_component"/>
</node_container>

<!-- lane departure checker -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,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
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
<remap from="~/planner/route" to="route"/>
<remap from="~/planner/state" to="state"/>
</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>
</launch>

0 comments on commit 6ab469d

Please sign in to comment.