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

Command sent using COMMAND_INT receives "COMMAND_ACK:UNSUPPORTED" #1933

Closed
nraines2002 opened this issue Feb 14, 2024 · 5 comments
Closed

Command sent using COMMAND_INT receives "COMMAND_ACK:UNSUPPORTED" #1933

nraines2002 opened this issue Feb 14, 2024 · 5 comments

Comments

@nraines2002
Copy link

nraines2002 commented Feb 14, 2024

To anyone having this issue

Sending CONDITION_CHANGE_ALT is not yet supported but similar commands are.
See wiki: https://ardupilot.org/dev/docs/copter-commands-in-guided-mode.html

Issue details

Sending MAVLink messages via Command_Int is returning COMMAND_ACK:[COMMAND_NAME]:UNSUPPORTED. I am using MAVROS built using ROS2 Foxy to pack and send these commands, using the Command_Long MAVROS service to send a Set_Mode message works but returns COMMAND_ACK:DO_SET_MODE:DENIED. I have sent the message with frames, MAV_FRAME_GLOBAL, MAV_FRAME_LOCAL_NED, MAV_FRAME_MISSION, MAV_FRAME_GLOBAL_RELATIVE_ALT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT to no avail.

Current usage:

auto request = std::make_shared<mavros_msgs::srv::CommandInt::Request>();
                request->frame = mavros_msgs::msg::Waypoint::FRAME_GLOBAL_REL_ALT;
                request->command = 113;
                request->current = 0;
                request->autocontinue = 0;
                request->param1 = 0;                        
                request->param2 = 0;                       
                request->param3 = 0;                        
                request->param4 = 0;                        
                request->x = 0;                        
                request->y = 0;                        
                request->z = alt; (altitude in meters)
                                                                      
                auto result = comm_client_->async_send_request(request);

MAVROS version and platform

Mavros: 2.6.0
ROS: Foxy(ROS2)
Ubuntu: 20.04

Autopilot type and version

[X] ArduPilot
[ ] PX4

Version: 4.4/4.3/4.2

Node logs

[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [mavros_node-1]: process started with pid [31941]
[mavros_node-1] [INFO] [1707933903.665168676] [mavros.mavros_node]: Starting mavros_node container
[mavros_node-1] [INFO] [1707933903.665209627] [mavros.mavros_node]: FCU URL: udp://127.0.0.1:14551@14555
[mavros_node-1] [INFO] [1707933903.665214103] [mavros.mavros_node]: GCS URL: 
[mavros_node-1] [INFO] [1707933903.665217100] [mavros.mavros_node]: UAS Prefix: /uas1
[mavros_node-1] [INFO] [1707933903.665219714] [mavros.mavros_node]: Starting mavros router node
[mavros_node-1] [INFO] [1707933903.666820160] [mavros.mavros_router]: Built-in SIMD instructions: SSE, SSE2
[mavros_node-1] [INFO] [1707933903.666834159] [mavros.mavros_router]: Built-in MAVLink package version: 2022.12.30
[mavros_node-1] [INFO] [1707933903.666837857] [mavros.mavros_router]: Known MAVLink dialects: common ardupilotmega ASLUAV AVSSUAS all cubepilot development icarous matrixpilot paparazzi standard storm32 uAvionix ualberta
[mavros_node-1] [INFO] [1707933903.666841316] [mavros.mavros_router]: MAVROS Router started
[mavros_node-1] [INFO] [1707933903.666910852] [mavros.mavros_router]: Requested to add endpoint: type: 0, url: udp://127.0.0.1:14551@14555
[mavros_node-1] [INFO] [1707933903.667066687] [mavros.mavros_router]: Endpoint link[1000] created
[mavros_node-1] [INFO] [1707933903.667800774] [mavros.mavros_router]: link[1000] opened successfully
[mavros_node-1] [INFO] [1707933903.667853348] [mavros.mavros_router]: Requested to add endpoint: type: 2, url: /uas1
[mavros_node-1] [INFO] [1707933903.667909999] [mavros.mavros_router]: Endpoint link[1001] created
[mavros_node-1] [INFO] [1707933903.668478830] [mavros.mavros_router]: link[1001] opened successfully
[mavros_node-1] [INFO] [1707933903.668499282] [mavros.mavros_node]: Starting mavros uas node
[mavros_node-1] [INFO] [1707933903.692806472] [mavros.mavros]: UAS Executor started, threads: 16
[mavros_node-1] [INFO] [1707933903.702229853] [mavros.mavros]: Plugin actuator_control created
[mavros_node-1] [INFO] [1707933903.702450869] [mavros.mavros]: Plugin actuator_control initialized
[mavros_node-1] [INFO] [1707933903.712210043] [mavros.mavros]: Plugin adsb created
[mavros_node-1] [INFO] [1707933903.712367654] [mavros.mavros]: Plugin adsb initialized
[mavros_node-1] [INFO] [1707933903.714001194] [mavros.mavros]: Plugin altitude created
[mavros_node-1] [INFO] [1707933903.714112516] [mavros.mavros]: Plugin altitude initialized
[mavros_node-1] [INFO] [1707933903.715526701] [mavros.mavros]: Plugin cam_imu_sync created
[mavros_node-1] [INFO] [1707933903.715620668] [mavros.mavros]: Plugin cam_imu_sync initialized
[mavros_node-1] [INFO] [1707933903.717062842] [mavros.mavros]: Plugin camera created
[mavros_node-1] [INFO] [1707933903.717154404] [mavros.mavros]: Plugin camera initialized
[mavros_node-1] [INFO] [1707933903.718840078] [mavros.mavros]: Plugin cellular_status created
[mavros_node-1] [INFO] [1707933903.718858793] [mavros.mavros]: Plugin cellular_status initialized
[mavros_node-1] [INFO] [1707933903.722791091] [mavros.mavros]: Plugin command created
[mavros_node-1] [INFO] [1707933903.722904703] [mavros.mavros]: Plugin command initialized
[mavros_node-1] [INFO] [1707933903.724987898] [mavros.mavros]: Plugin companion_process_status created
[mavros_node-1] [INFO] [1707933903.725006676] [mavros.mavros]: Plugin companion_process_status initialized
[mavros_node-1] [INFO] [1707933903.727415122] [mavros.mavros]: Plugin debug_value created
[mavros_node-1] [INFO] [1707933903.727651921] [mavros.mavros]: Plugin debug_value initialized
[mavros_node-1] [INFO] [1707933903.729460901] [mavros.distance_sensor]: DS: Plugin not configured!
[mavros_node-1] [INFO] [1707933903.729526346] [mavros.mavros]: Plugin distance_sensor created
[mavros_node-1] [INFO] [1707933903.729606876] [mavros.mavros]: Plugin distance_sensor initialized
[mavros_node-1] [INFO] [1707933903.731696267] [mavros.mavros]: Plugin esc_status created
[mavros_node-1] [INFO] [1707933903.731820175] [mavros.mavros]: Plugin esc_status initialized
[mavros_node-1] [INFO] [1707933903.733695248] [mavros.mavros]: Plugin esc_telemetry created
[mavros_node-1] [INFO] [1707933903.733844488] [mavros.mavros]: Plugin esc_telemetry initialized
[mavros_node-1] [INFO] [1707933903.736842509] [mavros.mavros]: Plugin fake_gps created
[mavros_node-1] [INFO] [1707933903.736861143] [mavros.mavros]: Plugin fake_gps initialized
[mavros_node-1] [INFO] [1707933903.742475746] [mavros.mavros]: Plugin ftp created
[mavros_node-1] [INFO] [1707933903.742602083] [mavros.mavros]: Plugin ftp initialized
[mavros_node-1] [INFO] [1707933903.746066304] [mavros.mavros]: Plugin geofence created
[mavros_node-1] [INFO] [1707933903.746350427] [mavros.mavros]: Plugin geofence initialized
[mavros_node-1] [INFO] [1707933903.751794206] [mavros.mavros]: Plugin global_position created
[mavros_node-1] [INFO] [1707933903.751982463] [mavros.mavros]: Plugin global_position initialized
[mavros_node-1] [INFO] [1707933903.754728709] [mavros.mavros]: Plugin gps_input created
[mavros_node-1] [INFO] [1707933903.754775044] [mavros.mavros]: Plugin gps_input initialized
[mavros_node-1] [INFO] [1707933903.757993112] [mavros.mavros]: Plugin gps_rtk created
[mavros_node-1] [INFO] [1707933903.758107666] [mavros.mavros]: Plugin gps_rtk initialized
[mavros_node-1] [INFO] [1707933903.761141094] [mavros.mavros]: Plugin gps_status created
[mavros_node-1] [INFO] [1707933903.761389456] [mavros.mavros]: Plugin gps_status initialized
[mavros_node-1] [INFO] [1707933903.764441217] [mavros.mavros]: Plugin guided_target created
[mavros_node-1] [INFO] [1707933903.764536190] [mavros.mavros]: Plugin guided_target initialized
[mavros_node-1] [INFO] [1707933903.769620814] [mavros.mavros]: Plugin hil created
[mavros_node-1] [INFO] [1707933903.769739181] [mavros.mavros]: Plugin hil initialized
[mavros_node-1] [INFO] [1707933903.773400334] [mavros.mavros]: Plugin home_position created
[mavros_node-1] [INFO] [1707933903.773507488] [mavros.mavros]: Plugin home_position initialized
[mavros_node-1] [INFO] [1707933903.778182123] [mavros.mavros]: Plugin imu created
[mavros_node-1] [INFO] [1707933903.778471049] [mavros.mavros_router]: link[1000] detected remote address 1.1
[mavros_node-1] [INFO] [1707933903.778520140] [mavros.mavros]: Plugin imu initialized
[mavros_node-1] [INFO] [1707933903.783464321] [mavros.mavros]: Plugin landing_target created
[mavros_node-1] [INFO] [1707933903.783573767] [mavros.mavros]: Plugin landing_target initialized
[mavros_node-1] [INFO] [1707933903.787895523] [mavros.mavros]: Plugin local_position created
[mavros_node-1] [INFO] [1707933903.788046555] [mavros.mavros]: Plugin local_position initialized
[mavros_node-1] [INFO] [1707933903.793014582] [mavros.mavros]: Plugin log_transfer created
[mavros_node-1] [INFO] [1707933903.793167025] [mavros.mavros]: Plugin log_transfer initialized
[mavros_node-1] [INFO] [1707933903.796654842] [mavros.mavros]: Plugin mag_calibration_status created
[mavros_node-1] [INFO] [1707933903.796795197] [mavros.mavros]: Plugin mag_calibration_status initialized
[mavros_node-1] [INFO] [1707933903.800723466] [mavros.mavros]: Plugin manual_control created
[mavros_node-1] [INFO] [1707933903.800830989] [mavros.mavros]: Plugin manual_control initialized
[mavros_node-1] [INFO] [1707933903.804312065] [mavros.mavros]: Plugin mocap_pose_estimate created
[mavros_node-1] [INFO] [1707933903.804336905] [mavros.mavros]: Plugin mocap_pose_estimate initialized
[mavros_node-1] [INFO] [1707933903.809928914] [mavros.mavros]: Plugin mount_control created
[mavros_node-1] [INFO] [1707933903.810095539] [mavros.mavros]: Plugin mount_control initialized
[mavros_node-1] [INFO] [1707933903.813736354] [mavros.mavros]: Plugin nav_controller_output created
[mavros_node-1] [INFO] [1707933903.813857487] [mavros.mavros]: Plugin nav_controller_output initialized
[mavros_node-1] [INFO] [1707933903.817774228] [mavros.mavros]: Plugin obstacle_distance created
[mavros_node-1] [INFO] [1707933903.817797557] [mavros.mavros]: Plugin obstacle_distance initialized
[mavros_node-1] [INFO] [1707933903.822412428] [mavros.mavros]: Plugin odometry created
[mavros_node-1] [INFO] [1707933903.822538309] [mavros.mavros]: Plugin odometry initialized
[mavros_node-1] [INFO] [1707933903.826722733] [mavros.mavros]: Plugin onboard_computer_status created
[mavros_node-1] [INFO] [1707933903.826754928] [mavros.mavros]: Plugin onboard_computer_status initialized
[mavros_node-1] [INFO] [1707933903.832050624] [mavros.mavros]: Plugin optical_flow created
[mavros_node-1] [INFO] [1707933903.832163751] [mavros.mavros]: Plugin optical_flow initialized
[mavros_node-1] [INFO] [1707933903.837892580] [mavros.mavros]: Plugin param created
[mavros_node-1] [INFO] [1707933903.838020136] [mavros.mavros]: Plugin param initialized
[mavros_node-1] [INFO] [1707933903.842673902] [mavros.mavros]: Plugin play_tune created
[mavros_node-1] [INFO] [1707933903.842704361] [mavros.mavros]: Plugin play_tune initialized
[mavros_node-1] [INFO] [1707933903.848291843] [mavros.mavros]: Plugin px4flow created
[mavros_node-1] [INFO] [1707933903.848409817] [mavros.mavros]: Plugin px4flow initialized
[mavros_node-1] [INFO] [1707933903.853756380] [mavros.mavros]: Plugin rallypoint created
[mavros_node-1] [INFO] [1707933903.853859790] [mavros.mavros]: Plugin rallypoint initialized
[mavros_node-1] [INFO] [1707933903.858139214] [mavros.mavros]: Plugin rangefinder created
[mavros_node-1] [INFO] [1707933903.858275359] [mavros.mavros]: Plugin rangefinder initialized
[mavros_node-1] [INFO] [1707933903.863707150] [mavros.mavros]: Plugin rc_io created
[mavros_node-1] [INFO] [1707933903.863896215] [mavros.mavros]: Plugin rc_io initialized
[mavros_node-1] [INFO] [1707933903.868803393] [mavros.mavros]: Plugin setpoint_accel created
[mavros_node-1] [INFO] [1707933903.868834572] [mavros.mavros]: Plugin setpoint_accel initialized
[mavros_node-1] [INFO] [1707933903.876047834] [mavros.mavros]: Plugin setpoint_attitude created
[mavros_node-1] [INFO] [1707933903.876101667] [mavros.mavros]: Plugin setpoint_attitude initialized
[mavros_node-1] [INFO] [1707933903.882920068] [mavros.mavros]: Plugin setpoint_position created
[mavros_node-1] [INFO] [1707933903.882951723] [mavros.mavros]: Plugin setpoint_position initialized
[mavros_node-1] [INFO] [1707933903.890337346] [mavros.mavros]: Plugin setpoint_raw created
[mavros_node-1] [INFO] [1707933903.890516115] [mavros.mavros]: Plugin setpoint_raw initialized
[mavros_node-1] [INFO] [1707933903.897095659] [mavros.mavros]: Plugin setpoint_trajectory created
[mavros_node-1] [INFO] [1707933903.897128225] [mavros.mavros]: Plugin setpoint_trajectory initialized
[mavros_node-1] [INFO] [1707933903.903057472] [mavros.mavros]: Plugin setpoint_velocity created
[mavros_node-1] [INFO] [1707933903.903089100] [mavros.mavros]: Plugin setpoint_velocity initialized
[mavros_node-1] [INFO] [1707933903.914013379] [mavros.mavros]: Plugin sys_status created
[mavros_node-1] [INFO] [1707933903.914392517] [mavros.mavros]: Plugin sys_status initialized
[mavros_node-1] [INFO] [1707933903.919521272] [mavros.time]: TM: Timesync mode: MAVLINK
[mavros_node-1] [INFO] [1707933903.922690153] [mavros.mavros]: Plugin sys_time created
[mavros_node-1] [INFO] [1707933903.922836102] [mavros.mavros]: Plugin sys_time initialized
[mavros_node-1] [INFO] [1707933903.928864287] [mavros.mavros]: Plugin tdr_radio created
[mavros_node-1] [INFO] [1707933903.929033677] [mavros.mavros]: Plugin tdr_radio initialized
[mavros_node-1] [INFO] [1707933903.934910990] [mavros.mavros]: Plugin terrain created
[mavros_node-1] [INFO] [1707933903.935041156] [mavros.mavros]: Plugin terrain initialized
[mavros_node-1] [INFO] [1707933903.942162585] [mavros.mavros]: Plugin trajectory created
[mavros_node-1] [INFO] [1707933903.942292825] [mavros.mavros]: Plugin trajectory initialized
[mavros_node-1] [INFO] [1707933903.949145447] [mavros.mavros]: Plugin tunnel created
[mavros_node-1] [INFO] [1707933903.949275528] [mavros.mavros]: Plugin tunnel initialized
[mavros_node-1] [INFO] [1707933903.955516479] [mavros.mavros]: Plugin vfr_hud created
[mavros_node-1] [INFO] [1707933903.955644181] [mavros.mavros]: Plugin vfr_hud initialized
[mavros_node-1] [INFO] [1707933903.962247534] [mavros.mavros]: Plugin vibration created
[mavros_node-1] [INFO] [1707933903.962409913] [mavros.mavros]: Plugin vibration initialized
[mavros_node-1] [INFO] [1707933903.970522399] [mavros.mavros]: Plugin vision_pose created
[mavros_node-1] [INFO] [1707933903.970557937] [mavros.mavros]: Plugin vision_pose initialized
[mavros_node-1] [INFO] [1707933903.978888759] [mavros.mavros]: Plugin vision_speed created
[mavros_node-1] [INFO] [1707933903.978926714] [mavros.mavros]: Plugin vision_speed initialized
[mavros_node-1] [INFO] [1707933903.988717782] [mavros.mavros]: Plugin waypoint created
[mavros_node-1] [INFO] [1707933903.988946085] [mavros.mavros]: Plugin waypoint initialized
[mavros_node-1] [INFO] [1707933904.000567011] [mavros.mavros]: Plugin wheel_odomotry created
[mavros_node-1] [INFO] [1707933904.000837508] [mavros.mavros]: Plugin wheel_odomotry initialized
[mavros_node-1] [INFO] [1707933904.009442794] [mavros.mavros]: Plugin wind_estimation created
[mavros_node-1] [INFO] [1707933904.009682496] [mavros.mavros]: Plugin wind_estimation initialized
[mavros_node-1] [INFO] [1707933904.010807810] [mavros.mavros]: Built-in SIMD instructions: SSE, SSE2
[mavros_node-1] [INFO] [1707933904.010825309] [mavros.mavros]: Built-in MAVLink package version: 2022.12.30
[mavros_node-1] [INFO] [1707933904.010831619] [mavros.mavros]: Known MAVLink dialects: common ardupilotmega ASLUAV AVSSUAS all cubepilot development icarous matrixpilot paparazzi standard storm32 uAvionix ualberta
[mavros_node-1] [INFO] [1707933904.010835917] [mavros.mavros]: MAVROS UAS via /uas1 started. MY ID 1.191, TARGET ID 1.1
[mavros_node-1] [INFO] [1707933904.393996997] [mavros.mavros]: CON: Got HEARTBEAT, connected. FCU: ArduPilot
[mavros_node-1] [INFO] [1707933904.394313099] [mavros.mission]: WP: detected enable_partial_push: 1
[mavros_node-1] [INFO] [1707933904.910330482] [mavros.mavros_router]: link[1001] detected remote address 1.191
[mavros_node-1] [WARN] [1707933905.910701735] [mavros.cmd]: CMD: Unexpected command 520, result 0
[mavros_node-1] [INFO] [1707933905.911363797] [mavros.geofence]: GF: Using MISSION_ITEM_INT
[mavros_node-1] [INFO] [1707933905.911538923] [mavros.rallypoint]: RP: Using MISSION_ITEM_INT
[mavros_node-1] [INFO] [1707933905.911568953] [mavros.mission]: WP: Using MISSION_ITEM_INT
[mavros_node-1] [INFO] [1707933905.911607701] [mavros.sys]: VER: 1.1: Capabilities         0x000000000000fbef
[mavros_node-1] [INFO] [1707933905.911630978] [mavros.sys]: VER: 1.1: Flight software:     040404ff (5d7fb310)
[mavros_node-1] [INFO] [1707933905.911642713] [mavros.sys]: VER: 1.1: Middleware software: 00000000 (        )
[mavros_node-1] [INFO] [1707933905.911689967] [mavros.sys]: VER: 1.1: OS software:         00000000 (        )
[mavros_node-1] [INFO] [1707933905.911702787] [mavros.sys]: VER: 1.1: Board hardware:      00000000
[mavros_node-1] [INFO] [1707933905.911721576] [mavros.sys]: VER: 1.1: VID/PID:             0000:0000
[mavros_node-1] [INFO] [1707933905.911730888] [mavros.sys]: VER: 1.1: UID:                 0000000000000000
[mavros_node-1] [INFO] [1707933910.705101518] [mavros.imu]: IMU: Raw IMU message used.
[mavros_node-1] [INFO] [1707933910.957335539] [mavros.rc]: RC_CHANNELS message detected!
[mavros_node-1] [INFO] [1707933913.989391482] [mavros.sys]: FCU: EKF3 IMU1 origin set
[mavros_node-1] [INFO] [1707933913.989822825] [mavros.sys]: FCU: EKF3 IMU0 origin set
[mavros_node-1] [INFO] [1707933914.041155927] [mavros.sys]: FCU: Field Elevation Set: 584m
[mavros_node-1] [INFO] [1707933914.401244833] [mavros.sys]: FCU: ArduCopter V4.4.4 (5d7fb310)
[mavros_node-1] [INFO] [1707933914.401826175] [mavros.sys]: FCU: e31b46e56bcd4999acf04729cf7c7a12
[mavros_node-1] [INFO] [1707933914.402372956] [mavros.sys]: FCU: Frame: QUAD/PLUS
[mavros_node-1] [INFO] [1707933919.404201860] [mavros.mission]: WP: mission received
[mavros_node-1] [INFO] [1707933924.401243696] [mavros.rallypoint]: RP: mission received
[mavros_node-1] [INFO] [1707933929.404235200] [mavros.geofence]: GF: mission received
[mavros_node-1] [INFO] [1707933936.788577508] [mavros.sys]: FCU: EKF3 IMU1 is using GPS
[mavros_node-1] [INFO] [1707933936.799617279] [mavros.sys]: FCU: EKF3 IMU0 is using GPS
[mavros_node-1] [WARN] [1707933940.817061140] [mavros.param]: PR: Param STAT_RUNTIME (65535/1339): 3624 different index: 1056/1339
[mavros_node-1] [INFO] [1707933947.913245950] [mavros.param]: PR: parameters list received
[mavros_node-1] [WARN] [1707933999.741639068] [mavros.cmd]: CMD: Unexpected command 176, result 0
[mavros_node-1] [INFO] [1707934001.118261468] [mavros.sys]: FCU: Arming motors
[mavros_node-1] [INFO] [1707934006.702258283] [mavros.sys]: FCU: EKF3 IMU1 MAG0 in-flight yaw alignment complete
[mavros_node-1] [INFO] [1707934006.707407427] [mavros.sys]: FCU: EKF3 IMU0 MAG0 in-flight yaw alignment complete
[mavros_node-1] [WARN] [1707934017.190007248] [mavros.cmd]: CMD: Unexpected command 113, result 3
[mavros_node-1] [WARN] [1707934027.194112615] [mavros.cmd]: CMD: Unexpected command 113, result 3

Diagnostics

---
header:
  stamp:
    sec: 1707936516
    nanosec: 670130231
  frame_id: ''
status:
- level: "\0"
  name: 'mavros: MAVROS UAS'
  message: connected
  hardware_id: uas:///uas1
  values: []
- level: "\0"
  name: 'mavros: GPS'
  message: 3D fix
  hardware_id: uas:///uas1
  values:
  - key: Satellites visible
    value: '10'
  - key: Fix type
    value: '6'
  - key: EPH (m)
    value: '1.21'
  - key: EPV (m)
    value: '2.00'
- level: "\x01"
  name: 'mavros: Mount'
  message: Can not diagnose in this targeting mode
  hardware_id: uas:///uas1
  values:
  - key: Mode
    value: '255'
- level: "\0"
  name: 'mavros: System'
  message: Normal
  hardware_id: uas:///uas1
  values:
  - key: Sensor present
    value: '0x5771FC2F'
  - key: Sensor enabled
    value: '0x5361FC2F'
  - key: Sensor health
    value: '0x5771FC2F'
  - key: 3D gyro
    value: Ok
  - key: 3D accelerometer
    value: Ok
  - key: 3D magnetometer
    value: Ok
  - key: absolute pressure
    value: Ok
  - key: GPS
    value: Ok
  - key: 3D angular rate control
    value: Ok
  - key: attitude stabilization
    value: Ok
  - key: yaw position
    value: Ok
  - key: z/altitude control
    value: Ok
  - key: x/y position control
    value: Ok
  - key: motor outputs / control
    value: Ok
  - key: rc receiver
    value: Ok
  - key: AHRS subsystem health
    value: Ok
  - key: Terrain subsystem health
    value: Ok
  - key: Logging
    value: Ok
  - key: Battery
    value: Ok
  - key: pre-arm check status. Always healthy when armed
    value: Ok
  - key: propulsion (actuator, esc, motor or propellor)
    value: Ok
  - key: CPU Load (%)
    value: '0.0'
  - key: Drop rate (%)
    value: '0.0'
  - key: Errors comm
    value: '0'
  - key: 'Errors count #1'
    value: '0'
  - key: 'Errors count #2'
    value: '0'
  - key: 'Errors count #3'
    value: '0'
  - key: 'Errors count #4'
    value: '0'
- level: "\0"
  name: 'mavros: Battery'
  message: Normal
  hardware_id: uas:///uas1
  values:
  - key: Voltage
    value: '12.59'
  - key: Current
    value: '-28.1'
  - key: Remaining
    value: '0.0'
- level: "\0"
  name: 'mavros: Heartbeat'
  message: Normal
  hardware_id: uas:///uas1
  values:
  - key: Heartbeats since startup
    value: '2691'
  - key: Frequency (Hz)
    value: '0.999989'
  - key: Vehicle type
    value: Quadrotor
  - key: Autopilot type
    value: ArduPilot
  - key: Mode
    value: GUIDED
  - key: System status
    value: ACTIVE

Check ID

Result of running ros2 run mavros mav checkid after sourcing ros2 setup with mavros connected to sitl.

Traceback (most recent call last):
  File "/home/equinox/ros2_ws/install/mavros/lib/python3.8/site-packages/mavros/cmd/__init__.py", line 34, in __getattr__
    return object.__getattribute__(self, key)
AttributeError: 'CliClient' object has no attribute 'uas_settings'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/equinox/ros2_ws/install/mavros/lib/mavros/mav", line 14, in <module>
    cli()
  File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/equinox/ros2_ws/install/mavros/lib/python3.8/site-packages/mavros/cmd/checkid.py", line 129, in checkid
    checker = Checker(client=client, follow=follow, watch_time=watch_time)
  File "/home/equinox/ros2_ws/install/mavros/lib/python3.8/site-packages/mavros/cmd/checkid.py", line 44, in __init__
    self.tgt_ids = client.uas_settings.target_ids
  File "/home/equinox/ros2_ws/install/mavros/lib/python3.8/site-packages/mavros/cmd/__init__.py", line 36, in __getattr__
    return getattr(self.cli, key)
  File "/usr/lib/python3.8/functools.py", line 967, in __get__
    val = self.func(instance)
  File "/home/equinox/ros2_ws/install/mavros/lib/python3.8/site-packages/mavros/base.py", line 116, in uas_settings
    pd = call_get_parameters(node=self, node_name=self.mavros_ns, names=names)
  File "/home/equinox/ros2_ws/install/mavros/lib/python3.8/site-packages/mavros/utils.py", line 75, in call_get_parameters
    wait_for_service(client, lg)
  File "/home/equinox/ros2_ws/install/mavros/lib/python3.8/site-packages/mavros/base.py", line 55, in wait_for_service
    raise ServiceWaitTimeout(topic)
mavros.base.ServiceWaitTimeout: mavros/get_parameters```

Topic list while mavros running:
/diagnostics
/mavros/actuator_control
/mavros/adsb/send
/mavros/adsb/vehicle
/mavros/altitude
/mavros/battery
/mavros/cam_imu_sync/cam_imu_stamp
/mavros/camera/image_captured
/mavros/cellular_status/status
/mavros/companion_process/status
/mavros/debug_value/debug
/mavros/debug_value/debug_float_array
/mavros/debug_value/debug_vector
/mavros/debug_value/named_value_float
/mavros/debug_value/named_value_int
/mavros/debug_value/send
/mavros/esc_status/info
/mavros/esc_status/status
/mavros/esc_telemetry/telemetry
/mavros/estimator_status
/mavros/extended_state
/mavros/fake_gps/mocap/tf
/mavros/geofence/fences
/mavros/global_position/compass_hdg
/mavros/global_position/global
/mavros/global_position/gp_lp_offset
/mavros/global_position/gp_origin
/mavros/global_position/local
/mavros/global_position/raw/fix
/mavros/global_position/raw/gps_vel
/mavros/global_position/raw/satellites
/mavros/global_position/rel_alt
/mavros/global_position/set_gp_origin
/mavros/gps_input/gps_input
/mavros/gps_rtk/rtk_baseline
/mavros/gps_rtk/send_rtcm
/mavros/gpsstatus/gps1/raw
/mavros/gpsstatus/gps1/rtk
/mavros/gpsstatus/gps2/raw
/mavros/gpsstatus/gps2/rtk
/mavros/hil/actuator_controls
/mavros/hil/controls
/mavros/hil/gps
/mavros/hil/imu_ned
/mavros/hil/optical_flow
/mavros/hil/rc_inputs
/mavros/hil/state
/mavros/home_position/home
/mavros/home_position/set
/mavros/imu/data
/mavros/imu/data_raw
/mavros/imu/diff_pressure
/mavros/imu/mag
/mavros/imu/static_pressure
/mavros/imu/temperature_baro
/mavros/imu/temperature_imu
/mavros/landing_target/lt_marker
/mavros/landing_target/pose
/mavros/landing_target/pose_in
/mavros/local_position/accel
/mavros/local_position/odom
/mavros/local_position/pose
/mavros/local_position/pose_cov
/mavros/local_position/velocity_body
/mavros/local_position/velocity_body_cov
/mavros/local_position/velocity_local
/mavros/log_transfer/raw/log_data
/mavros/log_transfer/raw/log_entry
/mavros/mag_calibration/report
/mavros/mag_calibration/status
/mavros/manual_control/control
/mavros/manual_control/send
/mavros/mission/reached
/mavros/mission/waypoints
/mavros/mocap/pose
/mavros/mocap/tf
/mavros/mount_control/command
/mavros/mount_control/orientation
/mavros/mount_control/status
/mavros/nav_controller_output/output
/mavros/obstacle/send
/mavros/odometry/in
/mavros/odometry/out
/mavros/onboard_computer/status
/mavros/optical_flow/ground_distance
/mavros/optical_flow/raw/optical_flow
/mavros/optical_flow/raw/send
/mavros/param/event
/mavros/play_tune
/mavros/px4flow/ground_distance
/mavros/px4flow/raw/optical_flow_rad
/mavros/px4flow/raw/send
/mavros/px4flow/temperature
/mavros/radio_status
/mavros/rallypoint/rallypoints
/mavros/rangefinder/rangefinder
/mavros/rc/in
/mavros/rc/out
/mavros/rc/override
/mavros/setpoint_accel/accel
/mavros/setpoint_attitude/cmd_vel
/mavros/setpoint_attitude/thrust
/mavros/setpoint_position/global
/mavros/setpoint_position/global_to_local
/mavros/setpoint_position/local
/mavros/setpoint_raw/attitude
/mavros/setpoint_raw/global
/mavros/setpoint_raw/local
/mavros/setpoint_raw/target_attitude
/mavros/setpoint_raw/target_global
/mavros/setpoint_raw/target_local
/mavros/setpoint_trajectory/desired
/mavros/setpoint_trajectory/local
/mavros/setpoint_velocity/cmd_vel
/mavros/setpoint_velocity/cmd_vel_unstamped
/mavros/state
/mavros/statustext/recv
/mavros/statustext/send
/mavros/target_actuator_control
/mavros/terrain/report
/mavros/time_reference
/mavros/timesync_status
/mavros/trajectory/desired
/mavros/trajectory/generated
/mavros/trajectory/path
/mavros/tunnel/in
/mavros/tunnel/out
/mavros/vfr_hud
/mavros/vibration/raw/vibration
/mavros/vision_pose/pose
/mavros/vision_pose/pose_cov
/mavros/vision_speed/speed_twist
/mavros/vision_speed/speed_twist_cov
/mavros/vision_speed/speed_vector
/mavros/wheel_odometry/odom
/mavros/wind_estimation
/move_base_simple/goal
/parameter_events
/rosout
/tf
/tf_static
/uas1/mavlink_sink
/uas1/mavlink_source```
@vooon
Copy link
Member

vooon commented Feb 15, 2024

I'm unsure how you got unsupported, since command int do not expect to get COMMAND_ACK after COMMAND_INT:

/* Note: seems that COMMAND_INT don't produce COMMAND_ACK
* so wait is not needed.
*/
command_int(
broadcast,
frame, command, current, autocontinue,
param1, param2,
param3, param4,
x, y, z);
success = true;

Bthw: ros2 run mavros mav checkid

@nraines2002
Copy link
Author

nraines2002 commented Feb 15, 2024

I'm unsure how you got unsupported, since command int do not expect to get COMMAND_ACK after COMMAND_INT:

/* Note: seems that COMMAND_INT don't produce COMMAND_ACK
* so wait is not needed.
*/
command_int(
broadcast,
frame, command, current, autocontinue,
param1, param2,
param3, param4,
x, y, z);
success = true;

Bthw: ros2 run mavros mav checkid

The COMMAND_ACK I see is from the specific commands that I'm sending using COMMAND_INT in the mavproxy window. So when I send a CONDITION_CHANGE_ALT command using command int i see "Got COMMAND_ACK:CONDITION_CHANGE_ALT:UNSUPPORTED" from the autopilot

image

@vooon
Copy link
Member

vooon commented Feb 15, 2024

Ah, i see. MAVProxy catches COMMAND_ACK and prints it on that console.
The same message captured by mavros: CMD: Unexpected command 113, result 3 (unexpected because as i said, mavros do not wait and do not expect to get ACK).

But that's simply on a firmware side. Have you tried to send that command via mavproxy?

@vooon
Copy link
Member

vooon commented Feb 15, 2024

@nraines2002
Copy link
Author

I've found the issue, only very specific commands can be sent using COMMAND_INT. I will close the issue and update it to help any future lost souls.

Thanks for your help @vooon.

@nraines2002 nraines2002 changed the title Command_Int:UNSUPPORTED Command sent using COMMAND_INT receives "COMMAND_ACK:UNSUPPORTED" Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants