diff --git a/leo_bringup/launch/leo_bringup.launch.xml b/leo_bringup/launch/leo_bringup.launch.xml index f88d725..3d45b90 100644 --- a/leo_bringup/launch/leo_bringup.launch.xml +++ b/leo_bringup/launch/leo_bringup.launch.xml @@ -10,13 +10,13 @@ description="Flag specifying wheel types of the robot for visualization purposes" /> - + description="Absolute path to the yaml file with firmware parameters to be overrided" /> - + + + + + - - - - - \ No newline at end of file diff --git a/leo_bringup/config/firmware.yaml b/leo_fw/data/default_firmware_params.yaml similarity index 100% rename from leo_bringup/config/firmware.yaml rename to leo_fw/data/default_firmware_params.yaml diff --git a/leo_fw/leo_fw/nodes/parameter_bridge.py b/leo_fw/leo_fw/nodes/parameter_bridge.py index 611a373..5ed2b28 100644 --- a/leo_fw/leo_fw/nodes/parameter_bridge.py +++ b/leo_fw/leo_fw/nodes/parameter_bridge.py @@ -18,8 +18,13 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. +from os import path +from typing import Optional + import yaml # type: ignore +from ament_index_python import get_package_share_directory + from rcl_interfaces.msg import Parameter as ParameterMsg, SetParametersResult from rcl_interfaces.srv import SetParameters @@ -54,7 +59,12 @@ def __init__(self, executor: MultiThreadedExecutor) -> None: super().__init__("firmware_parameter_bridge") self.executor = executor - self.declare_parameter("default_params_file_path", "") + leo_fw_share = get_package_share_directory("leo_fw") + + self.declare_parameter( + "default_params_file_path", + path.join(leo_fw_share, "data", "default_firmware_params.yaml"), + ) self.declare_parameter("override_params_file_path", "") self.default_param_file: str = (