Skip to content

Commit

Permalink
style(pre-commit): autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Mar 14, 2024
1 parent be994ed commit 081eaaa
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ class PublishedTimePublisher
{
}

void publish_if_subscribed(const rclcpp::PublisherBase::ConstSharedPtr & publisher, const rclcpp::Time & stamp)
void publish_if_subscribed(
const rclcpp::PublisherBase::ConstSharedPtr & publisher, const rclcpp::Time & stamp)
{
const auto & gid_key = publisher->get_gid();

Expand Down
3 changes: 2 additions & 1 deletion control/vehicle_cmd_gate/src/vehicle_cmd_gate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ void VehicleCmdGate::publishControlCommands(const Commands & commands)
// Publish commands
vehicle_cmd_emergency_pub_->publish(vehicle_cmd_emergency);
control_cmd_pub_->publish(filtered_commands.control);
published_time_publisher_->publish_if_subscribed(control_cmd_pub_, filtered_commands.control.stamp);
published_time_publisher_->publish_if_subscribed(
control_cmd_pub_, filtered_commands.control.stamp);
adapi_pause_->publish();
moderate_stop_interface_->publish();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@ void OccupancyGridMapOutlierFilterComponent::onOccupancyGridMapAndPointCloud2(
return;
}
pointcloud_pub_->publish(std::move(base_link_frame_filtered_pc_ptr));
published_time_publisher_->publish_if_subscribed(pointcloud_pub_, ogm_frame_filtered_pc.header.stamp);
published_time_publisher_->publish_if_subscribed(
pointcloud_pub_, ogm_frame_filtered_pc.header.stamp);
}
if (debugger_ptr_) {
debugger_ptr_->publishHighConfidence(high_confidence_pc, ogm_frame_pc.header);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ void DecorativeTrackerMergerNode::mainObjectsCallback(
this->decorativeMerger(main_sensor_type_, main_objects);
const auto & tracked_objects = getTrackedObjects(main_objects->header);
merged_object_pub_->publish(tracked_objects);
published_time_publisher_->publish_if_subscribed(merged_object_pub_, tracked_objects.header.stamp);
published_time_publisher_->publish_if_subscribed(
merged_object_pub_, tracked_objects.header.stamp);
processing_time_publisher_->publish<tier4_debug_msgs::msg::Float64Stamped>(
"debug/cyclic_time_ms", stop_watch_ptr_->toc("cyclic_time", true));
processing_time_publisher_->publish<tier4_debug_msgs::msg::Float64Stamped>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ void MotionVelocitySmootherNode::publishTrajectory(const TrajectoryPoints & traj
Trajectory publishing_trajectory = motion_utils::convertToTrajectory(trajectory);
publishing_trajectory.header = base_traj_raw_ptr_->header;
pub_trajectory_->publish(publishing_trajectory);
published_time_publisher_->publish_if_subscribed(pub_trajectory_, publishing_trajectory.header.stamp);
published_time_publisher_->publish_if_subscribed(
pub_trajectory_, publishing_trajectory.header.stamp);
}

void MotionVelocitySmootherNode::onCurrentOdometry(const Odometry::ConstSharedPtr msg)
Expand Down
3 changes: 2 additions & 1 deletion planning/planning_validator/src/planning_validator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ void PlanningValidator::publishTrajectory()
if (invalid_trajectory_handling_type_ == InvalidTrajectoryHandlingType::USE_PREVIOUS_RESULT) {
if (previous_published_trajectory_) {
pub_traj_->publish(*previous_published_trajectory_);
published_time_publisher_->publish_if_subscribed(pub_traj_, previous_published_trajectory_->header.stamp);
published_time_publisher_->publish_if_subscribed(
pub_traj_, previous_published_trajectory_->header.stamp);
RCLCPP_ERROR(get_logger(), "Invalid Trajectory detected. Use previous trajectory.");
return;
}
Expand Down

0 comments on commit 081eaaa

Please sign in to comment.