Skip to content

Replace config use_sim_time with SetUseSimTime in launch file #3119

@tonynajjar

Description

@tonynajjar

Small enhancement: you could replace all the use_sim_time in the config with the SetUseSimTime introduced in Humble. That would remove the RewrittenYaml logic from the launch file

One thing to note is that bt_navigator_navigate_through_poses_rclcpp_node won't get this parameter because it's created internally. Here is a workaround in bt_action_server_impl.h:

  auto options = rclcpp::NodeOptions().arguments(
    {"--ros-args",
      "-r",
      std::string("__node:=") + std::string(node->get_name()) + client_node_name + "_rclcpp_node",
      "-p",
      "use_sim_time:=" + std::string(node->get_parameter("use_sim_time").as_bool() ? "true": "false"),
      "--"});

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions