Skip to content

Commit

Permalink
Added logic for activating hardware interfaces (#139)
Browse files Browse the repository at this point in the history
Signed-off-by: ahcorde <ahcorde@gmail.com>
  • Loading branch information
ahcorde committed Aug 15, 2022
1 parent 65c1ee2 commit 108d32d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,11 @@ void GazeboRosControlPlugin::Load(gazebo::physics::ModelPtr parent, sdf::Element
resource_manager_->import_component(std::move(gazeboSystem));
}

rclcpp_lifecycle::State state(
lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE,
hardware_interface::lifecycle_state_names::ACTIVE);
resource_manager_->set_component_state("GazeboSimSystem", state);

impl_->executor_ = std::make_shared<rclcpp::executors::MultiThreadedExecutor>();

// Create the controller manager
Expand Down

0 comments on commit 108d32d

Please sign in to comment.