Skip to content

Commit 4546cb7

Browse files
destoglahcorde
andauthored
Force setting use_sim_time parameter when using plugin. (#100)
Signed-off-by: Alejandro Hernández Cordero <[email protected]> Co-authored-by: Alejandro Hernández Cordero <[email protected]>
1 parent e2a4751 commit 4546cb7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ign_ros2_control/src/ign_ros2_control_plugin.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,10 @@ void IgnitionROS2ControlPlugin::Configure(
428428
std::chrono::duration_cast<std::chrono::nanoseconds>(
429429
std::chrono::duration<double>(1.0 / static_cast<double>(this->dataPtr->update_rate))));
430430

431+
// Force setting of use_sime_time parameter
432+
this->dataPtr->controller_manager_->set_parameter(
433+
rclcpp::Parameter("use_sim_time", rclcpp::ParameterValue(true)));
434+
431435
this->dataPtr->entity_ = _entity;
432436
}
433437

0 commit comments

Comments
 (0)