Skip to content

Commit

Permalink
activated all hardware by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Maciej Bednarczyk committed Jul 22, 2022
1 parent feee15f commit 613bf87
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,14 @@ void GazeboRosControlPlugin::Load(gazebo::physics::ModelPtr parent, sdf::Element
}

resource_manager_->import_component(std::move(gazeboSystem), control_hardware[i]);

rclcpp_lifecycle::State state(
lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE,
hardware_interface::lifecycle_state_names::ACTIVE);
resource_manager_->set_component_state(control_hardware[i].name, state);
}

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


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

Expand Down

0 comments on commit 613bf87

Please sign in to comment.