@@ -95,7 +95,7 @@ hardware_interface::return_type DiffBotSystemHardware::configure(
9595std::vector<hardware_interface::StateInterface> DiffBotSystemHardware::export_state_interfaces ()
9696{
9797 std::vector<hardware_interface::StateInterface> state_interfaces;
98- for (uint i = 0 ; i < info_.joints .size (); i++)
98+ for (auto i = 0u ; i < info_.joints .size (); i++)
9999 {
100100 state_interfaces.emplace_back (hardware_interface::StateInterface (
101101 info_.joints [i].name , hardware_interface::HW_IF_POSITION, &hw_states_[i]));
@@ -109,7 +109,7 @@ std::vector<hardware_interface::StateInterface> DiffBotSystemHardware::export_st
109109std::vector<hardware_interface::CommandInterface> DiffBotSystemHardware::export_command_interfaces ()
110110{
111111 std::vector<hardware_interface::CommandInterface> command_interfaces;
112- for (uint i = 0 ; i < info_.joints .size (); i++)
112+ for (auto i = 0u ; i < info_.joints .size (); i++)
113113 {
114114 command_interfaces.emplace_back (hardware_interface::CommandInterface (
115115 info_.joints [i].name , hardware_interface::HW_IF_VELOCITY, &hw_commands_[i]));
@@ -122,15 +122,15 @@ hardware_interface::return_type DiffBotSystemHardware::start()
122122{
123123 RCLCPP_INFO (rclcpp::get_logger (" DiffBotSystemHardware" ), " Starting ...please wait..." );
124124
125- for (int i = 0 ; i <= hw_start_sec_; i++)
125+ for (auto i = 0 ; i <= hw_start_sec_; i++)
126126 {
127127 rclcpp::sleep_for (std::chrono::seconds (1 ));
128128 RCLCPP_INFO (
129129 rclcpp::get_logger (" DiffBotSystemHardware" ), " %.1f seconds left..." , hw_start_sec_ - i);
130130 }
131131
132132 // set some default values
133- for (uint i = 0 ; i < hw_states_.size (); i++)
133+ for (auto i = 0u ; i < hw_states_.size (); i++)
134134 {
135135 if (std::isnan (hw_states_[i]))
136136 {
@@ -150,7 +150,7 @@ hardware_interface::return_type DiffBotSystemHardware::stop()
150150{
151151 RCLCPP_INFO (rclcpp::get_logger (" DiffBotSystemHardware" ), " Stopping ...please wait..." );
152152
153- for (int i = 0 ; i <= hw_stop_sec_; i++)
153+ for (auto i = 0 ; i <= hw_stop_sec_; i++)
154154 {
155155 rclcpp::sleep_for (std::chrono::seconds (1 ));
156156 RCLCPP_INFO (
@@ -190,7 +190,7 @@ hardware_interface::return_type ros2_control_demo_hardware::DiffBotSystemHardwar
190190{
191191 RCLCPP_INFO (rclcpp::get_logger (" DiffBotSystemHardware" ), " Writing..." );
192192
193- for (uint i = 0 ; i < hw_commands_.size (); i++)
193+ for (auto i = 0u ; i < hw_commands_.size (); i++)
194194 {
195195 // Simulate sending commands to the hardware
196196 RCLCPP_INFO (
0 commit comments