diff --git a/AGENTS.md b/AGENTS.md index 651270ae2..1f500c573 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -109,6 +109,8 @@ commands may use incompatible installations or incomplete environment state. - Reuse existing launch patterns and substitutions. Keep launch argument, parameter, topic, and namespace names consistent across launch files, config files, and node declarations. +- When editing or creating launch files, consider whether there is a need for passing + through the `use_sim_time` parameter. Most packages should support simulation time. ## Configuration diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 000000000..43c994c2d --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +@AGENTS.md diff --git a/src/bitbots_misc/bitbots_bringup/launch/highlevel.launch b/src/bitbots_misc/bitbots_bringup/launch/highlevel.launch index 71a4679a9..bd2f8208f 100644 --- a/src/bitbots_misc/bitbots_bringup/launch/highlevel.launch +++ b/src/bitbots_misc/bitbots_bringup/launch/highlevel.launch @@ -60,7 +60,9 @@ - + + + diff --git a/src/bitbots_misc/bitbots_diagnostic/launch/aggregator.launch b/src/bitbots_misc/bitbots_diagnostic/launch/aggregator.launch index 63e77dceb..3c14fbed5 100644 --- a/src/bitbots_misc/bitbots_diagnostic/launch/aggregator.launch +++ b/src/bitbots_misc/bitbots_diagnostic/launch/aggregator.launch @@ -1,7 +1,10 @@ + + + diff --git a/src/bitbots_misc/bitbots_robot_description/launch/load_robot_description.launch b/src/bitbots_misc/bitbots_robot_description/launch/load_robot_description.launch index 614c0560b..2e62528c2 100644 --- a/src/bitbots_misc/bitbots_robot_description/launch/load_robot_description.launch +++ b/src/bitbots_misc/bitbots_robot_description/launch/load_robot_description.launch @@ -5,6 +5,7 @@ + diff --git a/src/bitbots_misc/bitbots_whistle_detector/launch/whistle_detector.launch b/src/bitbots_misc/bitbots_whistle_detector/launch/whistle_detector.launch index 1d39902bc..f3aa6918e 100644 --- a/src/bitbots_misc/bitbots_whistle_detector/launch/whistle_detector.launch +++ b/src/bitbots_misc/bitbots_whistle_detector/launch/whistle_detector.launch @@ -1,4 +1,7 @@ + + + diff --git a/src/lib/bitbots_tf_buffer/src/bitbots_tf_buffer.cpp b/src/lib/bitbots_tf_buffer/src/bitbots_tf_buffer.cpp index ade8337c0..b87d940ed 100644 --- a/src/lib/bitbots_tf_buffer/src/bitbots_tf_buffer.cpp +++ b/src/lib/bitbots_tf_buffer/src/bitbots_tf_buffer.cpp @@ -42,8 +42,14 @@ class Buffer { rcl_node_t *node_handle = static_cast(reinterpret_cast(node.attr("handle").attr("pointer").cast())); const char *node_name = rcl_node_get_name(node_handle); + + // inherit the use_sim_time parameter from the outer node + const bool use_sim_time = node.attr("get_parameter")("use_sim_time").attr("value").cast(); + rclcpp::NodeOptions node_options; + node_options.parameter_overrides({rclcpp::Parameter("use_sim_time", use_sim_time)}); + // create node with name _tf - node_ = std::make_shared((std::string(node_name) + "_tf").c_str()); + node_ = std::make_shared((std::string(node_name) + "_tf").c_str(), node_options); // Get buffer duration from python duration auto duration =