Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some plugins still load even if blacklisted #1917

Open
mzahana opened this issue Oct 26, 2023 · 21 comments
Open

Some plugins still load even if blacklisted #1917

mzahana opened this issue Oct 26, 2023 · 21 comments

Comments

@mzahana
Copy link
Contributor

mzahana commented Oct 26, 2023

This is only bug and feature tracker, please use it
to report bugs or request features.


Issue details

I want to disable a set of plugins that I don't need. So, here is what I do.

  • I list all the plugins(nodes) that I don't need in the px4_pluginlists.yaml. Then I run mavros launch file.
  • Many of these plugins don't run as expected. However, there are still some plugins that are in the plugin_denylist which seems to run (I can see their topics using ros2 topic list).
  • Here is my px4_pluginlists.yaml
/mavros/**:
  ros__parameters:
    plugin_denylist:
      # common

      # extras
      - image_pub
      - vibration
      - distance_sensor
      - rangefinder
      - wheel_odometry
      - mount_control
      - log_transfer
      - landing_target
      - gps_rtk
      - manual_control
      - hil
      - adsb
      - optical_flow
      - terrain
      - ftp
      - tdr_radio
      - rallypoint
      - obstacle
      - cellular_status
      - actuator_control
      - fake_gps
      - esc_telemetry
      - mag_calibration
      - px4flow
      - esc_status
      - gps_input
      - debug_value
      - geofence
      - nav_controller_output
      - wind
      - play_tune
      - camera
      - guided_target
      - mocap


    # plugin_allowlist:
    #   - 'sys_*'
  • When I execute ros2 node list I get,
/mavros/altitude
/mavros/cam_imu_sync
/mavros/cmd
/mavros/companion_process
/mavros/global_position
/mavros/gpsstatus
/mavros/home_position
/mavros/imu
/mavros/local_position
/mavros/mag_calibration
/mavros/mavros
/mavros/mavros_node
/mavros/mavros_router
/mavros/mission
/mavros/mocap
/mavros/obstacle
/mavros/odometry
/mavros/onboard_computer
/mavros/param
/mavros/rc
/mavros/setpoint_accel
/mavros/setpoint_attitude
/mavros/setpoint_position
/mavros/setpoint_raw
/mavros/setpoint_trajectory
/mavros/setpoint_velocity
/mavros/sys
/mavros/time
/mavros/trajectory
/mavros/transform_listener_impl_56316dba66d0
/mavros/tunnel
/mavros/vfr_hud
/mavros/vision_pose
/mavros/vision_speed
/mavros/wheel_odometry
/mavros/wind
  • So you can see that blacklisted /mavros/wheel_odometry and /interceptor/mavros/mag_calibration, but they still run!

@vooon Is this a bug, or I am missing something?

Thanks in advance.

MAVROS version and platform

Mavros: 2.6.0
ROS: humble
Ubuntu: 22.0

Autopilot type and version

[ ] ArduPilot
[ x] PX4

Version: 1.14.0

@vooon
Copy link
Member

vooon commented Oct 26, 2023

Could you please check what lists node really have? I mean run the node and then get allow/deny lists parameters.

@mzahana
Copy link
Contributor Author

mzahana commented Oct 26, 2023

@vooon here is the plugin_denylist after I run the node

String values are: ['image_pub', 'vibration', 'distance_sensor', 'rangefinder', 'wheel_odometry', 'mount_control', 'log_transfer', 'landing_target', 'gps_rtk', 'manual_control', 'hil', 'adsb', 'optical_flow', 'terrain', 'ftp', 'tdr_radio', 'rallypoint', 'obstacle', 'cellular_status', 'actuator_control', 'fake_gps', 'esc_telemetry', 'mag_calibration', 'px4flow', 'esc_status', 'gps_input', 'debug_value', 'geofence', 'nav_controller_output', 'wind', 'play_tune', 'camera', 'guided_target', 'mocap']

You can see that wheel_odometry is there in the list. However, I can see the node when I execute ros2 node list

@vooon
Copy link
Member

vooon commented Oct 27, 2023

Ok, then need to run the node with debug logging enabled. Then need to copy log lines here.

@gregoryw3
Copy link

I'm having a simular issue, ROS2 Foxy

/mavros/**:
  ros__parameters:
    plugin_denylist:
      - actuator_control
      - adsb
      # altitude
      - cam_imu_sync
      - camera
      - cellular_status
      # command
      # companion_process_status
      # common
      - debug_value
      # distance_sensor
      # esc_status
      # esc_telemetry
      # extras
      - fake_gps
      # ftp
      - geofence
      - global_position
      - gps_input
      - gps_rtk
      - gps_status
      - guided_target
      - hil
      - home_position
      - image_pub
      # imu
      - landing_target
      - local_position
      # log_transfer
      # mag_calibration_status
      # manual_control
      - mocap_pose_estimate
      - mount_control
      - nav_controller_output
      - obstacle
      - obstacle_distance
      - optical_flow
      # odometry
      # onboard_computer_status
      # param
      - play_tune
      - px4flow
      - rallypoint
      # rangefinder
      # rc_io
      - setpoint_accel
      - setpoint_attitude
      - setpoint_position
      - setpoint_raw
      - setpoint_trajectory
      - setpoint_velocity
      # sys_status
      # sys_time
      - tdr_radio
      - terrain
      - trajectory
      - tunnel
      - vfr_hud
      # vibration
      - vision_pose
      - vision_speed
      - vision_speed_estimate
      - waypoint
      - wheel_odometry
      # wind
      # wind_estimation
    # plugin_allowlist:
    #   - 'sys_*'
[mavros_node-1] [INFO] [1699578780.019239328] [mavros]: Plugin actuator_control created
[mavros_node-1] [INFO] [1699578780.019629072] [mavros]: Plugin actuator_control initialized
[mavros_node-1] [INFO] [1699578780.196979700] [mavros]: Plugin adsb created
[mavros_node-1] [INFO] [1699578780.197714689] [mavros]: Plugin adsb initialized
[mavros_node-1] [INFO] [1699578780.238140633] [mavros]: Plugin altitude created
[mavros_node-1] [INFO] [1699578780.238435879] [mavros]: Plugin altitude initialized
[mavros_node-1] [INFO] [1699578780.331529003] [mavros]: Plugin cam_imu_sync created
[mavros_node-1] [INFO] [1699578780.334986326] [mavros]: Plugin cam_imu_sync initialized
[mavros_node-1] [INFO] [1699578780.439242993] [mavros]: Plugin camera created
[mavros_node-1] [INFO] [1699578780.440135063] [mavros]: Plugin camera initialized
[mavros_node-1] [INFO] [1699578780.543239539] [mavros]: Plugin cellular_status created
[mavros_node-1] [INFO] [1699578780.546518865] [mavros]: Plugin cellular_status initialized
[mavros_node-1] [INFO] [1699578780.745570172] [mavros]: Plugin command created
[mavros_node-1] [INFO] [1699578780.745838752] [mavros]: Plugin command initialized
[mavros_node-1] [INFO] [1699578780.846173477] [mavros]: Plugin companion_process_status created
[mavros_node-1] [INFO] [1699578780.846429556] [mavros]: Plugin companion_process_status initialized
[mavros_node-1] [INFO] [1699578781.017598029] [mavros]: Plugin debug_value created
[mavros_node-1] [INFO] [1699578781.017995148] [mavros]: Plugin debug_value initialized
[mavros_node-1] [INFO] [1699578781.191905802] [mavros.distance_sensor]: DS: Plugin not configured!
[mavros_node-1] [INFO] [1699578781.194330726] [mavros]: Plugin distance_sensor created
[mavros_node-1] [INFO] [1699578781.195929786] [mavros]: Plugin distance_sensor initialized
[mavros_node-1] [INFO] [1699578781.303769978] [mavros]: Plugin esc_status created
[mavros_node-1] [INFO] [1699578781.304301637] [mavros]: Plugin esc_status initialized
[mavros_node-1] [INFO] [1699578781.460001387] [mavros]: Plugin esc_telemetry created
[mavros_node-1] [INFO] [1699578781.460595462] [mavros]: Plugin esc_telemetry initialized
[mavros_node-1] [INFO] [1699578781.579470911] [mavros]: Plugin fake_gps created
[mavros_node-1] [INFO] [1699578781.579725366] [mavros]: Plugin fake_gps initialized
[mavros_node-1] [INFO] [1699578782.392270754] [mavros]: Plugin ftp created
[mavros_node-1] [INFO] [1699578782.392661749] [mavros]: Plugin ftp initialized
[mavros_node-1] [INFO] [1699578782.702098131] [mavros]: Plugin geofence created
[mavros_node-1] [INFO] [1699578782.702568999] [mavros]: Plugin geofence initialized
[mavros_node-1] [INFO] [1699578783.147809927] [mavros]: Plugin global_position created
[mavros_node-1] [INFO] [1699578783.148191463] [mavros]: Plugin global_position initialized
[mavros_node-1] [INFO] [1699578783.423388835] [mavros]: Plugin gps_input created
[mavros_node-1] [INFO] [1699578783.423682456] [mavros]: Plugin gps_input initialized
[mavros_node-1] [INFO] [1699578783.772673436] [mavros]: Plugin gps_rtk created
[mavros_node-1] [INFO] [1699578783.773647922] [mavros]: Plugin gps_rtk initialized
[mavros_node-1] [INFO] [1699578784.145398549] [mavros]: Plugin gps_status created
[mavros_node-1] [INFO] [1699578784.146418702] [mavros]: Plugin gps_status initialized
[mavros_node-1] [INFO] [1699578784.491039228] [mavros]: Plugin guided_target created
[mavros_node-1] [INFO] [1699578784.500112730] [mavros]: Plugin guided_target initialized
[mavros_node-1] [INFO] [1699578784.944620578] [mavros]: Plugin hil created
[mavros_node-1] [INFO] [1699578784.944922407] [mavros]: Plugin hil initialized
[mavros_node-1] [INFO] [1699578785.374481655] [mavros]: Plugin home_position created
[mavros_node-1] [INFO] [1699578785.378968304] [mavros]: Plugin home_position initialized
[mavros_node-1] [INFO] [1699578785.875523025] [mavros]: Plugin imu created
[mavros_node-1] [INFO] [1699578785.878790107] [mavros]: Plugin imu initialized
[mavros_node-1] [INFO] [1699578786.303513656] [mavros]: Plugin landing_target created
[mavros_node-1] [INFO] [1699578786.304023024] [mavros]: Plugin landing_target initialized
[mavros_node-1] [INFO] [1699578786.865259902] [mavros]: Plugin local_position created
[mavros_node-1] [INFO] [1699578786.868384778] [mavros]: Plugin local_position initialized
[mavros_node-1] [INFO] [1699578787.370123698] [mavros]: Plugin log_transfer created
[mavros_node-1] [INFO] [1699578787.370465694] [mavros]: Plugin log_transfer initialized
[mavros_node-1] [INFO] [1699578787.847402759] [mavros]: Plugin mag_calibration_status created
[mavros_node-1] [INFO] [1699578787.854034843] [mavros]: Plugin mag_calibration_status initialized
[mavros_node-1] [INFO] [1699578788.295859143] [mavros]: Plugin manual_control created
[mavros_node-1] [INFO] [1699578788.297629538] [mavros]: Plugin manual_control initialized
[mavros_node-1] [INFO] [1699578788.727072495] [mavros]: Plugin mocap_pose_estimate created
[mavros_node-1] [INFO] [1699578788.727529406] [mavros]: Plugin mocap_pose_estimate initialized
[mavros_node-1] [INFO] [1699578789.268860739] [mavros]: Plugin mount_control created
[mavros_node-1] [INFO] [1699578789.270336596] [mavros]: Plugin mount_control initialized
[mavros_node-1] [INFO] [1699578789.714874500] [mavros]: Plugin nav_controller_output created
[mavros_node-1] [INFO] [1699578789.715474535] [mavros]: Plugin nav_controller_output initialized
[mavros_node-1] [INFO] [1699578790.156908312] [mavros]: Plugin obstacle_distance created
[mavros_node-1] [INFO] [1699578790.160870599] [mavros]: Plugin obstacle_distance initialized
[mavros_node-1] [INFO] [1699578790.623967542] [mavros]: Plugin odometry created
[mavros_node-1] [INFO] [1699578790.624259622] [mavros]: Plugin odometry initialized
[mavros_node-1] [INFO] [1699578791.132217329] [mavros]: Plugin onboard_computer_status created
[mavros_node-1] [INFO] [1699578791.136082244] [mavros]: Plugin onboard_computer_status initialized
[mavros_node-1] [INFO] [1699578791.656826541] [mavros]: Plugin param created
[mavros_node-1] [INFO] [1699578791.659158098] [mavros]: Plugin param initialized
[mavros_node-1] [INFO] [1699578792.123924023] [mavros]: Plugin play_tune created
[mavros_node-1] [INFO] [1699578792.124188145] [mavros]: Plugin play_tune initialized
[mavros_node-1] [INFO] [1699578792.750395548] [mavros]: Plugin px4flow created
[mavros_node-1] [INFO] [1699578792.750807835] [mavros]: Plugin px4flow initialized
[mavros_node-1] [INFO] [1699578793.409986610] [mavros]: Plugin rallypoint created
[mavros_node-1] [INFO] [1699578793.410428064] [mavros]: Plugin rallypoint initialized
[mavros_node-1] [INFO] [1699578793.857201744] [mavros]: Plugin rangefinder created
[mavros_node-1] [INFO] [1699578793.860365627] [mavros]: Plugin rangefinder initialized
[mavros_node-1] [INFO] [1699578794.508890227] [mavros]: Plugin rc_io created
[mavros_node-1] [INFO] [1699578794.511088412] [mavros]: Plugin rc_io initialized
[mavros_node-1] [INFO] [1699578795.073358602] [mavros]: Plugin setpoint_accel created
[mavros_node-1] [INFO] [1699578795.075877827] [mavros]: Plugin setpoint_accel initialized
[mavros_node-1] [INFO] [1699578795.640474544] [mavros]: Plugin setpoint_attitude created
[mavros_node-1] [INFO] [1699578795.641177412] [mavros]: Plugin setpoint_attitude initialized
[mavros_node-1] [INFO] [1699578796.425461490] [mavros]: Plugin setpoint_position created
[mavros_node-1] [INFO] [1699578796.425813112] [mavros]: Plugin setpoint_position initialized
[mavros_node-1] [INFO] [1699578797.213961762] [mavros]: Plugin setpoint_raw created
[mavros_node-1] [INFO] [1699578797.218621467] [mavros]: Plugin setpoint_raw initialized
[mavros_node-1] [INFO] [1699578797.908445558] [mavros]: Plugin setpoint_trajectory created
[mavros_node-1] [INFO] [1699578797.908731430] [mavros]: Plugin setpoint_trajectory initialized
[mavros_node-1] [INFO] [1699578798.564429996] [mavros]: Plugin setpoint_velocity created
[mavros_node-1] [INFO] [1699578798.564739077] [mavros]: Plugin setpoint_velocity initialized
[mavros_node-1] [INFO] [1699578799.648249161] [mavros]: Plugin sys_status created
[mavros_node-1] [INFO] [1699578799.650538182] [mavros]: Plugin sys_status initialized
[mavros_node-1] [INFO] [1699578800.246197844] [mavros.time]: TM: Timesync mode: MAVLINK
[mavros_node-1] [INFO] [1699578800.313884447] [mavros]: Plugin sys_time created
[mavros_node-1] [INFO] [1699578800.315456224] [mavros]: Plugin sys_time initialized
[mavros_node-1] [INFO] [1699578801.079623527] [mavros]: Plugin tdr_radio created
[mavros_node-1] [INFO] [1699578801.079944607] [mavros]: Plugin tdr_radio initialized
[mavros_node-1] [INFO] [1699578801.633959493] [mavros]: Plugin terrain created
[mavros_node-1] [INFO] [1699578801.634309573] [mavros]: Plugin terrain initialized
[mavros_node-1] [WARN] [1699578802.036957367] [mavros.sys]: VER: broadcast request timeout, retries left 4
[mavros_node-1] [INFO] [1699578802.476190442] [mavros]: Plugin trajectory created
[mavros_node-1] [INFO] [1699578802.476479481] [mavros]: Plugin trajectory initialized
[mavros_node-1] [WARN] [1699578802.920569014] [mavros.sys]: VER: broadcast request timeout, retries left 3
[mavros_node-1] [INFO] [1699578803.332816729] [mavros]: Plugin tunnel created
[mavros_node-1] [INFO] [1699578803.333209975] [mavros]: Plugin tunnel initialized
[mavros_node-1] [WARN] [1699578803.902863249] [mavros.sys]: VER: unicast request timeout, retries left 2
[mavros_node-1] [INFO] [1699578804.055358006] [mavros]: Plugin vfr_hud created
[mavros_node-1] [INFO] [1699578804.058366190] [mavros]: Plugin vfr_hud initialized
[mavros_node-1] [WARN] [1699578804.873647593] [mavros.sys]: VER: unicast request timeout, retries left 1
[mavros_node-1] [INFO] [1699578804.879407839] [mavros]: Plugin vibration created
[mavros_node-1] [INFO] [1699578804.881622696] [mavros]: Plugin vibration initialized
[mavros_node-1] [INFO] [1699578805.672289993] [mavros]: Plugin vision_pose created
[mavros_node-1] [INFO] [1699578805.672605532] [mavros]: Plugin vision_pose initialized
[mavros_node-1] [WARN] [1699578805.927208557] [mavros.sys]: VER: unicast request timeout, retries left 0
[mavros_node-1] [INFO] [1699578806.581007533] [mavros]: Plugin vision_speed created
[mavros_node-1] [INFO] [1699578806.581276614] [mavros]: Plugin vision_speed initialized
[mavros_node-1] [WARN] [1699578806.821479264] [mavros.sys]: VER: your FCU don't support AUTOPILOT_VERSION, switched to default capabilities
[mavros_node-1] [INFO] [1699578807.781506875] [mavros]: Plugin waypoint created
[mavros_node-1] [INFO] [1699578807.786856086] [mavros]: Plugin waypoint initialized
[mavros_node-1] [INFO] [1699578808.495768974] [mavros]: Plugin wheel_odomotry created
[mavros_node-1] [INFO] [1699578808.496185846] [mavros]: Plugin wheel_odomotry initialized
[mavros_node-1] [INFO] [1699578809.218730814] [mavros]: Plugin wind_estimation created
[mavros_node-1] [INFO] [1699578809.219096229] [mavros]: Plugin wind_estimation initialized
mavros_node = Node(
            package='mavros',
            executable='mavros_node',
            parameters=[{
                'pluginlists_yaml': "./apm_pluginlists.yaml",
                'config_yaml': './apm_config.yaml',
                'fcu_url': fcu_url_arg_str,
                'gcs_url': '',
                'tgt_system': 1,
                'tgt_component': 1,
                'fcu_protocol': "v2.0",
                'respawn_mavros': "false",
                'namespace': "mavros",
            }],
            emulate_tty=True,
            output='screen',
        )

What do you mean by debug logging enabled? Is it what I sent or is there a documentation link you can send?

@vooon
Copy link
Member

vooon commented Nov 10, 2023

Can you please add a debug print here: https://github.com/mavlink/mavros/blob/ros2/mavros/src/lib/mavros_uas.cpp#L238

My suspicion that on loading time lists are empty.

@gregoryw3
Copy link

Here is what I added, let me know if this isn't what you meant:

bool UAS::is_plugin_allowed(
  const std::string & pl_name)
{
  RCLCPP_INFO(get_logger(), "is_plugin_allowed pl_name input: %s", pl_name.c_str());
  for (auto & bl_pattern : plugin_denylist) {
    if (pattern_match(bl_pattern, pl_name)) {
      for (auto & wl_pattern : plugin_allowlist) {
        if (pattern_match(wl_pattern, pl_name)) {
          return true;
        }
      }

      return false;
    }
  }

  return true;
}
[mavros_node-1] [INFO] [1699633077.099793636] [mavros]: UAS Executor started, threads: 4
[mavros_node-1] [INFO] [1699633077.100350383] [mavros]: is_plugin_allowed pl_name input: actuator_control
[mavros_node-1] [INFO] [1699633077.128672502] [mavros]: Plugin actuator_control created
[mavros_node-1] [INFO] [1699633077.129517997] [mavros]: Plugin actuator_control initialized
[mavros_node-1] [INFO] [1699633077.129542163] [mavros]: is_plugin_allowed pl_name input: altitude
[mavros_node-1] [INFO] [1699633077.132688019] [mavros]: Plugin altitude created
[mavros_node-1] [INFO] [1699633077.132857685] [mavros]: Plugin altitude initialized
[mavros_node-1] [INFO] [1699633077.132872518] [mavros]: is_plugin_allowed pl_name input: command
[mavros_node-1] [INFO] [1699633077.138693399] [mavros]: Plugin command created
[mavros_node-1] [INFO] [1699633077.138859106] [mavros]: Plugin command initialized
[mavros_node-1] [INFO] [1699633077.138870981] [mavros]: is_plugin_allowed pl_name input: ftp
[mavros_node-1] [INFO] [1699633077.145700023] [mavros]: Plugin ftp created
[mavros_node-1] [INFO] [1699633077.145858772] [mavros]: Plugin ftp initialized
[mavros_node-1] [INFO] [1699633077.145870189] [mavros]: is_plugin_allowed pl_name input: geofence
[mavros_node-1] [INFO] [1699633077.151748944] [mavros]: Plugin geofence created
[mavros_node-1] [INFO] [1699633077.152146859] [mavros]: Plugin geofence initialized
[mavros_node-1] [INFO] [1699633077.152162859] [mavros]: is_plugin_allowed pl_name input: global_position
[mavros_node-1] [INFO] [1699633077.162381921] [mavros]: Plugin global_position created
[mavros_node-1] [INFO] [1699633077.162747419] [mavros]: Plugin global_position initialized
[mavros_node-1] [INFO] [1699633077.162761461] [mavros]: is_plugin_allowed pl_name input: home_position
[mavros_node-1] [INFO] [1699633077.166757020] [mavros]: Plugin home_position created
[mavros_node-1] [INFO] [1699633077.166891477] [mavros]: Plugin home_position initialized
[mavros_node-1] [INFO] [1699633077.166901977] [mavros]: is_plugin_allowed pl_name input: imu
[mavros_node-1] [INFO] [1699633077.171515616] [mavros]: Plugin imu created
[mavros_node-1] [INFO] [1699633077.171950405] [mavros]: Plugin imu initialized
[mavros_node-1] [INFO] [1699633077.171966946] [mavros]: is_plugin_allowed pl_name input: local_position
[mavros_node-1] [INFO] [1699633077.176939333] [mavros]: Plugin local_position created
[mavros_node-1] [INFO] [1699633077.177115707] [mavros]: Plugin local_position initialized
[mavros_node-1] [INFO] [1699633077.177126748] [mavros]: is_plugin_allowed pl_name input: manual_control
[mavros_node-1] [INFO] [1699633077.181840303] [mavros]: Plugin manual_control created
[mavros_node-1] [INFO] [1699633077.182095551] [mavros]: Plugin manual_control initialized
[mavros_node-1] [INFO] [1699633077.182109801] [mavros]: is_plugin_allowed pl_name input: nav_controller_output
[mavros_node-1] [INFO] [1699633077.185786862] [mavros]: Plugin nav_controller_output created
[mavros_node-1] [INFO] [1699633077.185934403] [mavros]: Plugin nav_controller_output initialized
[mavros_node-1] [INFO] [1699633077.185945611] [mavros]: is_plugin_allowed pl_name input: param
[mavros_node-1] [INFO] [1699633077.191155621] [mavros]: Plugin param created
[mavros_node-1] [INFO] [1699633077.191300704] [mavros]: Plugin param initialized
[mavros_node-1] [INFO] [1699633077.191342453] [mavros]: is_plugin_allowed pl_name input: rallypoint
[mavros_node-1] [INFO] [1699633077.195875926] [mavros]: Plugin rallypoint created
[mavros_node-1] [INFO] [1699633077.196036341] [mavros]: Plugin rallypoint initialized
[mavros_node-1] [INFO] [1699633077.196047550] [mavros]: is_plugin_allowed pl_name input: rc_io
[mavros_node-1] [INFO] [1699633077.201640057] [mavros]: Plugin rc_io created
[mavros_node-1] [INFO] [1699633077.201861223] [mavros]: Plugin rc_io initialized
[mavros_node-1] [INFO] [1699633077.201874222] [mavros]: is_plugin_allowed pl_name input: setpoint_accel
[mavros_node-1] [INFO] [1699633077.205894156] [mavros]: Plugin setpoint_accel created
[mavros_node-1] [INFO] [1699633077.205940989] [mavros]: Plugin setpoint_accel initialized
[mavros_node-1] [INFO] [1699633077.205948281] [mavros]: is_plugin_allowed pl_name input: setpoint_attitude
[mavros_node-1] [INFO] [1699633077.212198618] [mavros]: Plugin setpoint_attitude created
[mavros_node-1] [INFO] [1699633077.212246409] [mavros]: Plugin setpoint_attitude initialized
[mavros_node-1] [INFO] [1699633077.212253743] [mavros]: is_plugin_allowed pl_name input: setpoint_position
[mavros_node-1] [INFO] [1699633077.218609870] [mavros]: Plugin setpoint_position created
[mavros_node-1] [INFO] [1699633077.218663578] [mavros]: Plugin setpoint_position initialized
[mavros_node-1] [INFO] [1699633077.218672995] [mavros]: is_plugin_allowed pl_name input: setpoint_raw
[mavros_node-1] [INFO] [1699633077.225499453] [mavros]: Plugin setpoint_raw created
[mavros_node-1] [INFO] [1699633077.225721160] [mavros]: Plugin setpoint_raw initialized
[mavros_node-1] [INFO] [1699633077.225733494] [mavros]: is_plugin_allowed pl_name input: setpoint_trajectory
[mavros_node-1] [INFO] [1699633077.233082824] [mavros]: Plugin setpoint_trajectory created
[mavros_node-1] [INFO] [1699633077.233141949] [mavros]: Plugin setpoint_trajectory initialized
[mavros_node-1] [INFO] [1699633077.233152449] [mavros]: is_plugin_allowed pl_name input: setpoint_velocity
[mavros_node-1] [INFO] [1699633077.239173079] [mavros]: Plugin setpoint_velocity created
[mavros_node-1] [INFO] [1699633077.239226953] [mavros]: Plugin setpoint_velocity initialized
[mavros_node-1] [INFO] [1699633077.239233911] [mavros]: is_plugin_allowed pl_name input: sys_status
[mavros_node-1] [INFO] [1699633077.251840960] [mavros]: Plugin sys_status created
[mavros_node-1] [INFO] [1699633077.252289499] [mavros]: Plugin sys_status initialized
[mavros_node-1] [INFO] [1699633077.252303832] [mavros]: is_plugin_allowed pl_name input: sys_time
[mavros_node-1] [INFO] [1699633077.257692882] [mavros.time]: TM: Timesync mode: MAVLINK
[mavros_node-1] [INFO] [1699633077.260421116] [mavros]: Plugin sys_time created
[mavros_node-1] [INFO] [1699633077.260612573] [mavros]: Plugin sys_time initialized
[mavros_node-1] [INFO] [1699633077.260626198] [mavros]: is_plugin_allowed pl_name input: waypoint
[mavros_node-1] [INFO] [1699633077.271618173] [mavros]: Plugin waypoint created
[mavros_node-1] [INFO] [1699633077.272021045] [mavros]: Plugin waypoint initialized
[mavros_node-1] [INFO] [1699633077.272044712] [mavros]: is_plugin_allowed pl_name input: wind_estimation
[mavros_node-1] [INFO] [1699633077.278958794] [mavros]: Plugin wind_estimation created
[mavros_node-1] [INFO] [1699633077.279173376] [mavros]: Plugin wind_estimation initialized

@vooon
Copy link
Member

vooon commented Nov 10, 2023

@gregoryw3 it's almost what we need, just you've checked what's came in to a function, while we need to see a result.

I think you need to add similar print to pattern_match().

@gregoryw3
Copy link

gregoryw3 commented Nov 10, 2023

EDIT: I can't seem to find where in the code does plugin_denylist get populated (where is set_lists() called, other than the tests folder?) ?
So the issue is that plugin_denylist is empty:

[mavros_node-1] [INFO] [1699638403.604880084] [mavros_node]: Starting mavros uas node
[mavros_node-1] [INFO] [1699638403.685164378] [mavros]: UAS Executor started, threads: 4
[mavros_node-1] [INFO] [1699638403.685348918] [mavros]: is_plugin_allowed pl_name input: actuator_control
[mavros_node-1] [INFO] [1699638403.685371918] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.723797121] [mavros]: Plugin actuator_control created
[mavros_node-1] [INFO] [1699638403.724146035] [mavros]: Plugin actuator_control initialized
[mavros_node-1] [INFO] [1699638403.724171701] [mavros]: is_plugin_allowed pl_name input: altitude
[mavros_node-1] [INFO] [1699638403.724185410] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.728227582] [mavros]: Plugin altitude created
[mavros_node-1] [INFO] [1699638403.728395706] [mavros]: Plugin altitude initialized
[mavros_node-1] [INFO] [1699638403.728408289] [mavros]: is_plugin_allowed pl_name input: command
[mavros_node-1] [INFO] [1699638403.728412414] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.737765540] [mavros]: Plugin command created
[mavros_node-1] [INFO] [1699638403.737920705] [mavros]: Plugin command initialized
[mavros_node-1] [INFO] [1699638403.737933455] [mavros]: is_plugin_allowed pl_name input: ftp
[mavros_node-1] [INFO] [1699638403.737937830] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.748283948] [mavros]: Plugin ftp created
[mavros_node-1] [INFO] [1699638403.748487071] [mavros]: Plugin ftp initialized
[mavros_node-1] [INFO] [1699638403.748499862] [mavros]: is_plugin_allowed pl_name input: geofence
[mavros_node-1] [INFO] [1699638403.748507154] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.756669791] [mavros]: Plugin geofence created
[mavros_node-1] [INFO] [1699638403.757438242] [mavros]: Plugin geofence initialized
[mavros_node-1] [INFO] [1699638403.757461242] [mavros]: is_plugin_allowed pl_name input: global_position
[mavros_node-1] [INFO] [1699638403.757469783] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.770632709] [mavros]: Plugin global_position created
[mavros_node-1] [INFO] [1699638403.770952915] [mavros]: Plugin global_position initialized
[mavros_node-1] [INFO] [1699638403.770969831] [mavros]: is_plugin_allowed pl_name input: home_position
[mavros_node-1] [INFO] [1699638403.770976415] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.776322368] [mavros]: Plugin home_position created
[mavros_node-1] [INFO] [1699638403.776488325] [mavros]: Plugin home_position initialized
[mavros_node-1] [INFO] [1699638403.776499283] [mavros]: is_plugin_allowed pl_name input: imu
[mavros_node-1] [INFO] [1699638403.776505783] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.782854477] [mavros]: Plugin imu created
[mavros_node-1] [INFO] [1699638403.783569971] [mavros]: Plugin imu initialized
[mavros_node-1] [INFO] [1699638403.783595012] [mavros]: is_plugin_allowed pl_name input: local_position
[mavros_node-1] [INFO] [1699638403.783656512] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.795815905] [mavros]: Plugin local_position created
[mavros_node-1] [INFO] [1699638403.796174068] [mavros]: Plugin local_position initialized
[mavros_node-1] [INFO] [1699638403.796191860] [mavros]: is_plugin_allowed pl_name input: manual_control
[mavros_node-1] [INFO] [1699638403.796224068] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.801805019] [mavros]: Plugin manual_control created
[mavros_node-1] [INFO] [1699638403.802128099] [mavros]: Plugin manual_control initialized
[mavros_node-1] [INFO] [1699638403.802149682] [mavros]: is_plugin_allowed pl_name input: nav_controller_output
[mavros_node-1] [INFO] [1699638403.802158182] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.806950015] [mavros]: Plugin nav_controller_output created
[mavros_node-1] [INFO] [1699638403.807151930] [mavros]: Plugin nav_controller_output initialized
[mavros_node-1] [INFO] [1699638403.807161763] [mavros]: is_plugin_allowed pl_name input: param
[mavros_node-1] [INFO] [1699638403.807165888] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.813432750] [mavros]: Plugin param created
[mavros_node-1] [INFO] [1699638403.813597706] [mavros]: Plugin param initialized
[mavros_node-1] [INFO] [1699638403.813609790] [mavros]: is_plugin_allowed pl_name input: rallypoint
[mavros_node-1] [INFO] [1699638403.813613915] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.819724986] [mavros]: Plugin rallypoint created
[mavros_node-1] [INFO] [1699638403.819894984] [mavros]: Plugin rallypoint initialized
[mavros_node-1] [INFO] [1699638403.819904193] [mavros]: is_plugin_allowed pl_name input: rc_io
[mavros_node-1] [INFO] [1699638403.819908318] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.825606643] [mavros]: Plugin rc_io created
[mavros_node-1] [INFO] [1699638403.825827391] [mavros]: Plugin rc_io initialized
[mavros_node-1] [INFO] [1699638403.825839849] [mavros]: is_plugin_allowed pl_name input: setpoint_accel
[mavros_node-1] [INFO] [1699638403.825846015] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.831866296] [mavros]: Plugin setpoint_accel created
[mavros_node-1] [INFO] [1699638403.832038128] [mavros]: Plugin setpoint_accel initialized
[mavros_node-1] [INFO] [1699638403.832050544] [mavros]: is_plugin_allowed pl_name input: setpoint_attitude
[mavros_node-1] [INFO] [1699638403.832054669] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.846566125] [mavros]: Plugin setpoint_attitude created
[mavros_node-1] [INFO] [1699638403.846648832] [mavros]: Plugin setpoint_attitude initialized
[mavros_node-1] [INFO] [1699638403.846664416] [mavros]: is_plugin_allowed pl_name input: setpoint_position
[mavros_node-1] [INFO] [1699638403.846673707] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.857209406] [mavros]: Plugin setpoint_position created
[mavros_node-1] [INFO] [1699638403.857281156] [mavros]: Plugin setpoint_position initialized
[mavros_node-1] [INFO] [1699638403.857291322] [mavros]: is_plugin_allowed pl_name input: setpoint_raw
[mavros_node-1] [INFO] [1699638403.857298155] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.867372859] [mavros]: Plugin setpoint_raw created
[mavros_node-1] [INFO] [1699638403.867670023] [mavros]: Plugin setpoint_raw initialized
[mavros_node-1] [INFO] [1699638403.867685064] [mavros]: is_plugin_allowed pl_name input: setpoint_trajectory
[mavros_node-1] [INFO] [1699638403.867694189] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.883757006] [mavros]: Plugin setpoint_trajectory created
[mavros_node-1] [INFO] [1699638403.883810256] [mavros]: Plugin setpoint_trajectory initialized
[mavros_node-1] [INFO] [1699638403.883818256] [mavros]: is_plugin_allowed pl_name input: setpoint_velocity
[mavros_node-1] [INFO] [1699638403.883821964] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.893475046] [mavros]: Plugin setpoint_velocity created
[mavros_node-1] [INFO] [1699638403.893542753] [mavros]: Plugin setpoint_velocity initialized
[mavros_node-1] [INFO] [1699638403.893613586] [mavros]: is_plugin_allowed pl_name input: sys_status
[mavros_node-1] [INFO] [1699638403.893624419] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.911155765] [mavros]: Plugin sys_status created
[mavros_node-1] [INFO] [1699638403.911699385] [mavros]: Plugin sys_status initialized
[mavros_node-1] [INFO] [1699638403.911716552] [mavros]: is_plugin_allowed pl_name input: sys_time
[mavros_node-1] [INFO] [1699638403.911722260] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.919125237] [mavros.time]: TM: Timesync mode: MAVLINK
[mavros_node-1] [INFO] [1699638403.922891079] [mavros]: Plugin sys_time created
[mavros_node-1] [INFO] [1699638403.923170201] [mavros]: Plugin sys_time initialized
[mavros_node-1] [INFO] [1699638403.923186576] [mavros]: is_plugin_allowed pl_name input: waypoint
[mavros_node-1] [INFO] [1699638403.923191784] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.943314982] [mavros]: Plugin waypoint created
[mavros_node-1] [INFO] [1699638403.943665312] [mavros]: Plugin waypoint initialized
[mavros_node-1] [INFO] [1699638403.943714729] [mavros]: is_plugin_allowed pl_name input: wind_estimation
[mavros_node-1] [INFO] [1699638403.943725187] [mavros]: Size of plugin_denylist: 0
[mavros_node-1] [INFO] [1699638403.953325353] [mavros]: Plugin wind_estimation created
[mavros_node-1] [INFO] [1699638403.953595350] [mavros]: Plugin wind_estimation initialized

Code added:

bool UAS::is_plugin_allowed(
  const std::string & pl_name)
{
  RCLCPP_INFO(get_logger(), "is_plugin_allowed pl_name input: %s", pl_name.c_str());
  RCLCPP_INFO(get_logger(), "Size of plugin_denylist: %i", plugin_denylist.size());
  for (auto & bl_pattern : plugin_denylist) {
    RCLCPP_INFO(get_logger(), "pattern_match bl_pattern: %s", bl_pattern.c_str());
    if (pattern_match(bl_pattern, pl_name)) {
      RCLCPP_INFO(get_logger(), "pattern_match bl_pattern: true");
      for (auto & wl_pattern : plugin_allowlist) {
        if (pattern_match(wl_pattern, pl_name)) {
          RCLCPP_INFO(get_logger(), "pattern_match wl_pattern: true");
          return true;
        }
        RCLCPP_INFO(get_logger(), "pattern_match wl_pattern: false");
      }

      return false;
    }
    RCLCPP_INFO(get_logger(), "pattern_match bl_pattern: false");
  }

  return true;
}

@vooon
Copy link
Member

vooon commented Nov 13, 2023

@vooon
Copy link
Member

vooon commented Nov 13, 2023

Please try to change params.yaml that way:

/mavros:
  ros__parameters:
    plugin_denylist:
      - '*'

@gregoryw3
Copy link

/mavros/**:
  ros__parameters:
    plugin_blacklist:
      - '*'
    # plugin_allowlist:
    #   - 'sys_*'

and

/mavros:
  ros__parameters:
    plugin_denylist:
      - '*'
    # plugin_allowlist:
    #   - 'sys_*'

Did not change anything, it had the same output as #1917 (comment)

@vooon
Copy link
Member

vooon commented Nov 14, 2023

@gregoryw3 could you please change 10ms to 1000ms at startup timer? Suspicion that it runs earlier than parameter server does something.

@mgiurato
Copy link
Contributor

This problem should have been fixed by this commit:
97cf3c6

Which commit are you working on?

@mzahana
Copy link
Contributor Author

mzahana commented Nov 18, 2023

@mgiurato would that commit affect the parameters loading in multi-uav simulation, where there are multiple uavs with different namespaces?

@gregoryw3
Copy link

gregoryw3 commented Nov 19, 2023

This problem should have been fixed by this commit: 97cf3c6

Which commit are you working on?

I have no idea anymore. I can't seem to build anymore and the folder got corrupted. After git cloneing the latest commit, I get this error when building:

Starting >>> libmavconn
Starting >>> mavros_msgs
Finished <<< libmavconn [0.98s]                                                             
--- stderr: mavros_msgs                             
Traceback (most recent call last):
  File "/opt/ros/foxy/lib/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp", line 23, in <module>
    sys.exit(main())
  File "/opt/ros/foxy/lib/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp", line 19, in main
    return generate_cpp(args.generator_arguments_file)
  File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_typesupport_fastrtps_cpp/__init__.py", line 24, in generate_cpp
    generate_files(generator_arguments_file, mapping)
  File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_cmake/__init__.py", line 55, in generate_files
    args = read_generator_arguments(generator_arguments_file)
  File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_cmake/__init__.py", line 39, in read_generator_arguments
    return json.load(h)
  File "/usr/lib/python3.8/json/__init__.py", line 293, in load
    return loads(fp.read(),
  File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 208 column 1 (char 18507)
make[2]: *** [CMakeFiles/mavros_msgs__rosidl_typesupport_fastrtps_cpp.dir/build.make:301: rosidl_typesupport_fastrtps_cpp/mavros_msgs/msg/detail/dds_fastrtps/adsb_vehicle__type_support.cpp] Error 1
make[1]: *** [CMakeFiles/Makefile2:412: CMakeFiles/mavros_msgs__rosidl_typesupport_fastrtps_cpp.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Traceback (most recent call last):
  File "/opt/ros/foxy/lib/rosidl_typesupport_c/rosidl_typesupport_c", line 28, in <module>
    sys.exit(main())
  File "/opt/ros/foxy/lib/rosidl_typesupport_c/rosidl_typesupport_c", line 24, in main
    return generate_c(args.generator_arguments_file, args.typesupports)
  File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_typesupport_c/__init__.py", line 28, in generate_c
    generate_files(
  File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_cmake/__init__.py", line 55, in generate_files
    args = read_generator_arguments(generator_arguments_file)
  File "/opt/ros/foxy/lib/python3.8/site-packages/rosidl_cmake/__init__.py", line 39, in read_generator_arguments
    return json.load(h)
  File "/usr/lib/python3.8/json/__init__.py", line 293, in load
    return loads(fp.read(),
  File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.8/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 94 column 3 (char 9511)
make[2]: *** [CMakeFiles/mavros_msgs__rosidl_typesupport_c.dir/build.make:299: rosidl_typesupport_c/mavros_msgs/msg/adsb_vehicle__type_support.cpp] Error 1
make[1]: *** [CMakeFiles/Makefile2:439: CMakeFiles/mavros_msgs__rosidl_typesupport_c.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed   <<< mavros_msgs [2.71s, exited with code 2]

Summary: 1 package finished [3.93s]
  1 package failed: mavros_msgs
  1 package had stderr output: mavros_msgs
  2 packages not processed

I belive I was on 2.4.0-1 ROS Foxy release. It was selected as a tag, however I don't see the tag on github anymore.

When trying to build just in the mavros folder, I get this error:

Starting >>> mavros  
[Processing: mavros]                             
[Processing: mavros]                                     
[Processing: mavros]                                       
[Processing: mavros]                                       
--- stderr: mavros                                       
~/Downloads/mavros/mavros/src/plugins/command.cpp:33:10: fatal error: mavros_msgs/srv/command_tol_local.hpp: No such file or directory
   33 | #include "mavros_msgs/srv/command_tol_local.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/mavros_plugins.dir/build.make:89: CMakeFiles/mavros_plugins.dir/src/plugins/command.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:189: CMakeFiles/mavros_plugins.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed   <<< mavros [2min 4s, exited with code 2]

Summary: 0 packages finished [2min 5s]
  1 package failed: mavros
  1 package had stderr output: mavros

@21coolkarni
Copy link

did anyone find solution for this problem?

@limshoonkit
Copy link

i can see the plugins being ignored

px4.launch.py

import os

from ament_index_python import get_package_share_directory
from launch import LaunchDescription
from launch_ros.actions import Node

def generate_launch_description():
    px4_config_path = os.path.join(
        get_package_share_directory('mavros'),
        'launch', 'px4_config.yaml'
    )
    px4_pluginlists_path = os.path.join(
        get_package_share_directory('mavros'),
        'launch', 'px4_pluginlists.yaml'
    )

    return LaunchDescription([

        Node(
            package='mavros',
            executable='mavros_node',
            parameters=[
                px4_pluginlists_path,
                px4_config_path,
            {    
                'fcu_url': '/dev/ttyACM0:921600',
                'gcs_url': '',
                'tgt_system': 1,
                'tgt_component': 1,
                'fcu_protocol': "v2.0",
                'respawn_mavros': "false",
                'namespace': "mavros",
            }],
        ),
    ])

px4_pluginlists.yaml

/**:
  ros__parameters:
    plugin_denylist:
      - '*'

      
    # plugin_allowlist:
    #   - 'sys_*'

mavros_node_output

[mavros_node-1] [INFO] [1710311570.165550198] [mavros]: Plugin actuator_control ignored
[mavros_node-1] [INFO] [1710311570.165688965] [mavros]: Plugin adsb ignored
[mavros_node-1] [INFO] [1710311570.165709479] [mavros]: Plugin altitude ignored
[mavros_node-1] [INFO] [1710311570.165725033] [mavros]: Plugin cam_imu_sync ignored
[mavros_node-1] [INFO] [1710311570.165738795] [mavros]: Plugin camera ignored
[mavros_node-1] [INFO] [1710311570.165751244] [mavros]: Plugin cellular_status ignored
[mavros_node-1] [INFO] [1710311570.165762861] [mavros]: Plugin command ignored
[mavros_node-1] [INFO] [1710311570.165775055] [mavros]: Plugin companion_process_status ignored
[mavros_node-1] [INFO] [1710311570.165786672] [mavros]: Plugin debug_value ignored
[mavros_node-1] [INFO] [1710311570.165797201] [mavros]: Plugin distance_sensor ignored
[mavros_node-1] [INFO] [1710311570.165807730] [mavros]: Plugin esc_status ignored
[mavros_node-1] [INFO] [1710311570.165818996] [mavros]: Plugin esc_telemetry ignored
[mavros_node-1] [INFO] [1710311570.165829589] [mavros]: Plugin fake_gps ignored
[mavros_node-1] [INFO] [1710311570.165841046] [mavros]: Plugin ftp ignored
[mavros_node-1] [INFO] [1710311570.165853047] [mavros]: Plugin geofence ignored
[mavros_node-1] [INFO] [1710311570.165863448] [mavros]: Plugin global_position ignored
[mavros_node-1] [INFO] [1710311570.165873914] [mavros]: Plugin gps_input ignored
[mavros_node-1] [INFO] [1710311570.165884667] [mavros]: Plugin gps_rtk ignored
[mavros_node-1] [INFO] [1710311570.165894908] [mavros]: Plugin gps_status ignored
[mavros_node-1] [INFO] [1710311570.165905405] [mavros]: Plugin guided_target ignored
[mavros_node-1] [INFO] [1710311570.165916030] [mavros]: Plugin hil ignored
[mavros_node-1] [INFO] [1710311570.165926847] [mavros]: Plugin home_position ignored
[mavros_node-1] [INFO] [1710311570.165937505] [mavros]: Plugin imu ignored
[mavros_node-1] [INFO] [1710311570.165948226] [mavros]: Plugin landing_target ignored
[mavros_node-1] [INFO] [1710311570.165958531] [mavros]: Plugin local_position ignored
[mavros_node-1] [INFO] [1710311570.165969540] [mavros]: Plugin log_transfer ignored
[mavros_node-1] [INFO] [1710311570.165980261] [mavros]: Plugin mag_calibration_status ignored
[mavros_node-1] [INFO] [1710311570.165991239] [mavros]: Plugin manual_control ignored
[mavros_node-1] [INFO] [1710311570.166001992] [mavros]: Plugin mocap_pose_estimate ignored
[mavros_node-1] [INFO] [1710311570.166012969] [mavros]: Plugin mount_control ignored
[mavros_node-1] [INFO] [1710311570.166024010] [mavros]: Plugin nav_controller_output ignored
[mavros_node-1] [INFO] [1710311570.166034923] [mavros]: Plugin obstacle_distance ignored
[mavros_node-1] [INFO] [1710311570.166045356] [mavros]: Plugin odometry ignored
[mavros_node-1] [INFO] [1710311570.166056174] [mavros]: Plugin onboard_computer_status ignored
[mavros_node-1] [INFO] [1710311570.166174523] [mavros]: Plugin optical_flow ignored
[mavros_node-1] [INFO] [1710311570.166193949] [mavros]: Plugin param ignored
[mavros_node-1] [INFO] [1710311570.166206046] [mavros]: Plugin play_tune ignored
[mavros_node-1] [INFO] [1710311570.166217215] [mavros]: Plugin px4flow ignored
[mavros_node-1] [INFO] [1710311570.166227841] [mavros]: Plugin rallypoint ignored
[mavros_node-1] [INFO] [1710311570.166238402] [mavros]: Plugin rangefinder ignored
[mavros_node-1] [INFO] [1710311570.166248643] [mavros]: Plugin rc_io ignored
[mavros_node-1] [INFO] [1710311570.166259428] [mavros]: Plugin setpoint_accel ignored
[mavros_node-1] [INFO] [1710311570.166269637] [mavros]: Plugin setpoint_attitude ignored
[mavros_node-1] [INFO] [1710311570.166280198] [mavros]: Plugin setpoint_position ignored
[mavros_node-1] [INFO] [1710311570.166290504] [mavros]: Plugin setpoint_raw ignored
[mavros_node-1] [INFO] [1710311570.166300905] [mavros]: Plugin setpoint_trajectory ignored
[mavros_node-1] [INFO] [1710311570.166311626] [mavros]: Plugin setpoint_velocity ignored
[mavros_node-1] [INFO] [1710311570.166322027] [mavros]: Plugin sys_status ignored
[mavros_node-1] [INFO] [1710311570.166332268] [mavros]: Plugin sys_time ignored
[mavros_node-1] [INFO] [1710311570.166343053] [mavros]: Plugin tdr_radio ignored
[mavros_node-1] [INFO] [1710311570.166353390] [mavros]: Plugin terrain ignored
[mavros_node-1] [INFO] [1710311570.166363984] [mavros]: Plugin trajectory ignored
[mavros_node-1] [INFO] [1710311570.166374417] [mavros]: Plugin tunnel ignored
[mavros_node-1] [INFO] [1710311570.166384754] [mavros]: Plugin vfr_hud ignored
[mavros_node-1] [INFO] [1710311570.166395315] [mavros]: Plugin vibration ignored
[mavros_node-1] [INFO] [1710311570.166406004] [mavros]: Plugin vision_pose ignored
[mavros_node-1] [INFO] [1710311570.166416309] [mavros]: Plugin vision_speed ignored
[mavros_node-1] [INFO] [1710311570.166427095] [mavros]: Plugin waypoint ignored
[mavros_node-1] [INFO] [1710311570.166437592] [mavros]: Plugin wheel_odomotry ignored
[mavros_node-1] [INFO] [1710311570.166448121] [mavros]: Plugin wind_estimation ignored

@gregoryw3
Copy link

gregoryw3 commented Mar 28, 2024

I was able to figure it some things out.
For some reason mavros ignores any config passed to it.

If you sudo edit "/opt/ros/iron/share/mavros/launch/px4_pluginlists.yaml" then launch it, it shows the same output that limshoonkit has. Once mavros exits or maybe upon launching mavros again, the file is rewritten to be in it's default state.

Still working on trying to get a package based config to work.

@gregoryw3
Copy link

I was able to get it (at least in iron and python package):

  • package
    • config
      • px4_config.yaml
      • px4_pluginlists.yaml
    • package
    • launch
      • px4.launch.py
    • resource
    • setup.py

px4_config.yaml
default

px4_pluginlists.yaml

/**:
  ros__parameters:
    plugin_denylist:
      - '*'

      
    # plugin_allowlist:
    #   - 'sys_*'

px4.launch.py

px4.launch.py
import os

from ament_index_python import get_package_share_directory
from launch import LaunchDescription
from launch_ros.actions import Node

def generate_launch_description():
    px4_config_path = os.path.join(
        get_package_share_directory('controls'),
        'config', 'px4_config.yaml'
    )
    px4_pluginlists_path = os.path.join(
        get_package_share_directory('controls'),
        'config', 'px4_pluginlists.yaml'
    )

    return LaunchDescription([

        Node(
            package='mavros',
            executable='mavros_node',
            parameters=[
                px4_pluginlists_path,
                px4_config_path,
            {    
                'fcu_url': '/dev/ttyACM0:921600',
                'gcs_url': '',
                'tgt_system': 1,
                'tgt_component': 1,
                'fcu_protocol': "v2.0",
                'respawn_mavros': "false",
                'namespace': "mavros",
            }],
        ),
    ])

setup.py

import os
from glob import glob
from setuptools import find_packages, setup

package_name = 'controls'

setup(
    name=package_name,
    version='0.0.1',
    packages=find_packages(),
    py_modules=[],
    install_requires=[
        'setuptools',
        ],
    data_files=[
        ('share/ament_index/resource_index/packages',
            ['resource/' + package_name]),
        ('share/' + package_name, ['package.xml']),
        (os.path.join('share', package_name, 'launch'), glob(os.path.join('launch', '*.launch*'))),
        (os.path.join('share', package_name, 'config'), glob(os.path.join('config', '*'))),
        

    ],
    entry_points={
        'console_scripts': [
            'mavros_coms = controls.mavros_coms:main'
        ],
    },
)


@mgiurato
Copy link
Contributor

@mgiurato would that commit affect the parameters loading in multi-uav simulation, where there are multiple uavs with different namespaces?

Late reply here... Sincerly I have no idea on how to manage a multi drone environment with mavros.
I am using mavros only for a single drone and moving towards different implementations based on DDS instead of MAVLink for multi drones setup.

@joseVolair
Copy link

For me it finally worked when I removed \mavros from the apm_pluginlist file:

/mavros/**:
  ros__parameters:
    plugin_denylist:
      # common
      - actuator_control
      - ftp
      - hil
      - extras
      - altitude
      - debug_value
      - image_pub
      - px4flow
      - vibration
      - distance_sensor
      # - vision_speed_estimate
      - wheel_odometry

    # plugin_allowlist:
    #   - 'sys_*'

to

/**:
  ros__parameters:
    plugin_denylist:
      # common
      - actuator_control
      - ftp
      - hil
      - extras
      - altitude
      - debug_value
      - image_pub
      - px4flow
      - vibration
      - distance_sensor
      # - vision_speed_estimate
      - wheel_odometry

    # plugin_allowlist:
    #   - 'sys_*'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants