Skip to content

Commit efdd814

Browse files
style(pre-commit): autofix
1 parent ad9f7b3 commit efdd814

File tree

4 files changed

+38
-24
lines changed

4 files changed

+38
-24
lines changed

launch/tier4_simulator_launch/launch/simulator.launch.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
</include>
4848
</group>
4949

50-
<!-- Dummy localization -->
50+
<!-- Dummy localization -->
5151
<group if="$(var launch_dummy_localization)">
5252
<include file="$(find-pkg-share pose_initializer)/launch/pose_initializer.launch.xml">
5353
<arg name="ndt_enabled" value="false"/>

perception/occupancy_grid_map_outlier_filter/src/occupancy_grid_map_outlier_filter_nodelet.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ void OccupancyGridMapOutlierFilterComponent::onOccupancyGridMapAndPointCloud2(
304304
ogm_frame_filtered_pc, *tf2_, base_link_frame_, *base_link_frame_filtered_pc_ptr)) {
305305
return;
306306
}
307-
base_link_frame_filtered_pc_ptr->header.stamp = this->now();
308-
pointcloud_pub_->publish(std::move(base_link_frame_filtered_pc_ptr));
307+
base_link_frame_filtered_pc_ptr->header.stamp = this->now();
308+
pointcloud_pub_->publish(std::move(base_link_frame_filtered_pc_ptr));
309309
}
310310
if (debugger_ptr_) {
311311
debugger_ptr_->publishHighConfidence(high_confidence_pc, ogm_frame_pc.header);

tools/reaction_analyzer/include/reaction_analyzer_node.hpp

+35-20
Original file line numberDiff line numberDiff line change
@@ -159,22 +159,27 @@ template <typename T>
159159
struct PublisherVariablesMessageTypeExtractor;
160160

161161
template <typename MessageType>
162-
struct PublisherVariablesMessageTypeExtractor<PublisherVariables<MessageType>> {
162+
struct PublisherVariablesMessageTypeExtractor<PublisherVariables<MessageType>>
163+
{
163164
using Type = MessageType;
164165
};
165166

166-
template<typename T, typename = std::void_t<>>
167-
struct has_header : std::false_type {};
168-
169-
template<typename T>
170-
struct has_header<T, std::void_t<decltype(T::header)>> : std::true_type {};
171-
167+
template <typename T, typename = std::void_t<>>
168+
struct has_header : std::false_type
169+
{
170+
};
172171

173-
struct PublisherVarAccessor {
172+
template <typename T>
173+
struct has_header<T, std::void_t<decltype(T::header)>> : std::true_type
174+
{
175+
};
174176

177+
struct PublisherVarAccessor
178+
{
175179
// Method to set header time if available
176180
template <typename T>
177-
void setHeaderTimeIfAvailable(T& publisherVar, const rclcpp::Time& time) {
181+
void setHeaderTimeIfAvailable(T & publisherVar, const rclcpp::Time & time)
182+
{
178183
if constexpr (has_header<typename T::MessageType>::value) {
179184
if (publisherVar.empty_area_message) {
180185
publisherVar.empty_area_message->header.stamp = time;
@@ -187,66 +192,76 @@ struct PublisherVarAccessor {
187192

188193
// Set Period
189194
template <typename T>
190-
void setPeriod(T& publisherVar, double newPeriod) {
195+
void setPeriod(T & publisherVar, double newPeriod)
196+
{
191197
publisherVar.period_ns = newPeriod;
192198
}
193199

194200
// Get Period
195201
template <typename T>
196-
double getPeriod(const T& publisherVar) const {
202+
double getPeriod(const T & publisherVar) const
203+
{
197204
return publisherVar.period_ns;
198205
}
199206

200207
// Set Empty Area Message
201208
template <typename T, typename Message>
202-
void setEmptyAreaMessage(T& publisherVar, typename Message::SharedPtr message) {
209+
void setEmptyAreaMessage(T & publisherVar, typename Message::SharedPtr message)
210+
{
203211
publisherVar.empty_area_message = message;
204212
}
205213

206214
// Get Empty Area Message
207215
template <typename T>
208-
std::shared_ptr<void> getEmptyAreaMessage(const T& publisherVar) const {
216+
std::shared_ptr<void> getEmptyAreaMessage(const T & publisherVar) const
217+
{
209218
return std::static_pointer_cast<void>(publisherVar.empty_area_message);
210219
}
211220

212221
// Set Object Spawned Message
213222
template <typename T, typename Message>
214-
void setObjectSpawnedMessage(T& publisherVar, typename Message::SharedPtr message) {
223+
void setObjectSpawnedMessage(T & publisherVar, typename Message::SharedPtr message)
224+
{
215225
publisherVar.object_spawned_message = message;
216226
}
217227

218228
// Get Object Spawned Message
219229
template <typename T>
220-
std::shared_ptr<void> getObjectSpawnedMessage(const T& publisherVar) const {
230+
std::shared_ptr<void> getObjectSpawnedMessage(const T & publisherVar) const
231+
{
221232
return std::static_pointer_cast<void>(publisherVar.object_spawned_message);
222233
}
223234

224235
// Set Publisher
225236
template <typename T, typename PublisherType>
226-
void setPublisher(T& publisherVar, typename rclcpp::Publisher<PublisherType>::SharedPtr publisher) {
237+
void setPublisher(
238+
T & publisherVar, typename rclcpp::Publisher<PublisherType>::SharedPtr publisher)
239+
{
227240
publisherVar.publisher = publisher;
228241
}
229242

230243
// Get Publisher
231244
template <typename T>
232-
std::shared_ptr<void> getPublisher(const T& publisherVar) const {
245+
std::shared_ptr<void> getPublisher(const T & publisherVar) const
246+
{
233247
return std::static_pointer_cast<void>(publisherVar.publisher);
234248
}
235249

236250
// Set Timer
237251
template <typename T>
238-
void setTimer(T& publisherVar, rclcpp::TimerBase::SharedPtr newTimer) {
252+
void setTimer(T & publisherVar, rclcpp::TimerBase::SharedPtr newTimer)
253+
{
239254
publisherVar.timer = newTimer;
240255
}
241256

242257
// Get Timer
243258
template <typename T>
244-
std::shared_ptr<void> getTimer(const T& publisherVar) const {
259+
std::shared_ptr<void> getTimer(const T & publisherVar) const
260+
{
245261
return std::static_pointer_cast<void>(publisherVar.timer);
246262
}
247263
};
248264

249-
250265
using PublisherVariablesVariant = std::variant<
251266
PublisherVariables<PointCloud2>, PublisherVariables<sensor_msgs::msg::CameraInfo>,
252267
PublisherVariables<sensor_msgs::msg::Image>,

tools/reaction_analyzer/src/reaction_analyzer_node.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,6 @@ void ReactionAnalyzerNode::onTimer()
10631063
if (
10641064
initialization_state_ptr &&
10651065
initialization_state_ptr->state == LocalizationInitializationState::INITIALIZED) {
1066-
10671066
if (route_state_ptr && route_state_ptr->state != RouteState::SET && !is_route_set_) {
10681067
// publish goal pose
10691068
is_route_set_ = true;

0 commit comments

Comments
 (0)