Skip to content

Commit 4f81b55

Browse files
committed
change rest of component_interface test and mark what should be removed
1 parent 0f340d0 commit 4f81b55

File tree

6 files changed

+902
-355
lines changed

6 files changed

+902
-355
lines changed

hardware_interface/include/hardware_interface/actuator_interface.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ class ActuatorInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNod
157157
{
158158
// return empty vector by default. For backward compatibility we check if all vectors is empty
159159
// and if so call on_export_state_interfaces()
160-
std::vector<StateInterface> state_interfaces;
161-
return state_interfaces;
160+
return {};
162161
}
163162

164163
std::vector<std::shared_ptr<StateInterface>> on_export_state_interfaces()
@@ -195,8 +194,7 @@ class ActuatorInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNod
195194
{
196195
// return empty vector by default. For backward compatibility we check if all vectors is empty
197196
// and if so call on_export_command_interfaces()
198-
std::vector<CommandInterface> command_interfaces;
199-
return command_interfaces;
197+
return {};
200198
}
201199

202200
std::vector<std::shared_ptr<CommandInterface>> on_export_command_interfaces()

hardware_interface/include/hardware_interface/handle.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ class Handle
9393
const std::string & get_prefix_name() const { return prefix_name_; }
9494

9595
double get_value() const
96-
{ // BEGIN (Handle export change): for backward compatibility
97-
// TODO(Manuel) return value_ if old functionality is removed
96+
{
97+
// BEGIN (Handle export change): for backward compatibility
98+
// TODO(Manuel) return value_ if old functionality is removed
9899
THROW_ON_NULLPTR(value_ptr_);
99100
return *value_ptr_;
100101
// END

hardware_interface/include/hardware_interface/sensor_interface.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,7 @@ class SensorInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNodeI
141141
{
142142
// return empty vector by default. For backward compatibility we check if all vectors is empty
143143
// and if so call on_export_state_interfaces()
144-
std::vector<StateInterface> state_interfaces;
145-
return state_interfaces;
144+
return {};
146145
}
147146

148147
std::vector<std::shared_ptr<StateInterface>> on_export_state_interfaces()

hardware_interface/include/hardware_interface/system_interface.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,7 @@ class SystemInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNodeI
176176
{
177177
// return empty vector by default. For backward compatibility we check if all vectors is empty
178178
// and if so call on_export_state_interfaces()
179-
std::vector<StateInterface> state_interfaces;
180-
return state_interfaces;
179+
return {};
181180
}
182181

183182
std::vector<std::shared_ptr<StateInterface>> on_export_state_interfaces()
@@ -227,8 +226,7 @@ class SystemInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNodeI
227226
{
228227
// return empty vector by default. For backward compatibility we check if all vectors is empty
229228
// and if so call on_export_command_interfaces()
230-
std::vector<CommandInterface> command_interfaces;
231-
return command_interfaces;
229+
return {};
232230
}
233231

234232
std::vector<std::shared_ptr<CommandInterface>> on_export_command_interfaces()

0 commit comments

Comments
 (0)