Skip to content

Commit

Permalink
Update hardware templates. (StoglRobotics#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
destogl authored Dec 6, 2022
1 parent f872374 commit 8dc4ed2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ class DummyClassName : public hardware_interface::Dummy_Interface_TypeInterface
hardware_interface::CallbackReturn on_init(
const hardware_interface::HardwareInfo & info) override;

TEMPLATES__ROS2_CONTROL__VISIBILITY_PUBLIC
hardware_interface::CallbackReturn on_configure(
const rclcpp_lifecycle::State & previous_state) override;

TEMPLATES__ROS2_CONTROL__VISIBILITY_PUBLIC
std::vector<hardware_interface::StateInterface> export_state_interfaces() override;

Expand Down
8 changes: 8 additions & 0 deletions templates/ros2_control/hardware/robot_hardware_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ hardware_interface::CallbackReturn DummyClassName::on_init(
return CallbackReturn::SUCCESS;
}

hardware_interface::CallbackReturn DummyClassName::on_configure(
const rclcpp_lifecycle::State & /*previous_state*/)
{
// TODO(anyone): prepare the robot to be ready for read calls and write calls of some interfaces

return CallbackReturn::SUCCESS;
}

std::vector<hardware_interface::StateInterface> DummyClassName::export_state_interfaces()
{
std::vector<hardware_interface::StateInterface> state_interfaces;
Expand Down

0 comments on commit 8dc4ed2

Please sign in to comment.