Skip to content

Commit

Permalink
fix(autoware_state_panel): fix message type for /api/autoware/get/eng…
Browse files Browse the repository at this point in the history
…age (tier4#666)

* fix(autoware_state_panel): fix message type for /api/autoware/get/engage

Signed-off-by: h-ohta <hiroki.ota@tier4.jp>

* ci(pre-commit): autofix

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
h-ohta and pre-commit-ci[bot] authored Apr 11, 2022
1 parent 0690195 commit 49cc906
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions common/tier4_state_rviz_plugin/src/autoware_state_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void AutowareStatePanel::onInitialize()
sub_gear_ = raw_node_->create_subscription<autoware_auto_vehicle_msgs::msg::GearReport>(
"/vehicle/status/gear_status", 10, std::bind(&AutowareStatePanel::onShift, this, _1));

sub_engage_ = raw_node_->create_subscription<tier4_external_api_msgs::msg::EngageStatus>(
sub_engage_ = raw_node_->create_subscription<autoware_auto_vehicle_msgs::msg::Engage>(
"/api/autoware/get/engage", 10, std::bind(&AutowareStatePanel::onEngageStatus, this, _1));

client_engage_ = raw_node_->create_client<tier4_external_api_msgs::srv::Engage>(
Expand Down Expand Up @@ -209,7 +209,7 @@ void AutowareStatePanel::onShift(
}

void AutowareStatePanel::onEngageStatus(
const tier4_external_api_msgs::msg::EngageStatus::ConstSharedPtr msg)
const autoware_auto_vehicle_msgs::msg::Engage::ConstSharedPtr msg)
{
current_engage_ = msg->engage;
engage_status_label_ptr_->setText(QString::fromStdString(Bool2String(current_engage_)));
Expand Down
6 changes: 3 additions & 3 deletions common/tier4_state_rviz_plugin/src/autoware_state_panel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
#include <rviz_common/panel.hpp>

#include <autoware_auto_system_msgs/msg/autoware_state.hpp>
#include <autoware_auto_vehicle_msgs/msg/engage.hpp>
#include <autoware_auto_vehicle_msgs/msg/gear_report.hpp>
#include <tier4_control_msgs/msg/external_command_selector_mode.hpp>
#include <tier4_control_msgs/msg/gate_mode.hpp>
#include <tier4_external_api_msgs/msg/engage_status.hpp>
#include <tier4_external_api_msgs/srv/engage.hpp>

namespace rviz_plugins
Expand All @@ -48,7 +48,7 @@ public Q_SLOTS:
const tier4_control_msgs::msg::ExternalCommandSelectorMode::ConstSharedPtr msg);
void onAutowareState(const autoware_auto_system_msgs::msg::AutowareState::ConstSharedPtr msg);
void onShift(const autoware_auto_vehicle_msgs::msg::GearReport::ConstSharedPtr msg);
void onEngageStatus(const tier4_external_api_msgs::msg::EngageStatus::ConstSharedPtr msg);
void onEngageStatus(const autoware_auto_vehicle_msgs::msg::Engage::ConstSharedPtr msg);

rclcpp::Node::SharedPtr raw_node_;
rclcpp::Subscription<tier4_control_msgs::msg::GateMode>::SharedPtr sub_gate_mode_;
Expand All @@ -57,7 +57,7 @@ public Q_SLOTS:
rclcpp::Subscription<autoware_auto_system_msgs::msg::AutowareState>::SharedPtr
sub_autoware_state_;
rclcpp::Subscription<autoware_auto_vehicle_msgs::msg::GearReport>::SharedPtr sub_gear_;
rclcpp::Subscription<tier4_external_api_msgs::msg::EngageStatus>::SharedPtr sub_engage_;
rclcpp::Subscription<autoware_auto_vehicle_msgs::msg::Engage>::SharedPtr sub_engage_;

rclcpp::Client<tier4_external_api_msgs::srv::Engage>::SharedPtr client_engage_;

Expand Down

0 comments on commit 49cc906

Please sign in to comment.