Skip to content

Commit

Permalink
Force setting use_sim_time parameter when using plugin. (#100)
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
  • Loading branch information
destogl and ahcorde committed Nov 25, 2022
1 parent af36226 commit 977df12
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ign_ros2_control/src/ign_ros2_control_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,10 @@ void IgnitionROS2ControlPlugin::Configure(
std::chrono::duration_cast<std::chrono::nanoseconds>(
std::chrono::duration<double>(1.0 / static_cast<double>(this->dataPtr->update_rate))));

// Force setting of use_sime_time parameter
this->dataPtr->controller_manager_->set_parameter(
rclcpp::Parameter("use_sim_time", rclcpp::ParameterValue(true)));

this->dataPtr->entity_ = _entity;
}

Expand Down

0 comments on commit 977df12

Please sign in to comment.