Skip to content

Commit

Permalink
change rest of component_interface test and mark what should be removed
Browse files Browse the repository at this point in the history
  • Loading branch information
mamueluth committed Jan 22, 2024
1 parent 200491b commit e70f436
Show file tree
Hide file tree
Showing 6 changed files with 902 additions and 355 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ class ActuatorInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNod
{
// return empty vector by default. For backward compatibility we check if all vectors is empty
// and if so call on_export_state_interfaces()
std::vector<StateInterface> state_interfaces;
return state_interfaces;
return {};
}

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

std::vector<std::shared_ptr<CommandInterface>> on_export_command_interfaces()
Expand Down
5 changes: 3 additions & 2 deletions hardware_interface/include/hardware_interface/handle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ class Handle
const std::string & get_prefix_name() const { return prefix_name_; }

double get_value() const
{ // BEGIN (Handle export change): for backward compatibility
// TODO(Manuel) return value_ if old functionality is removed
{
// BEGIN (Handle export change): for backward compatibility
// TODO(Manuel) return value_ if old functionality is removed
THROW_ON_NULLPTR(value_ptr_);
return *value_ptr_;
// END
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ class SensorInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNodeI
{
// return empty vector by default. For backward compatibility we check if all vectors is empty
// and if so call on_export_state_interfaces()
std::vector<StateInterface> state_interfaces;
return state_interfaces;
return {};
}

std::vector<std::shared_ptr<StateInterface>> on_export_state_interfaces()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ class SystemInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNodeI
{
// return empty vector by default. For backward compatibility we check if all vectors is empty
// and if so call on_export_state_interfaces()
std::vector<StateInterface> state_interfaces;
return state_interfaces;
return {};
}

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

std::vector<std::shared_ptr<CommandInterface>> on_export_command_interfaces()
Expand Down
Loading

0 comments on commit e70f436

Please sign in to comment.