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 Dec 6, 2024
1 parent ee9f62d commit 38e35d5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ ControlCmdSwitcher::ControlCmdSwitcher(const rclcpp::NodeOptions & node_options)
: Node("control_cmd_switcher", node_options)
{
// Subscriber
sub_main_control_cmd_ =
create_subscription<autoware_control_msgs::msg::Control>(
"~/input/main/control_cmd", rclcpp::QoS{10},
std::bind(&ControlCmdSwitcher::onMainControlCmd, this, std::placeholders::_1));
sub_main_control_cmd_ = create_subscription<autoware_control_msgs::msg::Control>(
"~/input/main/control_cmd", rclcpp::QoS{10},
std::bind(&ControlCmdSwitcher::onMainControlCmd, this, std::placeholders::_1));

sub_sub_control_cmd_ =
create_subscription<autoware_control_msgs::msg::Control>(
"~/input/sub/control_cmd", rclcpp::QoS{10},
std::bind(&ControlCmdSwitcher::onSubControlCmd, this, std::placeholders::_1));
sub_sub_control_cmd_ = create_subscription<autoware_control_msgs::msg::Control>(
"~/input/sub/control_cmd", rclcpp::QoS{10},
std::bind(&ControlCmdSwitcher::onSubControlCmd, this, std::placeholders::_1));

sub_election_status_main_ = create_subscription<tier4_system_msgs::msg::ElectionStatus>(
"~/input/election/status/main", rclcpp::QoS{10},
Expand All @@ -41,8 +39,8 @@ ControlCmdSwitcher::ControlCmdSwitcher(const rclcpp::NodeOptions & node_options)
std::bind(&ControlCmdSwitcher::onElectionStatus, this, std::placeholders::_1));

// Publisher
pub_control_cmd_ = create_publisher<autoware_control_msgs::msg::Control>(
"~/output/control_cmd", rclcpp::QoS{1});
pub_control_cmd_ =
create_publisher<autoware_control_msgs::msg::Control>("~/output/control_cmd", rclcpp::QoS{1});

// Initialize
use_main_control_cmd_ = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,16 @@ class ControlCmdSwitcher : public rclcpp::Node

private:
// Subscribers
rclcpp::Subscription<autoware_control_msgs::msg::Control>::SharedPtr
sub_main_control_cmd_;
rclcpp::Subscription<autoware_control_msgs::msg::Control>::SharedPtr
sub_sub_control_cmd_;
rclcpp::Subscription<autoware_control_msgs::msg::Control>::SharedPtr sub_main_control_cmd_;
rclcpp::Subscription<autoware_control_msgs::msg::Control>::SharedPtr sub_sub_control_cmd_;
rclcpp::Subscription<tier4_system_msgs::msg::ElectionStatus>::SharedPtr sub_election_status_main_;
rclcpp::Subscription<tier4_system_msgs::msg::ElectionStatus>::SharedPtr sub_election_status_sub_;
void onMainControlCmd(
const autoware_control_msgs::msg::Control::ConstSharedPtr msg);
void onSubControlCmd(
const autoware_control_msgs::msg::Control::ConstSharedPtr msg);
void onMainControlCmd(const autoware_control_msgs::msg::Control::ConstSharedPtr msg);
void onSubControlCmd(const autoware_control_msgs::msg::Control::ConstSharedPtr msg);
void onElectionStatus(const tier4_system_msgs::msg::ElectionStatus::ConstSharedPtr msg);

// Publisher
rclcpp::Publisher<autoware_control_msgs::msg::Control>::SharedPtr
pub_control_cmd_;
rclcpp::Publisher<autoware_control_msgs::msg::Control>::SharedPtr pub_control_cmd_;

std::atomic<bool> use_main_control_cmd_;
};
Expand Down

0 comments on commit 38e35d5

Please sign in to comment.