File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ class TR1200Interface : public hardware_interface::SystemInterface
120
120
rclcpp::Publisher<BatteryState>::SharedPtr pub_battery_state_;
121
121
122
122
// True to publish unmeasured battery state values as NaNs, false to publish -1s
123
- bool publish_battery_state_nans_{false };
123
+ bool publish_battery_state_nans_{true };
124
124
};
125
125
126
126
} // namespace tr1200_base
Original file line number Diff line number Diff line change @@ -60,13 +60,14 @@ CallbackReturn TR1200Interface::on_init(const hardware_interface::HardwareInfo &
60
60
port_name_.c_str ());
61
61
62
62
try {
63
- publish_battery_state_nans_ = info_.hardware_parameters .at (" publish_battery_state_nans" ) == " true" ;
63
+ publish_battery_state_nans_ =
64
+ info_.hardware_parameters .at (" publish_battery_state_nans" ) == " true" ;
64
65
} catch (const std::out_of_range & /* e */ ) {
65
66
RCLCPP_DEBUG (
66
67
node_->get_logger (),
67
68
" Could not find publish_battery_state_nans in hardware parameters, setting to default of "
68
- " 'false '." );
69
- publish_battery_state_nans_ = false ;
69
+ " 'true '." );
70
+ publish_battery_state_nans_ = true ;
70
71
}
71
72
72
73
// get joint names from parameters
You can’t perform that action at this time.
0 commit comments