mavlink / mavros

MAVLink to ROS gateway with proxy for Ground Control Station
Other
889 stars 992 forks source link

PX4-SITL offboard mode does not set #1782

Closed O2KAN closed 2 years ago

O2KAN commented 2 years ago

I can not use iris drone in PX4 SITL on offboard mode. I have a code written with python using mavros to control iris drone in offboard mode. But when I set, command the mode to offboard drone does not takeoff or do what I want it to do. I also run exact same code with mavsdk, It works.

MAVROS version and platform Mavros: I don't know how to look ROS: ?Noetic? Ubuntu: ?20.04?

Autopilot type and version [ ] ArduPilot [ * ] PX4

Version:

Node logs roslaunch uav_mavros_sitl.launch ... logging to /home/ozkan/.ros/log/0e6952ee-2ed9-11ed-9296-45e5a2a5d154/roslaunch-ozkan-648552.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

xacro: in-order processing became default in ROS Melodic. You can drop the option. started roslaunch server http://ozkan:36277/

SUMMARY CLEAR PARAMETERS

/uav0/mavros/ PARAMETERS

/gazebo/enable_ros_network: True /rosdistro: noetic /rosversion: 1.15.14 /uav0/mavros/cmd/use_comp_id_system_control: False /uav0/mavros/conn/heartbeat_rate: 1.0 /uav0/mavros/conn/system_time_rate: 1.0 /uav0/mavros/conn/timeout: 10.0 /uav0/mavros/conn/timesync_rate: 10.0 /uav0/mavros/distance_sensor/hrlv_ez4_pub/field_of_view: 0.0 /uav0/mavros/distance_sensor/hrlv_ez4_pub/frame_id: hrlv_ez4_sonar /uav0/mavros/distance_sensor/hrlv_ez4_pub/id: 0 /uav0/mavros/distance_sensor/hrlv_ez4_pub/orientation: PITCH_270 /uav0/mavros/distance_sensor/hrlv_ez4_pub/send_tf: True /uav0/mavros/distance_sensor/hrlv_ez4_pub/sensor_position/x: 0.0 /uav0/mavros/distance_sensor/hrlv_ez4_pub/sensor_position/y: 0.0 /uav0/mavros/distance_sensor/hrlv_ez4_pub/sensor_position/z: -0.1 /uav0/mavros/distance_sensor/laser_1_sub/id: 3 /uav0/mavros/distance_sensor/laser_1_sub/orientation: PITCH_270 /uav0/mavros/distance_sensor/laser_1_sub/subscriber: True /uav0/mavros/distance_sensor/lidarlite_pub/field_of_view: 0.0 /uav0/mavros/distance_sensor/lidarlite_pub/frame_id: lidarlite_laser /uav0/mavros/distance_sensor/lidarlite_pub/id: 1 /uav0/mavros/distance_sensor/lidarlite_pub/orientation: PITCH_270 /uav0/mavros/distance_sensor/lidarlite_pub/send_tf: True /uav0/mavros/distance_sensor/lidarlite_pub/sensor_position/x: 0.0 /uav0/mavros/distance_sensor/lidarlite_pub/sensor_position/y: 0.0 /uav0/mavros/distance_sensor/lidarlite_pub/sensor_position/z: -0.1 /uav0/mavros/distance_sensor/sonar_1_sub/id: 2 /uav0/mavros/distance_sensor/sonar_1_sub/orientation: PITCH_270 /uav0/mavros/distance_sensor/sonar_1_sub/subscriber: True /uav0/mavros/fake_gps/eph: 2.0 /uav0/mavros/fake_gps/epv: 2.0 /uav0/mavros/fake_gps/fix_type: 3 /uav0/mavros/fake_gps/geo_origin/alt: 408.0 /uav0/mavros/fake_gps/geo_origin/lat: 47.3667 /uav0/mavros/fake_gps/geo_origin/lon: 8.55 /uav0/mavros/fake_gps/gps_rate: 5.0 /uav0/mavros/fake_gps/mocap_transform: True /uav0/mavros/fake_gps/satellites_visible: 5 /uav0/mavros/fake_gps/tf/child_frame_id: fix /uav0/mavros/fake_gps/tf/frame_id: map /uav0/mavros/fake_gps/tf/listen: False /uav0/mavros/fake_gps/tf/rate_limit: 10.0 /uav0/mavros/fake_gps/tf/send: False /uav0/mavros/fake_gps/use_mocap: True /uav0/mavros/fake_gps/use_vision: False /uav0/mavros/fcu_protocol: v2.0 /uav0/mavros/fcu_url: udp://:14540@loca... /uav0/mavros/gcs_url: /uav0/mavros/global_position/child_frame_id: base_link /uav0/mavros/global_position/frame_id: map /uav0/mavros/global_position/gps_uere: 1.0 /uav0/mavros/global_position/rot_covariance: 99999.0 /uav0/mavros/global_position/tf/child_frame_id: base_link /uav0/mavros/global_position/tf/frame_id: map /uav0/mavros/global_position/tf/global_frame_id: earth /uav0/mavros/global_position/tf/send: False /uav0/mavros/global_position/use_relative_alt: True /uav0/mavros/image/frame_id: px4flow /uav0/mavros/imu/angular_velocity_stdev: 0.0003490659 // 0... /uav0/mavros/imu/frame_id: base_link /uav0/mavros/imu/linear_acceleration_stdev: 0.0003 /uav0/mavros/imu/magnetic_stdev: 0.0 /uav0/mavros/imu/orientation_stdev: 1.0 /uav0/mavros/landing_target/camera/fov_x: 2.0071286398 /uav0/mavros/landing_target/camera/fov_y: 2.0071286398 /uav0/mavros/landing_target/image/height: 480 /uav0/mavros/landing_target/image/width: 640 /uav0/mavros/landing_target/land_target_type: VISION_FIDUCIAL /uav0/mavros/landing_target/listen_lt: False /uav0/mavros/landing_target/mav_frame: LOCAL_NED /uav0/mavros/landing_target/target_size/x: 0.3 /uav0/mavros/landing_target/target_size/y: 0.3 /uav0/mavros/landing_target/tf/child_frame_id: camera_center /uav0/mavros/landing_target/tf/frame_id: landing_target /uav0/mavros/landing_target/tf/listen: False /uav0/mavros/landing_target/tf/rate_limit: 10.0 /uav0/mavros/landing_target/tf/send: True /uav0/mavros/local_position/frame_id: map /uav0/mavros/local_position/tf/child_frame_id: base_link /uav0/mavros/local_position/tf/frame_id: map /uav0/mavros/local_position/tf/send: False /uav0/mavros/local_position/tf/send_fcu: False /uav0/mavros/mission/pull_after_gcs: True /uav0/mavros/mocap/use_pose: True /uav0/mavros/mocap/use_tf: False /uav0/mavros/odometry/fcu/odom_child_id_des: base_link /uav0/mavros/odometry/fcu/odom_parent_id_des: map /uav0/mavros/plugin_blacklist: ['safety_area', '... /uav0/mavros/plugin_whitelist: [] /uav0/mavros/px4flow/frame_id: px4flow /uav0/mavros/px4flow/ranger_fov: 0.118682 /uav0/mavros/px4flow/ranger_max_range: 5.0 /uav0/mavros/px4flow/ranger_min_range: 0.3 /uav0/mavros/safety_area/p1/x: 1.0 /uav0/mavros/safety_area/p1/y: 1.0 /uav0/mavros/safety_area/p1/z: 1.0 /uav0/mavros/safety_area/p2/x: -1.0 /uav0/mavros/safety_area/p2/y: -1.0 /uav0/mavros/safety_area/p2/z: -1.0 /uav0/mavros/setpoint_accel/send_force: False /uav0/mavros/setpoint_attitude/reverse_thrust: False /uav0/mavros/setpoint_attitude/tf/child_frame_id: target_attitude /uav0/mavros/setpoint_attitude/tf/frame_id: map /uav0/mavros/setpoint_attitude/tf/listen: False /uav0/mavros/setpoint_attitude/tf/rate_limit: 50.0 /uav0/mavros/setpoint_attitude/use_quaternion: False /uav0/mavros/setpoint_position/mav_frame: LOCAL_NED /uav0/mavros/setpoint_position/tf/child_frame_id: target_position /uav0/mavros/setpoint_position/tf/frame_id: map /uav0/mavros/setpoint_position/tf/listen: False /uav0/mavros/setpoint_position/tf/rate_limit: 50.0 /uav0/mavros/setpoint_raw/thrust_scaling: 1.0 /uav0/mavros/setpoint_velocity/mav_frame: LOCAL_NED /uav0/mavros/startup_px4_usb_quirk: True /uav0/mavros/sys/disable_diag: False /uav0/mavros/sys/min_voltage: 10.0 /uav0/mavros/target_component_id: 1 /uav0/mavros/target_system_id: 1 /uav0/mavros/tdr_radio/low_rssi: 40 /uav0/mavros/time/time_ref_source: fcu /uav0/mavros/time/timesync_avg_alpha: 0.6 /uav0/mavros/time/timesync_mode: MAVLINK /uav0/mavros/vibration/frame_id: base_link /uav0/mavros/vision_pose/tf/child_frame_id: vision_estimate /uav0/mavros/vision_pose/tf/frame_id: odom /uav0/mavros/vision_pose/tf/listen: False /uav0/mavros/vision_pose/tf/rate_limit: 10.0 /uav0/mavros/vision_speed/listen_twist: True /uav0/mavros/vision_speed/twist_cov: True /uav0/mavros/wheel_odometry/child_frame_id: base_link /uav0/mavros/wheel_odometry/count: 2 /uav0/mavros/wheel_odometry/frame_id: odom /uav0/mavros/wheel_odometry/send_raw: True /uav0/mavros/wheel_odometry/send_twist: False /uav0/mavros/wheel_odometry/tf/child_frame_id: base_link /uav0/mavros/wheel_odometry/tf/frame_id: odom /uav0/mavros/wheel_odometry/tf/send: False /uav0/mavros/wheel_odometry/use_rpm: False /uav0/mavros/wheel_odometry/vel_error: 0.1 /uav0/mavros/wheel_odometry/wheel0/radius: 0.05 /uav0/mavros/wheel_odometry/wheel0/x: 0.0 /uav0/mavros/wheel_odometry/wheel0/y: -0.15 /uav0/mavros/wheel_odometry/wheel1/radius: 0.05 /uav0/mavros/wheel_odometry/wheel1/x: 0.0 /uav0/mavros/wheel_odometry/wheel1/y: 0.15 /uav0/rotors_description: <?xml version="1.... /use_sim_time: True NODES / gazebo (gazebo_ros/gzserver) gazebo_gui (gazebo_ros/gzclient) /uav0/ iris_0_spawn (gazebo_ros/spawn_model) mavros (mavros/mavros_node) sitl_0 (px4/px4)

auto-starting new master process[master]: started with pid [648584] ROS_MASTER_URI=http://localhost:11311/

setting /run_id to 0e6952ee-2ed9-11ed-9296-45e5a2a5d154 process[rosout-1]: started with pid [648608] started core service [/rosout] process[gazebo-2]: started with pid [648616] process[gazebo_gui-3]: started with pid [648622] process[uav0/sitl_0-4]: started with pid [648632] INFO [px4] Creating symlink /home/ozkan/mrs_workspace/src/simulation/ros_packages/px4_firmware/ROMFS/px4fmu_common -> /home/ozkan/.ros/sitl_iris_0/etc

| _ \ \ \ / / / | | |/ / \ V / / /| | | _/ / \ / /| | | | / /^\ \ | | / / |/

px4 starting.

INFO [px4] Calling startup script: /bin/sh etc/init.d-posix/rcS 0 process[uav0/iris_0_spawn-5]: started with pid [648649] INFO [param] selected parameter default file eeprom/parameters_10016 [param] Loaded: eeprom/parameters_10016 process[uav0/mavros-6]: started with pid [648656] INFO [dataman] Unknown restart, data manager file './dataman' size is 11798680 bytes INFO [simulator] Waiting for simulator to accept connection on TCP port 4560 [ INFO] [1662574531.474329957]: FCU URL: udp://:14540@localhost:14580 [ INFO] [1662574531.478675035]: udp0: Bind address: 0.0.0.0:14540 [ INFO] [1662574531.478857966]: udp0: Remote address: 127.0.0.1:14580 [ INFO] [1662574531.479015393]: GCS bridge disabled [ERROR] [1662574531.485279381]: Plugin 3dr_radio load exception: MultiLibraryClassLoader: Could not create object of class type mavros::std_plugins::TDRRadioPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ INFO] [1662574531.485454156]: Plugin actuator_control loaded [ INFO] [1662574531.488276736]: Plugin actuator_control initialized [ INFO] [1662574531.489394180]: Plugin adsb loaded [ INFO] [1662574531.491668651]: Plugin adsb initialized [ INFO] [1662574531.491741071]: Plugin altitude loaded [ INFO] [1662574531.492471788]: Plugin altitude initialized [ERROR] [1662574531.492664046]: Plugin cam_imu_sync load exception: MultiLibraryClassLoader: Could not create object of class type mavros::extra_plugins::CamIMUSyncPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ INFO] [1662574531.492730351]: Plugin command loaded [ INFO] [1662574531.497098770]: Plugin command initialized [ERROR] [1662574531.497273495]: Plugin companion_process_status load exception: MultiLibraryClassLoader: Could not create object of class type mavros::extra_plugins::CompanionProcessStatusPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ INFO] [1662574531.497334894]: Plugin debug_value loaded [ INFO] [1662574531.500861356]: Plugin debug_value initialized [ INFO] [1662574531.500910138]: Plugin distance_sensor blacklisted [ERROR] [1662574531.501093543]: Plugin fake_gps load exception: MultiLibraryClassLoader: Could not create object of class type mavros::extra_plugins::FakeGPSPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ERROR] [1662574531.501240233]: Plugin ftp load exception: MultiLibraryClassLoader: Could not create object of class type mavros::std_plugins::FTPPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ INFO] [1662574531.501307969]: Plugin global_position loaded [ INFO] [1662574531.510877099]: Plugin global_position initialized [ERROR] [1662574531.511085627]: Plugin gps_rtk load exception: MultiLibraryClassLoader: Could not create object of class type mavros::extra_plugins::GpsRtkPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ERROR] [1662574531.511213270]: Plugin hil load exception: MultiLibraryClassLoader: Could not create object of class type mavros::std_plugins::HilPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ INFO] [1662574531.511265351]: Plugin home_position loaded [ INFO] [1662574531.513241440]: Plugin home_position initialized [ INFO] [1662574531.513302436]: Plugin imu loaded [ INFO] [1662574531.517298422]: Plugin imu initialized [ERROR] [1662574531.517491381]: Plugin landing_target load exception: MultiLibraryClassLoader: Could not create object of class type mavros::extra_plugins::LandingTargetPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ INFO] [1662574531.517548176]: Plugin local_position loaded [ INFO] [1662574531.521278857]: Plugin local_position initialized [ERROR] [1662574531.521485367]: Plugin log_transfer load exception: MultiLibraryClassLoader: Could not create object of class type mavros::extra_plugins::LogTransferPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ERROR] [1662574531.521619623]: Plugin manual_control load exception: MultiLibraryClassLoader: Could not create object of class type mavros::std_plugins::ManualControlPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ERROR] [1662574531.521751333]: Plugin mocap_pose_estimate load exception: MultiLibraryClassLoader: Could not create object of class type mavros::extra_plugins::MocapPoseEstimatePlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ERROR] [1662574531.521878073]: Plugin mount_control load exception: MultiLibraryClassLoader: Could not create object of class type mavros::extra_plugins::MountControlPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ERROR] [1662574531.522000463]: Plugin obstacle_distance load exception: MultiLibraryClassLoader: Could not create object of class type mavros::extra_plugins::ObstacleDistancePlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ INFO] [1662574531.522052503]: Plugin odom loaded [ INFO] [1662574531.524579298]: Plugin odom initialized [ERROR] [1662574531.524733367]: Plugin onboard_computer_status load exception: MultiLibraryClassLoader: Could not create object of class type mavros::extra_plugins::OnboardComputerStatusPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ INFO] [1662574531.524780812]: Plugin param loaded [ INFO] [1662574531.526282461]: Plugin param initialized [ERROR] [1662574531.526389327]: Plugin px4flow load exception: MultiLibraryClassLoader: Could not create object of class type mavros::extra_plugins::PX4FlowPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ INFO] [1662574531.526411926]: Plugin rangefinder blacklisted [ INFO] [1662574531.526446828]: Plugin rc_io loaded [ INFO] [1662574531.528355776]: Plugin rc_io initialized [ INFO] [1662574531.528377597]: Plugin safety_area blacklisted [ERROR] [1662574531.528491732]: Plugin setpoint_accel load exception: MultiLibraryClassLoader: Could not create object of class type mavros::std_plugins::SetpointAccelerationPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ERROR] [1662574531.528581496]: Plugin setpoint_attitude load exception: MultiLibraryClassLoader: Could not create object of class type mavros::std_plugins::SetpointAttitudePlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ERROR] [1662574531.528666191]: Plugin setpoint_position load exception: MultiLibraryClassLoader: Could not create object of class type mavros::std_plugins::SetpointPositionPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ INFO] [1662574531.528703899]: Plugin setpoint_raw loaded [ INFO] [1662574531.533414951]: Plugin setpoint_raw initialized [ERROR] [1662574531.533591937]: Plugin setpoint_trajectory load exception: MultiLibraryClassLoader: Could not create object of class type mavros::std_plugins::SetpointTrajectoryPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ERROR] [1662574531.533711233]: Plugin setpoint_velocity load exception: MultiLibraryClassLoader: Could not create object of class type mavros::std_plugins::SetpointVelocityPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ INFO] [1662574531.533791444]: Plugin sys_status loaded [ INFO] [1662574531.539410831]: Plugin sys_status initialized [ INFO] [1662574531.539473996]: Plugin sys_time loaded [ INFO] [1662574531.542302170]: TM: Timesync mode: MAVLINK [ INFO] [1662574531.542969753]: Plugin sys_time initialized [ERROR] [1662574531.543108963]: Plugin trajectory load exception: MultiLibraryClassLoader: Could not create object of class type mavros::extra_plugins::TrajectoryPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ERROR] [1662574531.543205748]: Plugin vfr_hud load exception: MultiLibraryClassLoader: Could not create object of class type mavros::std_plugins::VfrHudPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ INFO] [1662574531.543228869]: Plugin vibration blacklisted [ERROR] [1662574531.543313656]: Plugin vision_pose_estimate load exception: MultiLibraryClassLoader: Could not create object of class type mavros::extra_plugins::VisionPoseEstimatePlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ERROR] [1662574531.543399628]: Plugin vision_speed_estimate load exception: MultiLibraryClassLoader: Could not create object of class type mavros::extra_plugins::VisionSpeedEstimatePlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ERROR] [1662574531.543484437]: Plugin waypoint load exception: MultiLibraryClassLoader: Could not create object of class type mavros::std_plugins::WaypointPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ INFO] [1662574531.543503324]: Plugin wheel_odometry blacklisted [ERROR] [1662574531.543585039]: Plugin wind_estimation load exception: MultiLibraryClassLoader: Could not create object of class type mavros::std_plugins::WindEstimationPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary() [ INFO] [1662574531.543610979]: Autostarting mavlink via USB on PX4 [ INFO] [1662574531.543637419]: Built-in SIMD instructions: SSE, SSE2 [ INFO] [1662574531.543654926]: Built-in MAVLink package version: 2020.6.6 [ INFO] [1662574531.543675666]: Known MAVLink dialects: common ardupilotmega ASLUAV autoquad icarous matrixpilot paparazzi slugs standard uAvionix ualberta [ INFO] [1662574531.543693030]: MAVROS started. MY ID 1.240, TARGET ID 1.1 [INFO] [1662574531.767340, 0.000000]: Loading model XML from ros parameter rotors_description [INFO] [1662574531.772235, 0.000000]: Waiting for service /gazebo/spawn_urdf_model [ INFO] [1662574531.832574326]: Finished loading Gazebo ROS API Plugin. [ INFO] [1662574531.833588729]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting... [ INFO] [1662574531.922660128]: Finished loading Gazebo ROS API Plugin. [ INFO] [1662574531.923616745]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting... [ INFO] [1662574532.225496988]: waitForService: Service [/gazebo/set_physics_properties] is now available. [ INFO] [1662574532.248129508]: Physics dynamic reconfigure ready. [INFO] [1662574532.378482, 0.000000]: Calling service /gazebo/spawn_urdf_model [INFO] [1662574547.210889, 0.004000]: Spawn status: SpawnModel: Successfully spawned entity INFO [simulator] Simulator connected on TCP port 4560. INFO [commander] LED: open /dev/led0 failed (22) INFO [init] Mixer: etc/mixers/quad_w.main.mix on /dev/pwm_output0 INFO [mavlink] mode: Normal, data rate: 4000000 B/s on udp port 18570 remote port 14550 INFO [mavlink] mode: Onboard, data rate: 4000000 B/s on udp port 14580 remote port 14540 INFO [mavlink] mode: Onboard, data rate: 4000 B/s on udp port 14280 remote port 14030 INFO [logger] logger started (mode=all) INFO [logger] Start file log (type: full) INFO [logger] [logger] ./log/2022-09-07/18_15_47.ulg INFO [logger] Opened full log file: ./log/2022-09-07/18_15_47.ulg INFO [mavlink] MAVLink only on localhost (set param MAV_BROADCAST = 1 to enable network) [ INFO] [1662574547.428968543, 0.168000000]: udp0: Remote address: 127.0.0.1:14580 [ INFO] [1662574547.429157315, 0.168000000]: IMU: High resolution IMU detected! INFO [px4] Startup script returned successfully INFO [mavlink] partner IP: 127.0.0.1 [uav0/iris_0_spawn-5] process has finished cleanly log file: /home/ozkan/.ros/log/0e6952ee-2ed9-11ed-9296-45e5a2a5d154/uav0-iris_0_spawn-5*.log [ INFO] [1662574548.413055906, 1.148000000]: CON: Got HEARTBEAT, connected. FCU: PX4 Autopilot [ INFO] [1662574548.413167749, 1.148000000]: IMU: High resolution IMU detected! INFO [ecl/EKF] 992000: GPS checks passed [ INFO] [1662574549.421460015, 2.156000000]: VER: 1.1: Capabilities 0x000000000000e4ef [ INFO] [1662574549.421498569, 2.156000000]: VER: 1.1: Flight software: 010b02ff (1ee88accfe000000) [ INFO] [1662574549.421515376, 2.156000000]: VER: 1.1: Middleware software: 010b02ff (1ee88accfe000000) [ INFO] [1662574549.421536669, 2.156000000]: VER: 1.1: OS software: 050f00ff (ec20f2e6c5cc35b2) [ INFO] [1662574549.421557141, 2.156000000]: VER: 1.1: Board hardware: 00000001 [ INFO] [1662574549.421577720, 2.156000000]: VER: 1.1: VID/PID: 0000:0000 [ INFO] [1662574549.421600529, 2.156000000]: VER: 1.1: UID: 4954414c44494e4f INFO [ecl/EKF] 3116000: EKF aligned, (baro hgt, IMU buf: 18, OBS buf: 14) INFO [ecl/EKF] 3116000: reset position to last known position INFO [ecl/EKF] 3116000: reset velocity to zero [ INFO] [1662574550.564955049, 3.296000000]: IMU: Attitude quaternion IMU detected! INFO [ecl/EKF] 5484000: reset position to GPS INFO [ecl/EKF] 5484000: reset velocity to GPS INFO [ecl/EKF] 5484000: starting GPS fusion

***after running the code ****

[ WARN] [1662575338.653643636, 790.320000000]: CMD: Unexpected command 176, result 1 INFO [commander] Armed by external command WARN [commander] Failsafe enabled: No manual control stick input INFO [commander] Failsafe mode activated INFO [navigator] RTL HOME activated INFO [navigator] RTL: landing at home position. INFO [commander] Failsafe mode deactivated INFO [commander] Disarmed by auto preflight disarming INFO [logger] closed logfile, bytes written: 40289119

I need to fix this issue as soon as possible. Could you help?

leomichalski commented 2 years ago

I ran into the same issue. Check the following parameters.

param show NAV_RCL_ACT
param show NAV_DLL_ACT

If you plan to fly with no remote control, then you will need to set the following parameters to stop the PX4 from triggering “failsafe mode on” every time a move command is finished.

param set NAV_RCL_ACT 0
param set NAV_DLL_ACT 0

NOTE: Do NOT do this on a real drone as it is too dangerous to fly without these failsafe measures.

https://airsim-fork.readthedocs.io/en/latest/px4_sitl.html#no-remote-control

O2KAN commented 2 years ago

Thank you for turning back I tried to set them using GNC but I am still getting the same errors. Is there any other way to set them?

leomichalski commented 2 years ago

What about COM_RCL_EXCEPT? Is it set to 4? It is also possible to set the parameters using QGroundControl.

O2KAN commented 2 years ago

I don't have a parameter like that. Probably because of the version of px4 that I use. I am using 1.11.2. But I think I have found a solution. My code did not publish set points correctly before setting offboard mode. Since I changed the code It is setting offboard mode and working as I expected. Thank you @leomichalski