|
24 | 24 |
|
25 | 25 | #include "behaviortree_ros2/ros_node_params.hpp" |
26 | 26 | #include "rclcpp/rclcpp.hpp" |
27 | | -#include "sensor_msgs/msg/joy.hpp" |
28 | 27 |
|
29 | 28 | #include "husarion_ugv_utils/moving_average.hpp" |
30 | 29 |
|
@@ -72,8 +71,6 @@ void LightsManagerNode::Initialize() |
72 | 71 | e_stop_sub_ = this->create_subscription<BoolMsg>( |
73 | 72 | "hardware/e_stop", rclcpp::QoS(rclcpp::KeepLast(1)).transient_local().reliable(), |
74 | 73 | std::bind(&LightsManagerNode::EStopCB, this, _1)); |
75 | | - joy_sub_ = this->create_subscription<JoyMsg>( |
76 | | - "joy", 10, std::bind(&LightsManagerNode::JoyCB, this, _1)); |
77 | 74 |
|
78 | 75 | const double timer_freq = this->params_.timer_frequency; |
79 | 76 | const auto timer_period = std::chrono::duration<double>(1.0 / timer_freq); |
@@ -126,7 +123,6 @@ std::map<std::string, std::any> LightsManagerNode::CreateLightsInitialBlackboard |
126 | 123 | {"current_anim_id", undefined_anim_id}, |
127 | 124 | {"current_battery_anim_id", undefined_anim_id}, |
128 | 125 | {"current_error_anim_id", undefined_anim_id}, |
129 | | - {"drive_state", false}, |
130 | 126 | {"CRITICAL_BATTERY_THRESHOLD_PERCENT", critical_battery_threshold_percent}, |
131 | 127 | {"LOW_BATTERY_ANIM_PERIOD", low_battery_anim_period}, |
132 | 128 | {"LOW_BATTERY_THRESHOLD_PERCENT", low_battery_threshold_percent}, |
@@ -190,12 +186,6 @@ void LightsManagerNode::EStopCB(const BoolMsg::SharedPtr e_stop) |
190 | 186 | lights_tree_manager_->GetBlackboard()->set<bool>("e_stop_state", e_stop->data); |
191 | 187 | } |
192 | 188 |
|
193 | | -void LightsManagerNode::JoyCB(const JoyMsg::SharedPtr joy) |
194 | | -{ |
195 | | - lights_tree_manager_->GetBlackboard()->set<bool>( |
196 | | - "drive_state", joy->buttons[kDeadManButtonIndex]); |
197 | | -} |
198 | | - |
199 | 189 | void LightsManagerNode::LightsTreeTimerCB() |
200 | 190 | { |
201 | 191 | if (!SystemReady()) { |
|
0 commit comments