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 Jun 7, 2024
1 parent b27b65b commit 1010386
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
3 changes: 1 addition & 2 deletions localization/gyro_odometer/src/gyro_odometer_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ void GyroOdometerNode::callback_vehicle_twist(
diagnostics_->clear();
diagnostics_->add_key_value(
"topic_time_stamp",
static_cast<rclcpp::Time>(vehicle_twist_msg_ptr->header.stamp).nanoseconds()
);
static_cast<rclcpp::Time>(vehicle_twist_msg_ptr->header.stamp).nanoseconds());

vehicle_twist_arrived_ = true;
latest_vehicle_twist_ros_time_ = vehicle_twist_msg_ptr->header.stamp;
Expand Down
21 changes: 9 additions & 12 deletions localization/gyro_odometer/test/test_gyro_odometer_pubsub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ class VelocityGenerator : public rclcpp::Node
class GyroOdometerValidator : public rclcpp::Node
{
public:
GyroOdometerValidator() : Node("gyro_odometer_validator"),
twist_sub(create_subscription<TwistWithCovarianceStamped>("/twist_with_covariance", 1,
GyroOdometerValidator()
: Node("gyro_odometer_validator"),
twist_sub(create_subscription<TwistWithCovarianceStamped>(
"/twist_with_covariance", 1,
[this](const TwistWithCovarianceStamped::ConstSharedPtr msg) {
received_latest_twist_ptr = msg;
})
),
})),
received_latest_twist_ptr(nullptr)
{
}
Expand Down Expand Up @@ -110,10 +111,8 @@ TEST(GyroOdometer, TestGyroOdometerWithImuAndVelocity)
expected_output_twist.twist.twist.angular.y = input_imu.angular_velocity.y;
expected_output_twist.twist.twist.angular.z = input_imu.angular_velocity.z;

auto gyro_odometer_node =
std::make_shared<autoware::gyro_odometer::GyroOdometerNode>(
get_node_options_with_default_params()
);
auto gyro_odometer_node = std::make_shared<autoware::gyro_odometer::GyroOdometerNode>(
get_node_options_with_default_params());
auto imu_generator = std::make_shared<ImuGenerator>();
auto velocity_generator = std::make_shared<VelocityGenerator>();
auto gyro_odometer_validator_node = std::make_shared<GyroOdometerValidator>();
Expand All @@ -140,10 +139,8 @@ TEST(GyroOdometer, TestGyroOdometerImuOnly)
{
Imu input_imu = generate_sample_imu();

auto gyro_odometer_node =
std::make_shared<autoware::gyro_odometer::GyroOdometerNode>(
get_node_options_with_default_params()
);
auto gyro_odometer_node = std::make_shared<autoware::gyro_odometer::GyroOdometerNode>(
get_node_options_with_default_params());
auto imu_generator = std::make_shared<ImuGenerator>();
auto gyro_odometer_validator_node = std::make_shared<GyroOdometerValidator>();

Expand Down

0 comments on commit 1010386

Please sign in to comment.