Skip to content

Commit eb3293f

Browse files
authored
Merge branch 'master' into fix/concealer-7/transition
2 parents 6cc4303 + 9eb16c3 commit eb3293f

File tree

79 files changed

+807
-48
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+807
-48
lines changed

.github/workflows/custom_spell.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
"xerces",
4949
"xercesc",
5050
"Szymon",
51-
"Parapura"
51+
"Parapura",
52+
"libagnocast",
53+
"agnocast"
5254
]
5355
}

common/agnocast_wrapper/CHANGELOG.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2+
Changelog for package agnocast_wrapper
3+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4+
5+
16.3.0 (2025-04-25)
6+
-------------------
7+
* Merge pull request `#1569 <https://github.com/tier4/scenario_simulator_v2/issues/1569>`_ from tier4/feature/agnocast
8+
* chore: fill package description
9+
* chore: update agnocast_wrapper package version manually to pass the CI
10+
* fix(agnocast_wrapper): fix package.xml
11+
* fix(agnocast_wrapper): fix changelog
12+
* fix(agnocast_wrapper): add EOF to changelog
13+
* fix(agnocast_wrapper): set package version
14+
* feat(agnocast): allow agnocast_wrapper to be built without agnocastlib, fix changelog
15+
* feat(agnocast_wrapper): ad CHANGELOG
16+
* fix(agnocast_wrapper): fix uncrustify
17+
* fix(agnocast): fix unit-test after agnocast support
18+
* feat(simple_sensor_simulator, agnocast_wrapper): improve agnocast
19+
* Fix copyright comment
20+
* Add missing includes and format code
21+
* Add NOLINT to URL
22+
* Add copyright to cmake function
23+
* Added environment variable to change building with or without Agnocast
24+
The mechanism is similar to this one: https://github.com/veqcc/autoware.universe/tree/252ae60788a8388585780a6b1935a5682c688464
25+
* Implement agnocast_wrapper package
26+
It provides type and function aliases which implementation changes between ROS and Agnocast based on a compile definitions
27+
* Contributors: Dawid Moszynski, Kotaro Yoshimoto, Mateusz Palczuk
28+
29+
16.1.3 (2025-04-21)
30+
-------------------
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
cmake_minimum_required(VERSION 3.5)
2+
3+
project(agnocast_wrapper)
4+
5+
if(NOT CMAKE_CXX_STANDARD)
6+
set(CMAKE_CXX_STANDARD 17)
7+
endif()
8+
9+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
10+
add_compile_options(-Wall -Wextra -Wpedantic)
11+
endif()
12+
13+
find_package(ament_cmake_auto REQUIRED)
14+
15+
if(DEFINED ENV{ENABLE_AGNOCAST_SIMULATOR} AND "$ENV{ENABLE_AGNOCAST_SIMULATOR}" STREQUAL "1")
16+
message(WARNING "Building with agnocastlib dependency")
17+
find_package(agnocastlib REQUIRED)
18+
else()
19+
message(WARNING "Building without agnocastlib dependency")
20+
endif()
21+
22+
ament_auto_find_build_dependencies()
23+
24+
if(BUILD_TESTING)
25+
find_package(ament_lint_auto REQUIRED)
26+
ament_lint_auto_find_test_dependencies()
27+
endif()
28+
29+
ament_auto_package(CONFIG_EXTRAS "cmake/agnocast_wrapper_setup_target.cmake")
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2015 TIER IV, Inc. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
function(agnocast_wrapper_setup target)
16+
if(DEFINED ENV{ENABLE_AGNOCAST_SIMULATOR} AND "$ENV{ENABLE_AGNOCAST_SIMULATOR}" STREQUAL "1")
17+
message(WARNING "agnocast_wrapper_setup: Defining USE_AGNOCAST_ENABLED for target ${target}")
18+
target_compile_definitions(${target} PRIVATE USE_AGNOCAST_ENABLED)
19+
else()
20+
message(WARNING "agnocast_wrapper_setup: Not defining USE_AGNOCAST_ENABLED for target ${target}")
21+
endif()
22+
endfunction()
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
// Copyright 2015 TIER IV, Inc. All rights reserved.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#ifndef AGNOCAST_WRAPPER__AGNOCAST_WRAPPER_HPP_
16+
#define AGNOCAST_WRAPPER__AGNOCAST_WRAPPER_HPP_
17+
18+
#include <string>
19+
#include <utility>
20+
21+
/// @sa https://github.com/veqcc/autoware.universe/blob/252ae60788a8388585780a6b1935a5682c688464/common/autoware_agnocast_wrapper/include/autoware_agnocast_wrapper/autoware_agnocast_wrapper.hpp
22+
23+
#ifdef USE_AGNOCAST_ENABLED
24+
#pragma message("Building with USE_AGNOCAST_ENABLED defined")
25+
#else
26+
#pragma message("Building without USE_AGNOCAST_ENABLED defined")
27+
#endif
28+
29+
#ifdef USE_AGNOCAST_ENABLED
30+
#include <agnocast/agnocast.hpp>
31+
#else
32+
#include <memory>
33+
#include <rclcpp/rclcpp.hpp>
34+
#endif // USE_AGNOCAST_ENABLED
35+
36+
namespace agnocast_wrapper
37+
{
38+
/**
39+
* @brief Templated types
40+
*/
41+
#ifdef USE_AGNOCAST_ENABLED
42+
template<typename MessageT>
43+
using MessagePtr = agnocast::ipc_shared_ptr<MessageT>;
44+
45+
template<typename MessageT>
46+
using SubscriptionPtr = typename agnocast::Subscription<MessageT>::SharedPtr;
47+
48+
template<typename MessageT>
49+
using PublisherPtr = typename agnocast::Publisher<MessageT>::SharedPtr;
50+
51+
using SubscriptionOptions = agnocast::SubscriptionOptions;
52+
using PublisherOptions = agnocast::PublisherOptions;
53+
#else
54+
template<typename MessageT>
55+
using MessagePtr = std::shared_ptr<MessageT>;
56+
57+
template<typename MessageT>
58+
using SubscriptionPtr = typename rclcpp::Subscription<MessageT>::SharedPtr;
59+
60+
template<typename MessageT>
61+
using PublisherPtr = typename rclcpp::Publisher<MessageT>::SharedPtr;
62+
63+
using SubscriptionOptions = rclcpp::SubscriptionOptions;
64+
using PublisherOptions = rclcpp::PublisherOptions;
65+
#endif // USE_AGNOCAST_ENABLED
66+
67+
/**
68+
* @brief Create subscription
69+
*/
70+
template<typename MessageT, typename CallbackT, typename NodeT>
71+
auto create_subscription(
72+
NodeT & node, const std::string & topic_name, const rclcpp::QoS & qos, CallbackT && callback,
73+
const SubscriptionOptions & options = SubscriptionOptions{}) -> SubscriptionPtr<MessageT>
74+
{
75+
#ifdef USE_AGNOCAST_ENABLED
76+
if constexpr (std::is_same_v<std::decay_t<NodeT>, rclcpp::Node::SharedPtr>) {
77+
return agnocast::create_subscription<MessageT>(
78+
node.get(), topic_name, qos, std::forward<CallbackT>(callback), options);
79+
} else {
80+
return agnocast::create_subscription<MessageT>(
81+
&node, topic_name, qos, std::forward<CallbackT>(callback), options);
82+
}
83+
#else
84+
if constexpr (std::is_same_v<std::decay_t<NodeT>, rclcpp::Node::SharedPtr>) {
85+
return node->template create_subscription<MessageT>(
86+
topic_name, qos, std::forward<CallbackT>(callback), options);
87+
} else {
88+
return node.template create_subscription<MessageT>(
89+
topic_name, qos, std::forward<CallbackT>(callback), options);
90+
}
91+
#endif // USE_AGNOCAST_ENABLED
92+
}
93+
94+
/**
95+
* @brief Create publisher
96+
*/
97+
template<typename MessageT, typename NodeT>
98+
auto create_publisher(
99+
NodeT & node, const std::string & topic_name, const rclcpp::QoS & qos,
100+
const PublisherOptions & options = PublisherOptions{}) -> PublisherPtr<MessageT>
101+
{
102+
#ifdef USE_AGNOCAST_ENABLED
103+
if constexpr (std::is_same_v<std::decay_t<NodeT>, rclcpp::Node::SharedPtr>) {
104+
return agnocast::create_publisher<MessageT>(node.get(), topic_name, qos, options);
105+
} else {
106+
return agnocast::create_publisher<MessageT>(&node, topic_name, qos, options);
107+
}
108+
#else
109+
if constexpr (std::is_same_v<std::decay_t<NodeT>, rclcpp::Node::SharedPtr>) {
110+
return node->template create_publisher<MessageT>(topic_name, qos, options);
111+
} else {
112+
return node.template create_publisher<MessageT>(topic_name, qos, options);
113+
}
114+
#endif // USE_AGNOCAST_ENABLED
115+
}
116+
117+
/**
118+
* @brief Create message object pointer
119+
* @param publisher_ptr pointer to the publisher for which the message will be
120+
* created. The message type will be deduced from the passed publisher.
121+
* @return pointer to the message - dependent on the publisher type
122+
*/
123+
template<typename PublisherPtrT>
124+
auto create_message(PublisherPtrT publisher_ptr)
125+
{
126+
#ifdef USE_AGNOCAST_ENABLED
127+
return publisher_ptr->borrow_loaned_message();
128+
#else
129+
using ROSMessageT =
130+
typename std::remove_reference<decltype(*publisher_ptr)>::type::ROSMessageType;
131+
return std::make_unique<ROSMessageT>();
132+
#endif // USE_AGNOCAST_ENABLED
133+
}
134+
} // namespace agnocast_wrapper
135+
136+
#endif // AGNOCAST_WRAPPER__AGNOCAST_WRAPPER_HPP_

common/agnocast_wrapper/package.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0"?>
2+
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
3+
<package format="3">
4+
<name>agnocast_wrapper</name>
5+
<version>16.3.0</version>
6+
<description>A wrapper package for agnocast</description>
7+
<maintainer email="[email protected]">Mateusz Palczuk</maintainer>
8+
<license>Apache License 2.0</license>
9+
10+
<buildtool_depend>ament_cmake</buildtool_depend>
11+
<buildtool_depend>ament_cmake_auto</buildtool_depend>
12+
13+
<depend>rclcpp</depend>
14+
<!-- <depend>agnocastlib</depend> agnocastlib is an optional dependency only required when USE_AGNOCAST_ENABLED is defined, therefore must be ignored here -->
15+
<test_depend>ament_lint_auto</test_depend>
16+
<test_depend>ament_lint_common</test_depend>
17+
18+
<export>
19+
<build_type>ament_cmake</build_type>
20+
</export>
21+
</package>

common/get_parameter/CHANGELOG.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22
Changelog for package get_parameter
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
16.3.0 (2025-04-25)
6+
-------------------
7+
* Merge branch 'master' into feature/agnocast
8+
* Merge branch 'master' into feature/agnocast
9+
* Revert "Revert "Merge branch 'master' into feature/agnocast""
10+
This reverts commit b54960a3492c52964556d54d5943c00cdfa10f50.
11+
* Revert "Merge branch 'master' into feature/agnocast"
12+
This reverts commit a01992c8e365edd59a52d918cccfec61885234f2, reversing
13+
changes made to 7f892377f23e4a7bfec460cbfa9f7cdd1b644806.
14+
* Merge branch 'master' into feature/agnocast
15+
* Merge branch 'master' into feature/agnocast
16+
* Merge branch 'master' into feature/agnocast
17+
* Contributors: Dawid Moszynski, Dawid Moszyński, Kotaro Yoshimoto, Mateusz Palczuk
18+
519
16.2.0 (2025-04-24)
620
-------------------
721

common/get_parameter/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>get_parameter</name>
5-
<version>16.2.0</version>
5+
<version>16.3.0</version>
66
<description>Thin wrapper for rclcpp::Node::get_parameter</description>
77
<maintainer email="[email protected]">Tatsuya Yamasaki</maintainer>
88
<license>Apache License 2.0</license>

common/math/arithmetic/CHANGELOG.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,20 @@ Changelog for package arithmetic
2121
* Merge remote-tracking branch 'origin/master' into feature/publish_empty_context
2222
* Contributors: Masaya Kataoka
2323

24+
16.3.0 (2025-04-25)
25+
-------------------
26+
* Merge branch 'master' into feature/agnocast
27+
* Merge branch 'master' into feature/agnocast
28+
* Revert "Revert "Merge branch 'master' into feature/agnocast""
29+
This reverts commit b54960a3492c52964556d54d5943c00cdfa10f50.
30+
* Revert "Merge branch 'master' into feature/agnocast"
31+
This reverts commit a01992c8e365edd59a52d918cccfec61885234f2, reversing
32+
changes made to 7f892377f23e4a7bfec460cbfa9f7cdd1b644806.
33+
* Merge branch 'master' into feature/agnocast
34+
* Merge branch 'master' into feature/agnocast
35+
* Merge branch 'master' into feature/agnocast
36+
* Contributors: Dawid Moszynski, Dawid Moszyński, Kotaro Yoshimoto, Mateusz Palczuk
37+
2438
16.2.0 (2025-04-24)
2539
-------------------
2640

common/math/arithmetic/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>arithmetic</name>
5-
<version>16.2.0</version>
5+
<version>16.3.0</version>
66
<description>arithmetic library for scenario_simulator_v2</description>
77
<maintainer email="[email protected]">Tatsuya Yamasaki</maintainer>
88
<license>Apache License 2.0</license>

common/math/geometry/CHANGELOG.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,20 @@ Changelog for package geometry
2121
* Merge remote-tracking branch 'origin/master' into feature/publish_empty_context
2222
* Contributors: Masaya Kataoka
2323

24+
16.3.0 (2025-04-25)
25+
-------------------
26+
* Merge branch 'master' into feature/agnocast
27+
* Merge branch 'master' into feature/agnocast
28+
* Revert "Revert "Merge branch 'master' into feature/agnocast""
29+
This reverts commit b54960a3492c52964556d54d5943c00cdfa10f50.
30+
* Revert "Merge branch 'master' into feature/agnocast"
31+
This reverts commit a01992c8e365edd59a52d918cccfec61885234f2, reversing
32+
changes made to 7f892377f23e4a7bfec460cbfa9f7cdd1b644806.
33+
* Merge branch 'master' into feature/agnocast
34+
* Merge branch 'master' into feature/agnocast
35+
* Merge branch 'master' into feature/agnocast
36+
* Contributors: Dawid Moszynski, Dawid Moszyński, Kotaro Yoshimoto, Mateusz Palczuk
37+
2438
16.2.0 (2025-04-24)
2539
-------------------
2640

common/math/geometry/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>geometry</name>
5-
<version>16.2.0</version>
5+
<version>16.3.0</version>
66
<description>geometry math library for scenario_simulator_v2 application</description>
77
<maintainer email="[email protected]">Masaya Kataoka</maintainer>
88
<license>Apache License 2.0</license>

common/scenario_simulator_exception/CHANGELOG.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,20 @@ Changelog for package scenario_simulator_exception
2121
* Merge remote-tracking branch 'origin/master' into feature/publish_empty_context
2222
* Contributors: Masaya Kataoka
2323

24+
16.3.0 (2025-04-25)
25+
-------------------
26+
* Merge branch 'master' into feature/agnocast
27+
* Merge branch 'master' into feature/agnocast
28+
* Revert "Revert "Merge branch 'master' into feature/agnocast""
29+
This reverts commit b54960a3492c52964556d54d5943c00cdfa10f50.
30+
* Revert "Merge branch 'master' into feature/agnocast"
31+
This reverts commit a01992c8e365edd59a52d918cccfec61885234f2, reversing
32+
changes made to 7f892377f23e4a7bfec460cbfa9f7cdd1b644806.
33+
* Merge branch 'master' into feature/agnocast
34+
* Merge branch 'master' into feature/agnocast
35+
* Merge branch 'master' into feature/agnocast
36+
* Contributors: Dawid Moszynski, Dawid Moszyński, Kotaro Yoshimoto, Mateusz Palczuk
37+
2438
16.2.0 (2025-04-24)
2539
-------------------
2640

common/scenario_simulator_exception/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>scenario_simulator_exception</name>
5-
<version>16.2.0</version>
5+
<version>16.3.0</version>
66
<description>Exception types for scenario simulator</description>
77
<maintainer email="[email protected]">Tatsuya Yamasaki</maintainer>
88
<license>Apache License 2.0</license>

common/simple_junit/CHANGELOG.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,20 @@ Changelog for package junit_exporter
2121
* Merge remote-tracking branch 'origin/master' into feature/publish_empty_context
2222
* Contributors: Masaya Kataoka
2323

24+
16.3.0 (2025-04-25)
25+
-------------------
26+
* Merge branch 'master' into feature/agnocast
27+
* Merge branch 'master' into feature/agnocast
28+
* Revert "Revert "Merge branch 'master' into feature/agnocast""
29+
This reverts commit b54960a3492c52964556d54d5943c00cdfa10f50.
30+
* Revert "Merge branch 'master' into feature/agnocast"
31+
This reverts commit a01992c8e365edd59a52d918cccfec61885234f2, reversing
32+
changes made to 7f892377f23e4a7bfec460cbfa9f7cdd1b644806.
33+
* Merge branch 'master' into feature/agnocast
34+
* Merge branch 'master' into feature/agnocast
35+
* Merge branch 'master' into feature/agnocast
36+
* Contributors: Dawid Moszynski, Dawid Moszyński, Kotaro Yoshimoto, Mateusz Palczuk
37+
2438
16.2.0 (2025-04-24)
2539
-------------------
2640

0 commit comments

Comments
 (0)