Skip to content

mavros_node crashes with "parameter 'fcu_urls' cannot be set because it was not declared" on ROS2 branch #2055

@pampem

Description

@pampem

I tried to run MAVROS on the current ros2 branch and the node crashes immediately with an exception about fcu_urls not being declared. Rolling back to commit e7a3e40e restores normal behavior, so this appears to be a regression introduced by recent changes (possibly related to MAVROS Router changes).

Logs

[mavros_node-11] [INFO] [1756450546.847084060] [drone1.mavros.mavros_router]: MAVROS Router started
[mavros_node-11] terminate called after throwing an instance of 'rclcpp::exceptions::ParameterNotDeclaredException'
[mavros_node-11]   what():  parameter 'fcu_urls' cannot be set because it was not declared
[ERROR] [mavros_node-11]: process has died [pid 211141, exit code -6, cmd '/home/~~username~~/workspace//install/mavros/lib/mavros/mavros_node --ros-args -r __ns:=/drone1/mavros --params-file /tmp/launch_params_pmslciqg --params-file /tmp/launch_params_qacror6j --params-file /tmp/launch_params_osrpqyrz --params-file /tmp/launch_params_h6age36c --params-file /tmp/launch_params_id75xrsk --params-file /home/~~username~~/workspace/install/path_planner/share/path_planner/launch/apm_pluginlists.yaml --params-file /home/~username~~/workspace/install/path_planner/share/path_planner/launch/apm_config.yaml'].

Repro (what I did)

  1. Checkout ros2 branch (current HEAD at the time).
  2. Launch mavros using my normal launch (almost same as current apm.launch).
  3. Node crashes immediately with the exception above.

Works on

  • I checked out commit e7a3e40e (previous version) and the launch succeeds (no crash).

Expected behavior

  • mavros_node should start and accept the fcu_urls parameter (or declare it internally) without throwing a ParameterNotDeclaredException.

Possible cause

  • Recent changes to the MAVROS Router or parameter handling may have removed/changed where fcu_urls is declared, causing an attempt to set the parameter before declaration.

Environment

  • OS: Ubuntu 22.04 LTS
  • ROS2 distro: humble

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions