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 69360fa commit 01e0d9d
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@
class VehicleCmdAnalyzer : public rclcpp::Node
{
private:
rclcpp::Subscription<autoware_control_msgs::msg::Control>::SharedPtr
sub_vehicle_cmd_;
rclcpp::Subscription<autoware_control_msgs::msg::Control>::SharedPtr sub_vehicle_cmd_;
rclcpp::Publisher<tier4_debug_msgs::msg::Float32MultiArrayStamped>::SharedPtr pub_debug_;
rclcpp::TimerBase::SharedPtr timer_control_;

std::shared_ptr<autoware_control_msgs::msg::Control> vehicle_cmd_ptr_{
nullptr};
std::shared_ptr<autoware_control_msgs::msg::Control> vehicle_cmd_ptr_{nullptr};

// timer callback
double control_rate_;
Expand All @@ -54,8 +52,7 @@ class VehicleCmdAnalyzer : public rclcpp::Node
// debug values
DebugValues debug_values_;

void callbackVehicleCommand(
const autoware_control_msgs::msg::Control::SharedPtr msg);
void callbackVehicleCommand(const autoware_control_msgs::msg::Control::SharedPtr msg);

void callbackTimerControl();

Expand Down
10 changes: 4 additions & 6 deletions control/vehicle_cmd_analyzer/src/vehicle_cmd_analyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ VehicleCmdAnalyzer::VehicleCmdAnalyzer(const rclcpp::NodeOptions & options)
const auto vehicle_info = vehicle_info_util::VehicleInfoUtil(*this).getVehicleInfo();
wheelbase_ = vehicle_info.wheel_base_m;

sub_vehicle_cmd_ =
this->create_subscription<autoware_control_msgs::msg::Control>(
"/control/command/control_cmd", rclcpp::QoS(10),
std::bind(&VehicleCmdAnalyzer::callbackVehicleCommand, this, std::placeholders::_1));
sub_vehicle_cmd_ = this->create_subscription<autoware_control_msgs::msg::Control>(
"/control/command/control_cmd", rclcpp::QoS(10),
std::bind(&VehicleCmdAnalyzer::callbackVehicleCommand, this, std::placeholders::_1));
pub_debug_ = create_publisher<tier4_debug_msgs::msg::Float32MultiArrayStamped>(
"~/debug_values", rclcpp::QoS{1});

Expand All @@ -52,8 +51,7 @@ VehicleCmdAnalyzer::VehicleCmdAnalyzer(const rclcpp::NodeOptions & options)
void VehicleCmdAnalyzer::callbackVehicleCommand(
const autoware_control_msgs::msg::Control::SharedPtr msg)
{
vehicle_cmd_ptr_ =
std::make_shared<autoware_control_msgs::msg::Control>(*msg);
vehicle_cmd_ptr_ = std::make_shared<autoware_control_msgs::msg::Control>(*msg);
}

void VehicleCmdAnalyzer::callbackTimerControl()
Expand Down
10 changes: 5 additions & 5 deletions localization/deviation_estimation_tools/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ The parameters and input topic names can be seen in the `deviation_estimator.lau

#### Input

| Name | Type | Description |
| ------------------------ | ------------------------------------------------- | -------------------- |
| `in_pose_with_covariance | `geometry_msgs::msg::PoseWithCovarianceStamped` | Input pose |
| `in_imu` | `sensor_msgs::msg::Imu` | Input IMU data |
| `in_wheel_odometry` | `autoware_vehicle_msgs::msg::VelocityReport` | Input wheel odometry |
| Name | Type | Description |
| ------------------------ | ----------------------------------------------- | -------------------- |
| `in_pose_with_covariance | `geometry_msgs::msg::PoseWithCovarianceStamped` | Input pose |
| `in_imu` | `sensor_msgs::msg::Imu` | Input IMU data |
| `in_wheel_odometry` | `autoware_vehicle_msgs::msg::VelocityReport` | Input wheel odometry |

#### Output

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ class DeviationEstimator : public rclcpp::Node

private:
rclcpp::Subscription<geometry_msgs::msg::PoseWithCovarianceStamped>::SharedPtr sub_pose_with_cov_;
rclcpp::Subscription<autoware_vehicle_msgs::msg::VelocityReport>::SharedPtr
sub_wheel_odometry_;
rclcpp::Subscription<autoware_vehicle_msgs::msg::VelocityReport>::SharedPtr sub_wheel_odometry_;
rclcpp::Subscription<sensor_msgs::msg::Imu>::SharedPtr sub_imu_;
rclcpp::Publisher<std_msgs::msg::Float64>::SharedPtr pub_coef_vx_;
rclcpp::Publisher<geometry_msgs::msg::Vector3>::SharedPtr pub_bias_angvel_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ int main(int argc, char ** argv)
reader.open(storage_options, converter_options);

// Prepare serialization
rclcpp::Serialization<autoware_vehicle_msgs::msg::VelocityReport>
serialization_velocity_status;
rclcpp::Serialization<autoware_vehicle_msgs::msg::VelocityReport> serialization_velocity_status;
rclcpp::Serialization<tf2_msgs::msg::TFMessage> serialization_tf;
rclcpp::Serialization<sensor_msgs::msg::Imu> serialization_imu;
rclcpp::Serialization<geometry_msgs::msg::PoseWithCovarianceStamped> serialization_pose;
Expand Down
7 changes: 3 additions & 4 deletions vehicle/parameter_estimator/src/parameter_estimator_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,9 @@ ParameterEstimatorNode::ParameterEstimatorNode(const rclcpp::NodeOptions & node_
sub_steer_ = create_subscription<tier4_calibration_msgs::msg::Float32Stamped>(
"input/steer", queue_size, std::bind(&ParameterEstimatorNode::callbackSteer, this, _1));
}
sub_control_mode_report_ =
create_subscription<autoware_vehicle_msgs::msg::ControlModeReport>(
"input/control_mode", queue_size,
std::bind(&ParameterEstimatorNode::callbackControlModeReport, this, _1));
sub_control_mode_report_ = create_subscription<autoware_vehicle_msgs::msg::ControlModeReport>(
"input/control_mode", queue_size,
std::bind(&ParameterEstimatorNode::callbackControlModeReport, this, _1));

initTimer(1.0 / update_hz_);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ class TimeDelayEstimatorNode : public rclcpp::Node
rclcpp::Publisher<TimeDelay>::SharedPtr pub_time_delay_steer_;

// input subscription
rclcpp::Subscription<autoware_vehicle_msgs::msg::ControlModeReport>::SharedPtr
sub_control_mode_;
rclcpp::Subscription<autoware_vehicle_msgs::msg::ControlModeReport>::SharedPtr sub_control_mode_;

// response subscription
rclcpp::Subscription<Float32Stamped>::SharedPtr sub_accel_cmd_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,9 @@ TimeDelayEstimatorNode::TimeDelayEstimatorNode(const rclcpp::NodeOptions & node_

last_manual_time_ = this->now().seconds();
// input
sub_control_mode_report_ =
create_subscription<autoware_vehicle_msgs::msg::ControlModeReport>(
"~/input/control_mode", queue_size,
std::bind(&TimeDelayEstimatorNode::callbackControlModeReport, this, _1));
sub_control_mode_report_ = create_subscription<autoware_vehicle_msgs::msg::ControlModeReport>(
"~/input/control_mode", queue_size,
std::bind(&TimeDelayEstimatorNode::callbackControlModeReport, this, _1));

// response
sub_input_cmd_ = create_subscription<Float32Stamped>(
Expand Down

0 comments on commit 01e0d9d

Please sign in to comment.