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

feat: apply autoware_ prefix for default_ad_api_helpers #9965

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
ebbceb8
feat(default_ad_api_helpers): apply `autoware_` prefix:
sasakisasaki Jan 19, 2025
c28a5a0
rename: `default_ad_api_helpers` => `autoware_default_ad_api_helpers`
sasakisasaki Jan 19, 2025
bf7afa4
style(pre-commit): autofix
pre-commit-ci[bot] Jan 19, 2025
42ebb2c
Merge branch 'main' into feat-apply-autoware-prefix-for-system-defaul…
sasakisasaki Jan 20, 2025
cc08744
Merge branch 'main' into feat-apply-autoware-prefix-for-system-defaul…
sasakisasaki Jan 21, 2025
85d20dd
bug(autoware_default_ad_api_helpers): revert wrongly updated copyrights
sasakisasaki Jan 22, 2025
64f4f39
bug(autoware_default_ad_api_helpers): fix wrong dependencies
sasakisasaki Jan 22, 2025
66fa463
update(autoware_default_ad_api_helpers): `README.md`
sasakisasaki Jan 22, 2025
9853a74
bug(autoware_default_ad_api_helpers): rename folders as follows:
sasakisasaki Jan 22, 2025
e4fb780
Merge branch 'feat-apply-autoware-prefix-for-system-default-ad-api-he…
sasakisasaki Jan 22, 2025
d8621c8
style(pre-commit): autofix
pre-commit-ci[bot] Jan 22, 2025
4028e12
Merge branch 'main' into feat-apply-autoware-prefix-for-system-defaul…
sasakisasaki Jan 22, 2025
7904b8c
fix(autoware_ad_api_adaptors): fix executable names
sasakisasaki Jan 22, 2025
c5249df
Merge branch 'feat-apply-autoware-prefix-for-system-default-ad-api-he…
sasakisasaki Jan 22, 2025
9e82432
replace ad_api with adapi
isamu-takagi Jan 22, 2025
fea4931
Merge branch 'main' into feat-apply-autoware-prefix-for-system-defaul…
isamu-takagi Jan 22, 2025
09996e3
fix build error
isamu-takagi Jan 22, 2025
d958e90
update pkg name
isamu-takagi Jan 22, 2025
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
2 changes: 1 addition & 1 deletion launch/tier4_autoware_api_launch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<buildtool_depend>ament_cmake_auto</buildtool_depend>
<buildtool_depend>autoware_cmake</buildtool_depend>

<exec_depend>ad_api_adaptors</exec_depend>
<exec_depend>autoware_ad_api_adaptors</exec_depend>
<exec_depend>autoware_default_adapi</exec_depend>
<exec_depend>autoware_iv_external_api_adaptor</exec_depend>
<exec_depend>autoware_iv_internal_api_adaptor</exec_depend>
Expand Down
2 changes: 1 addition & 1 deletion launch/tier4_localization_launch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<buildtool_depend>ament_cmake_auto</buildtool_depend>
<buildtool_depend>autoware_cmake</buildtool_depend>

<exec_depend>automatic_pose_initializer</exec_depend>
<exec_depend>autoware_ar_tag_based_localizer</exec_depend>
<exec_depend>autoware_automatic_pose_initializer</exec_depend>
<exec_depend>autoware_ekf_localizer</exec_depend>
<exec_depend>autoware_geo_pose_projector</exec_depend>
<exec_depend>autoware_gyro_odometer</exec_depend>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(ad_api_adaptors)
project(autoware_ad_api_adaptors)

find_package(autoware_cmake REQUIRED)
autoware_package()
Expand All @@ -10,14 +10,14 @@ ament_auto_add_library(${PROJECT_NAME} SHARED
)

rclcpp_components_register_node(${PROJECT_NAME}
PLUGIN "ad_api_adaptors::InitialPoseAdaptor"
EXECUTABLE initial_pose_adaptor_node
PLUGIN "autoware::ad_api_adaptors::InitialPoseAdaptor"
EXECUTABLE autoware_initial_pose_adaptor_node
EXECUTOR MultiThreadedExecutor
)

rclcpp_components_register_node(${PROJECT_NAME}
PLUGIN "ad_api_adaptors::RoutingAdaptor"
EXECUTABLE routing_adaptor_node
PLUGIN "autoware::ad_api_adaptors::RoutingAdaptor"
EXECUTABLE autoware_routing_adaptor_node
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in the internal slack, please do not change the names of the executables.

EXECUTOR SingleThreadedExecutor
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ The clear API is called automatically before setting the route.

## parameters

{{ json_to_markdown("/system/default_ad_api_helpers/ad_api_adaptors/schema/ad_api_adaptors.schema.json") }}
{{ json_to_markdown("/system/autoware_default_ad_api_helpers/ad_api_adaptors/schema/ad_api_adaptors.schema.json") }}
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@

<group>
<push-ros-namespace namespace="default_ad_api/helpers"/>
<node pkg="ad_api_adaptors" exec="initial_pose_adaptor_node">
<param from="$(find-pkg-share ad_api_adaptors)/config/initial_pose.param.yaml"/>
<node pkg="autoware_ad_api_adaptors" exec="autoware_initial_pose_adaptor_node">
<param from="$(find-pkg-share autoware_ad_api_adaptors)/config/initial_pose.param.yaml"/>
<param name="map_height_fitter.map_loader_name" value="/map/pointcloud_map_loader"/>
<param name="map_height_fitter.target" value="$(var rviz_initial_pose_auto_fix_target)"/>
<remap from="~/initialpose" to="/initialpose"/>
<remap from="~/pointcloud_map" to="/map/pointcloud_map"/>
<remap from="~/partial_map_load" to="/map/get_partial_pointcloud_map"/>
<remap from="~/vector_map" to="/map/vector_map"/>
</node>
<node pkg="ad_api_adaptors" exec="routing_adaptor_node">
<node pkg="autoware_ad_api_adaptors" exec="autoware_routing_adaptor_node">
<remap from="~/input/fixed_goal" to="/planning/mission_planning/goal"/>
<remap from="~/input/rough_goal" to="/rviz/routing/rough_goal"/>
<remap from="~/input/reroute" to="/rviz/routing/reroute"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?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>ad_api_adaptors</name>
<name>autoware_ad_api_adaptors</name>
<version>0.40.0</version>
<description>The ad_api_adaptors package</description>
<maintainer email="[email protected]">Takagi, Isamu</maintainer>
<maintainer email="[email protected]">Ryohsuke Mitsudome</maintainer>
<maintainer email="[email protected]">Yukihiro Saito</maintainer>
<maintainer email="[email protected]">Junya Sasaki</maintainer>
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <string>
#include <vector>

namespace ad_api_adaptors
namespace autoware::ad_api_adaptors
{
template <class ServiceT>
using Future = typename rclcpp::Client<ServiceT>::SharedFuture;
Expand All @@ -35,7 +35,7 @@ std::array<double, 36> get_covariance_parameter(rclcpp::Node * node, const std::
}

InitialPoseAdaptor::InitialPoseAdaptor(const rclcpp::NodeOptions & options)
: Node("initial_pose_adaptor", options), fitter_(this)
: Node("autoware_initial_pose_adaptor", options), fitter_(this)
{
rviz_particle_covariance_ = get_covariance_parameter(this, "initial_pose_particle_covariance");
sub_initial_pose_ = create_subscription<PoseWithCovarianceStamped>(
Expand All @@ -60,7 +60,7 @@ void InitialPoseAdaptor::on_initial_pose(const PoseWithCovarianceStamped::ConstS
cli_initialize_->async_send_request(req);
}

} // namespace ad_api_adaptors
} // namespace autoware::ad_api_adaptors

#include <rclcpp_components/register_node_macro.hpp>
RCLCPP_COMPONENTS_REGISTER_NODE(ad_api_adaptors::InitialPoseAdaptor)
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::ad_api_adaptors::InitialPoseAdaptor)
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include <geometry_msgs/msg/pose_with_covariance_stamped.hpp>

namespace ad_api_adaptors
namespace autoware::ad_api_adaptors
{

class InitialPoseAdaptor : public rclcpp::Node
Expand All @@ -41,6 +41,6 @@ class InitialPoseAdaptor : public rclcpp::Node
void on_initial_pose(const PoseWithCovarianceStamped::ConstSharedPtr msg);
};

} // namespace ad_api_adaptors
} // namespace autoware::ad_api_adaptors

#endif // INITIAL_POSE_ADAPTOR_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

#include <memory>

namespace ad_api_adaptors
namespace autoware::ad_api_adaptors
{

RoutingAdaptor::RoutingAdaptor(const rclcpp::NodeOptions & options)
: Node("routing_adaptor", options)
: Node("autoware_routing_adaptor", options)
{
using std::placeholders::_1;

Expand Down Expand Up @@ -109,7 +109,7 @@ void RoutingAdaptor::on_reroute(const PoseStamped::ConstSharedPtr pose)
cli_reroute_->async_send_request(route);
}

} // namespace ad_api_adaptors
} // namespace autoware::ad_api_adaptors

#include <rclcpp_components/register_node_macro.hpp>
RCLCPP_COMPONENTS_REGISTER_NODE(ad_api_adaptors::RoutingAdaptor)
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::ad_api_adaptors::RoutingAdaptor)
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <string>

namespace ad_api_adaptors
namespace autoware::ad_api_adaptors
{

class RoutingAdaptor : public rclcpp::Node
Expand Down Expand Up @@ -59,6 +59,6 @@ class RoutingAdaptor : public rclcpp::Node
void on_reroute(const PoseStamped::ConstSharedPtr pose);
};

} // namespace ad_api_adaptors
} // namespace autoware::ad_api_adaptors

#endif // ROUTING_ADAPTOR_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

class PlanningFactorVisualizer(rclpy.node.Node):
def __init__(self):
super().__init__("planning_factor_visualizer")
super().__init__("autoware_planning_factor_visualizer")
self.front_offset = self.declare_parameter("front_offset", 0.0).value
self.pub_velocity = self.create_publisher(MarkerArray, "/visualizer/velocity_factors", 1)
self.pub_steering = self.create_publisher(MarkerArray, "/visualizer/steering_factors", 1)
Expand Down Expand Up @@ -102,27 +102,27 @@
result.orientation = pose.orientation
return result

def create_wall(self, index, header, pose, color):
pose = self.offset_pose(pose)
marker = Marker()
marker.ns = "wall"
marker.id = index
marker.lifetime = rclpy.duration.Duration(nanoseconds=0.3 * 1e9).to_msg()
marker.header = header
marker.action = Marker.ADD
marker.type = Marker.CUBE
marker.pose.position.x = pose.position.x
marker.pose.position.y = pose.position.y
marker.pose.position.z = pose.position.z + 1.0
marker.pose.orientation = pose.orientation
marker.scale.x = 0.1
marker.scale.y = 5.0
marker.scale.z = 2.0
marker.color.a = 0.7
marker.color.r = color[0]
marker.color.g = color[1]
marker.color.b = color[2]
return marker

Check warning on line 125 in system/autoware_default_ad_api_helpers/autoware_ad_api_visualizers/ad_api_visualizers/planning_factors.py

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Code Duplication

The module contains 2 functions with similar structure: PlanningFactorVisualizer.create_text,PlanningFactorVisualizer.create_wall. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

def create_text(self, index, header, pose, text):
pose = self.offset_pose(pose)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<launch>
<node pkg="autoware_ad_api_visualizers" name="planning_factors" exec="planning_factors">
<param name="front_offset" value="0.0"/>
</node>
</launch>
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?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>ad_api_visualizers</name>
<name>autoware_ad_api_visualizers</name>
<version>0.40.0</version>
<description>The ad_api_visualizers package</description>
<maintainer email="[email protected]">Takagi, Isamu</maintainer>
<maintainer email="[email protected]">Ryohsuke Mitsudome</maintainer>
<maintainer email="[email protected]">Yukihiro Saito</maintainer>
<maintainer email="[email protected]">Junya Sasaki</maintainer>
<license>Apache License 2.0</license>

<exec_depend>autoware_adapi_v1_msgs</exec_depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
simplefilter("ignore", category=SetuptoolsDeprecationWarning)
simplefilter("ignore", category=PkgResourcesDeprecationWarning)

package_name = "ad_api_visualizers"
package_name = "autoware_ad_api_visualizers"

setup(
name=package_name,
Expand All @@ -26,6 +26,6 @@
license="Apache License 2.0",
tests_require=["pytest"],
entry_points={
"console_scripts": ["planning_factors = ad_api_visualizers.planning_factors:main"],
"console_scripts": ["planning_factors = autoware_ad_api_visualizers.planning_factors:main"],
},
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(automatic_pose_initializer)
project(autoware_automatic_pose_initializer)

find_package(autoware_cmake REQUIRED)
autoware_package()
Expand All @@ -9,7 +9,7 @@ ament_auto_add_library(${PROJECT_NAME} SHARED
)

rclcpp_components_register_node(${PROJECT_NAME}
PLUGIN "automatic_pose_initializer::AutomaticPoseInitializer"
PLUGIN "autoware::automatic_pose_initializer::AutomaticPoseInitializer"
EXECUTABLE ${PROJECT_NAME}_node
EXECUTOR MultiThreadedExecutor
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<launch>
<group>
<push-ros-namespace namespace="default_ad_api/helpers"/>
<node pkg="autoware_automatic_pose_initializer" exec="autoware_automatic_pose_initializer_node"/>
</group>
</launch>
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?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>automatic_pose_initializer</name>
<name>autoware_automatic_pose_initializer</name>
<version>0.40.0</version>
<description>The automatic_pose_initializer package</description>
<maintainer email="[email protected]">Takagi, Isamu</maintainer>
<maintainer email="[email protected]">Ryohsuke Mitsudome</maintainer>
<maintainer email="[email protected]">Yukihiro Saito</maintainer>
<maintainer email="[email protected]">Junya Sasaki</maintainer>
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

#include <memory>

namespace automatic_pose_initializer
namespace autoware::automatic_pose_initializer
{

AutomaticPoseInitializer::AutomaticPoseInitializer(const rclcpp::NodeOptions & options)
: Node("automatic_pose_initializer", options)
: Node("autoware_automatic_pose_initializer", options)
{
const auto adaptor = autoware::component_interface_utils::NodeAdaptor(this);
group_cli_ = create_callback_group(rclcpp::CallbackGroupType::MutuallyExclusive);
Expand All @@ -47,7 +47,7 @@ void AutomaticPoseInitializer::on_timer()
timer_->reset();
}

} // namespace automatic_pose_initializer
} // namespace autoware::automatic_pose_initializer

#include <rclcpp_components/register_node_macro.hpp>
RCLCPP_COMPONENTS_REGISTER_NODE(automatic_pose_initializer::AutomaticPoseInitializer)
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::automatic_pose_initializer::AutomaticPoseInitializer)
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <autoware/component_interface_utils/rclcpp.hpp>
#include <rclcpp/rclcpp.hpp>

namespace automatic_pose_initializer
namespace autoware::automatic_pose_initializer
{

class AutomaticPoseInitializer : public rclcpp::Node
Expand All @@ -38,6 +38,6 @@ class AutomaticPoseInitializer : public rclcpp::Node
State::Message state_;
};

} // namespace automatic_pose_initializer
} // namespace autoware::automatic_pose_initializer

#endif // AUTOMATIC_POSE_INITIALIZER_HPP_

This file was deleted.

This file was deleted.

Loading