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 dummy_perception_publisher #9987

Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
a47e1aa
feat(dummy_perception_publisher): apply `autoware_` prefix (see below):
sasakisasaki Jan 20, 2025
3ae179d
rename(dummy_perception_publisher): move headers under `include/autow…
sasakisasaki Jan 20, 2025
19b16ad
fix(dummy_perception_publisher): fix include header paths
sasakisasaki Jan 20, 2025
2b6cc5e
rename: `dummy_perception_publisher` => `autoware_dummy_perception_pu…
sasakisasaki Jan 20, 2025
2cbf553
style(pre-commit): autofix
pre-commit-ci[bot] Jan 20, 2025
12ea27c
Merge branch 'main' into feat-apply-autoware-prefix-for-simulator-dum…
sasakisasaki Jan 20, 2025
2f8d667
fix: fix package name in the launch files
mitsudome-r Jan 22, 2025
78556ba
docs: fix package name in package.xml and CHANGELOG.rst
mitsudome-r Jan 22, 2025
b2ac1a4
fix: revert unnecessary modification in Copyright notice
mitsudome-r Jan 22, 2025
ef6f534
Update launch/tier4_simulator_launch/launch/simulator.launch.xml
sasakisasaki Jan 23, 2025
5d5681e
Merge remote-tracking branch 'origin' into feat-apply-autoware-prefix…
SakodaShintaro Jan 23, 2025
79d2396
Merge remote-tracking branch 'origin' into feat-apply-autoware-prefix…
SakodaShintaro Jan 23, 2025
f96b886
Merge branch 'main' into feat-apply-autoware-prefix-for-simulator-dum…
sasakisasaki Jan 23, 2025
29d2e19
Merge branch 'feat-apply-autoware-prefix-for-simulator-dummy-percepti…
sasakisasaki Jan 23, 2025
a42c5da
bug(autoware_dummy_perception_publisher): fix naming consistency bugs
sasakisasaki Jan 23, 2025
deea2de
bug(autoware_dummy_perception_publisher): fix inconsistent namespacings
sasakisasaki Jan 23, 2025
9ab4e68
style(pre-commit): autofix
pre-commit-ci[bot] Jan 23, 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
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@

<group if="$(var use_empty_dynamic_object_publisher)">
<push-ros-namespace namespace="object_recognition"/>
<node pkg="dummy_perception_publisher" exec="empty_objects_publisher" name="empty_objects_publisher" output="screen">
<node pkg="autoware_dummy_perception_publisher" exec="empty_objects_publisher" name="empty_objects_publisher" output="screen">
<remap from="~/output/objects" to="/perception/object_recognition/objects"/>
</node>
</group>
Expand Down
4 changes: 2 additions & 2 deletions launch/tier4_simulator_launch/launch/simulator.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

<!-- Dummy Perception -->
<group if="$(var launch_dummy_perception)">
<include file="$(find-pkg-share dummy_perception_publisher)/launch/dummy_perception_publisher.launch.xml">
<include file="$(find-pkg-share autowaredummy_perception_publisher)/launch/dummy_perception_publisher.launch.xml">

Check warning on line 50 in launch/tier4_simulator_launch/launch/simulator.launch.xml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (autowaredummy)
sasakisasaki marked this conversation as resolved.
Show resolved Hide resolved
<arg name="real" value="$(var perception/enable_detection_failure)"/>
<arg name="use_object_recognition" value="$(var perception/enable_object_recognition)"/>
<arg name="use_base_link_z" value="$(var perception/use_base_link_z)"/>
Expand Down Expand Up @@ -111,7 +111,7 @@
<!-- publish empty objects instead of object recognition module -->
<group unless="$(var perception/enable_object_recognition)">
<push-ros-namespace namespace="object_recognition"/>
<node pkg="dummy_perception_publisher" exec="empty_objects_publisher" name="empty_objects_publisher" output="screen">
<node pkg="autoware_dummy_perception_publisher" exec="empty_objects_publisher" name="empty_objects_publisher" output="screen">
<remap from="~/output/objects" to="/perception/object_recognition/objects"/>
</node>
</group>
Expand Down
2 changes: 1 addition & 1 deletion launch/tier4_simulator_launch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<buildtool_depend>ament_cmake_auto</buildtool_depend>
<buildtool_depend>autoware_cmake</buildtool_depend>

<exec_depend>dummy_perception_publisher</exec_depend>
<exec_depend>autoware_dummy_perception_publisher</exec_depend>
<exec_depend>fault_injection</exec_depend>
<exec_depend>simple_planning_simulator</exec_depend>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package dummy_perception_publisher
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package autoware_dummy_perception_publisher
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.40.0 (2024-12-12)
-------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(dummy_perception_publisher)
project(autoware_dummy_perception_publisher)

find_package(autoware_cmake REQUIRED)
autoware_package()
Expand All @@ -23,34 +23,34 @@ ament_auto_add_library(signed_distance_function SHARED
src/signed_distance_function.cpp
)

ament_auto_add_executable(dummy_perception_publisher_node
ament_auto_add_executable(${PROJECT_NAME}_node
src/main.cpp
src/node.cpp
src/pointcloud_creator.cpp
)

target_link_libraries(dummy_perception_publisher_node
target_link_libraries(${PROJECT_NAME}_node
signed_distance_function
)

ament_target_dependencies(dummy_perception_publisher_node ${${PROJECT_NAME}_DEPENDENCIES})
ament_target_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_DEPENDENCIES})

target_include_directories(dummy_perception_publisher_node
target_include_directories(${PROJECT_NAME}_node
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)

# PCL dependencies - `ament_target_dependencies` doesn't respect the
# components/modules selected above and only links in `common` ,so we need
# to do this manually.
target_compile_definitions(dummy_perception_publisher_node PRIVATE ${PCL_DEFINITIONS})
target_include_directories(dummy_perception_publisher_node PRIVATE ${PCL_INCLUDE_DIRS})
target_compile_definitions(${PROJECT_NAME}_node PRIVATE ${PCL_DEFINITIONS})
target_include_directories(${PROJECT_NAME}_node PRIVATE ${PCL_INCLUDE_DIRS})
# Unfortunately, this one can't be PRIVATE because only the plain or only the
# keyword (PRIVATE) signature of target_link_libraries can be used for one
# target, not both. The plain signature is already used inside
# `ament_target_dependencies` and possibly rosidl_target_interfaces.
target_link_libraries(dummy_perception_publisher_node ${PCL_LIBRARIES})
target_link_directories(dummy_perception_publisher_node PRIVATE ${PCL_LIBRARY_DIRS})
target_link_libraries(${PROJECT_NAME}_node ${PCL_LIBRARIES})
target_link_directories(${PROJECT_NAME}_node PRIVATE ${PCL_LIBRARY_DIRS})


ament_auto_add_executable(empty_objects_publisher
Expand Down
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 DUMMY_PERCEPTION_PUBLISHER__NODE_HPP_
#define DUMMY_PERCEPTION_PUBLISHER__NODE_HPP_
#ifndef AUTOWARE__DUMMY_PERCEPTION_PUBLISHER__NODE_HPP_
#define AUTOWARE__DUMMY_PERCEPTION_PUBLISHER__NODE_HPP_

#include <rclcpp/rclcpp.hpp>

Expand Down Expand Up @@ -41,6 +41,8 @@
#include <random>
#include <vector>

namespace autoware::simulator::dummy_perception_publisher
{
struct ObjectInfo
{
ObjectInfo(
Expand Down Expand Up @@ -139,4 +141,6 @@ class DummyPerceptionPublisherNode : public rclcpp::Node
~DummyPerceptionPublisherNode() {}
};

#endif // DUMMY_PERCEPTION_PUBLISHER__NODE_HPP_
} // namespace autoware::simulator::dummy_perception_publisher

#endif // AUTOWARE__DUMMY_PERCEPTION_PUBLISHER__NODE_HPP_
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 DUMMY_PERCEPTION_PUBLISHER__SIGNED_DISTANCE_FUNCTION_HPP_
#define DUMMY_PERCEPTION_PUBLISHER__SIGNED_DISTANCE_FUNCTION_HPP_
#ifndef AUTOWARE__DUMMY_PERCEPTION_PUBLISHER__SIGNED_DISTANCE_FUNCTION_HPP_
#define AUTOWARE__DUMMY_PERCEPTION_PUBLISHER__SIGNED_DISTANCE_FUNCTION_HPP_

#include <tf2/LinearMath/Transform.h>

Expand All @@ -23,7 +23,7 @@
#include <utility>
#include <vector>

namespace signed_distance_function
namespace autoware::simulator::dummy_perception_publisher::signed_distance_function
{

class AbstractSignedDistanceFunction
Expand Down Expand Up @@ -69,6 +69,6 @@ class CompositeSDF : public AbstractSignedDistanceFunction
std::vector<std::shared_ptr<AbstractSignedDistanceFunction>> sdf_ptrs_;
};

} // namespace signed_distance_function
} // namespace autoware::simulator::dummy_perception_publisher::signed_distance_function

#endif // DUMMY_PERCEPTION_PUBLISHER__SIGNED_DISTANCE_FUNCTION_HPP_
#endif // AUTOWARE__DUMMY_PERCEPTION_PUBLISHER__SIGNED_DISTANCE_FUNCTION_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<group>
<push-ros-namespace namespace="simulation"/>
<group if="$(var real)">
<node pkg="dummy_perception_publisher" exec="dummy_perception_publisher_node" name="dummy_perception_publisher" output="screen">
<node pkg="autoware_dummy_perception_publisher" exec="autoware_dummy_perception_publisher_node" name="autoware_dummy_perception_publisher" output="screen">
<remap from="output/dynamic_object" to="/perception/object_recognition/detection/labeled_clusters"/>
<remap from="output/objects_pose" to="debug/object_pose"/>
<remap from="output/points_raw" to="/perception/obstacle_segmentation/pointcloud"/>
Expand All @@ -30,7 +30,7 @@
</include>
</group>
<group unless="$(var real)">
<node pkg="dummy_perception_publisher" exec="dummy_perception_publisher_node" name="dummy_perception_publisher" output="screen">
<node pkg="autoware_dummy_perception_publisher" exec="autoware_dummy_perception_publisher_node" name="autoware_dummy_perception_publisher" output="screen">
<remap from="output/dynamic_object" to="/perception/object_recognition/detection/objects_with_feature"/>
<remap from="output/objects_pose" to="debug/object_pose"/>
<remap from="output/points_raw" to="/perception/obstacle_segmentation/pointcloud"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?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>dummy_perception_publisher</name>
<name>autoware_dummy_perception_publisher</name>
<version>0.40.0</version>
<description>The dummy_perception_publisher package</description>
<description>The autoware_dummy_perception_publisher package</description>
<maintainer email="yukihiro.saito@tier4.jp">Yukihiro Saito</maintainer>
<maintainer email="junya.sasaki@tier4.jp">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 @@ -19,6 +19,9 @@
#include <memory>
#include <utility>

namespace autoware::simulator::dummy_perception_publisher
{

class EmptyObjectsPublisher : public rclcpp::Node
{
public:
Expand All @@ -45,10 +48,13 @@
}
};

} // namespace autoware::simulator::dummy_perception_publisher

int main(int argc, char ** argv)
{
rclcpp::init(argc, argv);
rclcpp::spin(std::make_shared<EmptyObjectsPublisher>());
rclcpp::spin(
std::make_shared<autoware::simulator::dummy_perception_publisher::EmptyObjectsPublisher>());

Check warning on line 57 in simulator/autoware_dummy_perception_publisher/src/empty_objects_publisher.cpp

View check run for this annotation

Codecov / codecov/patch

simulator/autoware_dummy_perception_publisher/src/empty_objects_publisher.cpp#L56-L57

Added lines #L56 - L57 were not covered by tests
rclcpp::shutdown();
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "dummy_perception_publisher/node.hpp"
#include "autoware/dummy_perception_publisher/node.hpp"

#include <rclcpp/rclcpp.hpp>

Expand All @@ -21,7 +21,8 @@
int main(int argc, char ** argv)
{
rclcpp::init(argc, argv);
rclcpp::spin(std::make_shared<DummyPerceptionPublisherNode>());
rclcpp::spin(std::make_shared<
autoware::simulator::dummy_perception_publisher::DummyPerceptionPublisherNode>());

Check warning on line 25 in simulator/autoware_dummy_perception_publisher/src/main.cpp

View check run for this annotation

Codecov / codecov/patch

simulator/autoware_dummy_perception_publisher/src/main.cpp#L24-L25

Added lines #L24 - L25 were not covered by tests
rclcpp::shutdown();

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

#include "dummy_perception_publisher/node.hpp"
#include "autoware/dummy_perception_publisher/node.hpp"

#include "autoware/universe_utils/geometry/geometry.hpp"

Expand All @@ -35,6 +35,9 @@
#include <utility>
#include <vector>

namespace autoware::simulator::dummy_perception_publisher
{

using autoware_perception_msgs::msg::TrackedObject;
using autoware_perception_msgs::msg::TrackedObjects;

Expand Down Expand Up @@ -428,3 +431,5 @@ void DummyPerceptionPublisherNode::objectCallback(
}
}
}

} // namespace autoware::simulator::dummy_perception_publisher
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 Tier IV, Inc.
// Copyright 2025 Tier IV, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "dummy_perception_publisher/node.hpp"
#include "dummy_perception_publisher/signed_distance_function.hpp"
#include "autoware/dummy_perception_publisher/node.hpp"
#include "autoware/dummy_perception_publisher/signed_distance_function.hpp"

#include <pcl/impl/point_types.hpp>

Expand All @@ -26,7 +26,7 @@
#include <memory>
#include <vector>

namespace
namespace autoware::simulator::dummy_perception_publisher
{

static constexpr double epsilon = 0.001;
Expand All @@ -45,8 +45,6 @@ pcl::PointXYZ getPointWrtBaseLink(
return pcl::PointXYZ(p_wrt_base.x(), p_wrt_base.y(), p_wrt_base.z());
}

} // namespace

void ObjectCentricPointCloudCreator::create_object_pointcloud(
const ObjectInfo & obj_info, const tf2::Transform & tf_base_link2map,
std::mt19937 & random_generator, pcl::PointCloud<pcl::PointXYZ>::Ptr pointcloud) const
Expand Down Expand Up @@ -261,3 +259,5 @@ std::vector<pcl::PointCloud<pcl::PointXYZ>::Ptr> EgoCentricPointCloudCreator::cr
}
return pointclouds;
}

} // namespace autoware::simulator::dummy_perception_publisher
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "dummy_perception_publisher/signed_distance_function.hpp"
#include "autoware/dummy_perception_publisher/signed_distance_function.hpp"

#include <tf2/LinearMath/Vector3.h>

#include <algorithm>
#include <iostream>
#include <limits>

namespace signed_distance_function
namespace autoware::simulator::dummy_perception_publisher::signed_distance_function
{

double AbstractSignedDistanceFunction::getSphereTracingDist(
Expand Down Expand Up @@ -89,4 +89,4 @@ size_t CompositeSDF::nearest_sdf_index(double x, double y) const
return idx_min;
}

} // namespace signed_distance_function
} // namespace autoware::simulator::dummy_perception_publisher::signed_distance_function
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "dummy_perception_publisher/signed_distance_function.hpp"
#include "autoware/dummy_perception_publisher/signed_distance_function.hpp"

#include <gtest/gtest.h>
#include <tf2/LinearMath/Quaternion.h>
Expand All @@ -23,6 +23,9 @@
#include <limits>
#include <memory>

namespace autoware::simulator::dummy_perception_publisher::signed_distance_function
{

namespace sdf = signed_distance_function;

TEST(SignedDistanceFunctionTest, BoxSDF)
Expand Down Expand Up @@ -77,6 +80,8 @@ TEST(SignedDistanceFunctionTest, CompositeSDF)
// ASSERT_NEAR(func.getSphereTracingDist(0.0, 1.0, M_PI * -0.5, eps), 0.5, eps);
}

} // namespace autoware::simulator::dummy_perception_publisher::signed_distance_function

int main(int argc, char ** argv)
{
testing::InitGoogleTest(&argc, argv);
Expand Down
Loading