Trouble in running the mavros_test Project (simple-example)
-
I have trouble running the mavros_test Project (simple-example) (https://docs.modalai.com/mavros/#mavros_test-project-simple-example).
I followed all the instructions carefully, and when I ran:
cd /home/mavros_test ./run_mavros_test.sh I got this on the terminal: voxl2:/home/mavros_test(simple-example)$ ./run_mavros_test.sh ... logging to /home/root/.ros/log/740b46ce-42c4-11ef-b08e-00c0cab5abe5/roslaunch-m0054-5058.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. started roslaunch server http://192.168.1.45:39563/ SUMMARY ======== CLEAR PARAMETERS * /mavros/ PARAMETERS * /mavros/camera/frame_id: base_link * /mavros/cmd/use_comp_id_system_control: False * /mavros/conn/heartbeat_rate: 1.0 * /mavros/conn/system_time_rate: 1.0 * /mavros/conn/timeout: 10.0 * /mavros/conn/timesync_rate: 10.0 * /mavros/distance_sensor/hrlv_ez4_pub/field_of_view: 0.0 * /mavros/distance_sensor/hrlv_ez4_pub/frame_id: hrlv_ez4_sonar * /mavros/distance_sensor/hrlv_ez4_pub/id: 0 * /mavros/distance_sensor/hrlv_ez4_pub/orientation: PITCH_270 * /mavros/distance_sensor/hrlv_ez4_pub/send_tf: True * /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/x: 0.0 * /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/y: 0.0 * /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/z: -0.1 * /mavros/distance_sensor/laser_1_sub/id: 3 * /mavros/distance_sensor/laser_1_sub/orientation: PITCH_270 * /mavros/distance_sensor/laser_1_sub/subscriber: True * /mavros/distance_sensor/lidarlite_pub/field_of_view: 0.0 * /mavros/distance_sensor/lidarlite_pub/frame_id: lidarlite_laser * /mavros/distance_sensor/lidarlite_pub/id: 1 * /mavros/distance_sensor/lidarlite_pub/orientation: PITCH_270 * /mavros/distance_sensor/lidarlite_pub/send_tf: True * /mavros/distance_sensor/lidarlite_pub/sensor_position/x: 0.0 * /mavros/distance_sensor/lidarlite_pub/sensor_position/y: 0.0 * /mavros/distance_sensor/lidarlite_pub/sensor_position/z: -0.1 * /mavros/distance_sensor/sonar_1_sub/horizontal_fov_ratio: 1.0 * /mavros/distance_sensor/sonar_1_sub/id: 2 * /mavros/distance_sensor/sonar_1_sub/orientation: PITCH_270 * /mavros/distance_sensor/sonar_1_sub/subscriber: True * /mavros/distance_sensor/sonar_1_sub/vertical_fov_ratio: 1.0 * /mavros/fake_gps/eph: 2.0 * /mavros/fake_gps/epv: 2.0 * /mavros/fake_gps/fix_type: 3 * /mavros/fake_gps/geo_origin/alt: 408.0 * /mavros/fake_gps/geo_origin/lat: 47.3667 * /mavros/fake_gps/geo_origin/lon: 8.55 * /mavros/fake_gps/gps_rate: 5.0 * /mavros/fake_gps/mocap_transform: True * /mavros/fake_gps/satellites_visible: 5 * /mavros/fake_gps/tf/child_frame_id: fix * /mavros/fake_gps/tf/frame_id: map * /mavros/fake_gps/tf/listen: False * /mavros/fake_gps/tf/rate_limit: 10.0 * /mavros/fake_gps/tf/send: False * /mavros/fake_gps/use_mocap: True * /mavros/fake_gps/use_vision: False * /mavros/fcu_protocol: v2.0 * /mavros/fcu_url: udp://127.0.0.1:1... * /mavros/gcs_url: * /mavros/global_position/child_frame_id: base_link * /mavros/global_position/frame_id: map * /mavros/global_position/gps_uere: 1.0 * /mavros/global_position/rot_covariance: 99999.0 * /mavros/global_position/tf/child_frame_id: base_link * /mavros/global_position/tf/frame_id: map * /mavros/global_position/tf/global_frame_id: earth * /mavros/global_position/tf/send: False * /mavros/global_position/use_relative_alt: True * /mavros/image/frame_id: px4flow * /mavros/imu/angular_velocity_stdev: 0.0003490659 // 0... * /mavros/imu/frame_id: base_link * /mavros/imu/linear_acceleration_stdev: 0.0003 * /mavros/imu/magnetic_stdev: 0.0 * /mavros/imu/orientation_stdev: 1.0 * /mavros/landing_target/camera/fov_x: 2.0071286398 * /mavros/landing_target/camera/fov_y: 2.0071286398 * /mavros/landing_target/image/height: 480 * /mavros/landing_target/image/width: 640 * /mavros/landing_target/land_target_type: VISION_FIDUCIAL * /mavros/landing_target/listen_lt: False * /mavros/landing_target/mav_frame: LOCAL_NED * /mavros/landing_target/target_size/x: 0.3 * /mavros/landing_target/target_size/y: 0.3 * /mavros/landing_target/tf/child_frame_id: camera_center * /mavros/landing_target/tf/frame_id: landing_target * /mavros/landing_target/tf/listen: False * /mavros/landing_target/tf/rate_limit: 10.0 * /mavros/landing_target/tf/send: True * /mavros/local_position/frame_id: map * /mavros/local_position/tf/child_frame_id: base_link * /mavros/local_position/tf/frame_id: map * /mavros/local_position/tf/send: False * /mavros/local_position/tf/send_fcu: False * /mavros/mission/pull_after_gcs: True * /mavros/mission/use_mission_item_int: True * /mavros/mocap/use_pose: True * /mavros/mocap/use_tf: False * /mavros/mount/debounce_s: 4.0 * /mavros/mount/err_threshold_deg: 10.0 * /mavros/mount/negate_measured_pitch: False * /mavros/mount/negate_measured_roll: False * /mavros/mount/negate_measured_yaw: False * /mavros/odometry/fcu/odom_child_id_des: base_link * /mavros/odometry/fcu/odom_parent_id_des: map * /mavros/plugin_blacklist: ['safety_area', '... * /mavros/plugin_whitelist: [] * /mavros/px4flow/frame_id: px4flow * /mavros/px4flow/ranger_fov: 0.118682 * /mavros/px4flow/ranger_max_range: 5.0 * /mavros/px4flow/ranger_min_range: 0.3 * /mavros/safety_area/p1/x: 1.0 * /mavros/safety_area/p1/y: 1.0 * /mavros/safety_area/p1/z: 1.0 * /mavros/safety_area/p2/x: -1.0 * /mavros/safety_area/p2/y: -1.0 * /mavros/safety_area/p2/z: -1.0 * /mavros/setpoint_accel/send_force: False * /mavros/setpoint_attitude/reverse_thrust: False * /mavros/setpoint_attitude/tf/child_frame_id: target_attitude * /mavros/setpoint_attitude/tf/frame_id: map * /mavros/setpoint_attitude/tf/listen: False * /mavros/setpoint_attitude/tf/rate_limit: 50.0 * /mavros/setpoint_attitude/use_quaternion: False * /mavros/setpoint_position/mav_frame: LOCAL_NED * /mavros/setpoint_position/tf/child_frame_id: target_position * /mavros/setpoint_position/tf/frame_id: map * /mavros/setpoint_position/tf/listen: False * /mavros/setpoint_position/tf/rate_limit: 50.0 * /mavros/setpoint_raw/thrust_scaling: 1.0 * /mavros/setpoint_velocity/mav_frame: LOCAL_NED * /mavros/startup_px4_usb_quirk: False * /mavros/sys/disable_diag: False * /mavros/sys/min_voltage: 10.0 * /mavros/target_component_id: 1 * /mavros/target_system_id: 1 * /mavros/tdr_radio/low_rssi: 40 * /mavros/time/time_ref_source: fcu * /mavros/time/timesync_avg_alpha: 0.6 * /mavros/time/timesync_mode: MAVLINK * /mavros/vibration/frame_id: base_link * /mavros/vision_pose/tf/child_frame_id: vision_estimate * /mavros/vision_pose/tf/frame_id: odom * /mavros/vision_pose/tf/listen: False * /mavros/vision_pose/tf/rate_limit: 10.0 * /mavros/vision_speed/listen_twist: True * /mavros/vision_speed/twist_cov: True * /mavros/wheel_odometry/child_frame_id: base_link * /mavros/wheel_odometry/count: 2 * /mavros/wheel_odometry/frame_id: odom * /mavros/wheel_odometry/send_raw: True * /mavros/wheel_odometry/send_twist: False * /mavros/wheel_odometry/tf/child_frame_id: base_link * /mavros/wheel_odometry/tf/frame_id: odom * /mavros/wheel_odometry/tf/send: False * /mavros/wheel_odometry/use_rpm: False * /mavros/wheel_odometry/vel_error: 0.1 * /mavros/wheel_odometry/wheel0/radius: 0.05 * /mavros/wheel_odometry/wheel0/x: 0.0 * /mavros/wheel_odometry/wheel0/y: -0.15 * /mavros/wheel_odometry/wheel1/radius: 0.05 * /mavros/wheel_odometry/wheel1/x: 0.0 * /mavros/wheel_odometry/wheel1/y: 0.15 * /rosdistro: melodic * /rosversion: 1.14.13 NODES / mavros (mavros/mavros_node) mavros_test_node (mavros_test/mavros_test_node) auto-starting new master process[master]: started with pid [5072] ROS_MASTER_URI=http://127.0.0.1:11311/ setting /run_id to 740b46ce-42c4-11ef-b08e-00c0cab5abe5 process[rosout-1]: started with pid [5083] started core service [/rosout] process[mavros-2]: started with pid [5091] process[mavros_test_node-3]: started with pid [5092] [ INFO] [1721059701.053944604]: simple_demo [ INFO] [1721059701.184390643]: FCU URL: udp://127.0.0.1:14551@:14551 [ INFO] [1721059701.186887064]: udp0: Bind address: 127.0.0.1:14551 [ INFO] [1721059701.186984362]: GCS bridge disabled [ INFO] [1721059701.198153822]: Plugin 3dr_radio loaded [ INFO] [1721059701.206209164]: Plugin 3dr_radio initialized [ INFO] [1721059701.206311202]: Plugin actuator_control loaded [ INFO] [1721059701.209795450]: Plugin actuator_control initialized [ INFO] [1721059701.215531831]: Plugin adsb loaded [ INFO] [1721059701.220162824]: Plugin adsb initialized [ INFO] [1721059701.220375235]: Plugin altitude loaded [ INFO] [1721059701.223591756]: Plugin altitude initialized [ INFO] [1721059701.224009285]: Plugin cam_imu_sync loaded [ INFO] [1721059701.224724230]: Plugin cam_imu_sync initialized [ INFO] [1721059701.224842050]: Plugin camera loaded [ INFO] [1721059701.225575017]: Plugin camera initialized [ INFO] [1721059701.225867745]: Plugin cellular_status loaded [ INFO] [1721059701.228871335]: Plugin cellular_status initialized [ INFO] [1721059701.229033274]: Plugin command loaded [ INFO] [1721059701.234510887]: Plugin command initialized [ INFO] [1721059701.234635114]: Plugin companion_process_status loaded [ INFO] [1721059701.236884851]: Plugin companion_process_status initialized [ INFO] [1721059701.237013975]: Plugin debug_value loaded [ INFO] [1721059701.240331753]: Plugin debug_value initialized [ INFO] [1721059701.240368943]: Plugin distance_sensor blacklisted [ INFO] [1721059701.240454939]: Plugin esc_status loaded [ INFO] [1721059701.241189572]: Plugin esc_status initialized [ INFO] [1721059701.241286818]: Plugin esc_telemetry loaded [ INFO] [1721059701.242087394]: Plugin esc_telemetry initialized [ INFO] [1721059701.242218392]: Plugin fake_gps loaded [ INFO] [1721059701.255931099]: Plugin fake_gps initialized [ INFO] [1721059701.256196169]: Plugin ftp loaded [ INFO] [1721059701.262559781]: Plugin ftp initialized [ INFO] [1721059701.262688435]: Plugin geofence loaded [ INFO] [1721059701.264421262]: Plugin geofence initialized [ INFO] [1721059701.264509289]: Plugin global_position loaded [ INFO] [1721059701.274271205]: Plugin global_position initialized [ INFO] [1721059701.274368920]: Plugin gps_input loaded [ INFO] [1721059701.276500941]: Plugin gps_input initialized [ INFO] [1721059701.276609125]: Plugin gps_rtk loaded [ INFO] [1721059701.278799535]: Plugin gps_rtk initialized [ INFO] [1721059701.278885739]: Plugin gps_status loaded [ INFO] [1721059701.280354224]: Plugin gps_status initialized [ INFO] [1721059701.280445950]: Plugin guided_target loaded [ INFO] [1721059701.282821528]: Plugin guided_target initialized [ INFO] [1721059701.282942057]: Plugin hil loaded [ INFO] [1721059701.291681143]: Plugin hil initialized [ INFO] [1721059701.291835894]: Plugin home_position loaded [ INFO] [1721059701.294077349]: Plugin home_position initialized [ INFO] [1721059701.294178085]: Plugin imu loaded [ INFO] [1721059701.300978601]: Plugin imu initialized [ INFO] [1721059701.301082046]: Plugin landing_target loaded [ INFO] [1721059701.319874526]: Plugin landing_target initialized [ INFO] [1721059701.320027037]: Plugin local_position loaded [ INFO] [1721059701.324364728]: Plugin local_position initialized [ INFO] [1721059701.324495102]: Plugin log_transfer loaded [ INFO] [1721059701.329005201]: Plugin log_transfer initialized [ INFO] [1721059701.329123543]: Plugin mag_calibration_status loaded [ INFO] [1721059701.329793693]: Plugin mag_calibration_status initialized [ INFO] [1721059701.329883803]: Plugin manual_control loaded [ INFO] [1721059701.331578919]: Plugin manual_control initialized [ INFO] [1721059701.331655799]: Plugin mocap_pose_estimate loaded [ INFO] [1721059701.333844907]: Plugin mocap_pose_estimate initialized [ INFO] [1721059701.333922933]: Plugin mount_control loaded [ WARN] [1721059701.336751772]: Could not retrive negate_measured_roll parameter value, using default (0) [ WARN] [1721059701.336996216]: Could not retrive negate_measured_pitch parameter value, using default (0) [ WARN] [1721059701.337240659]: Could not retrive negate_measured_yaw parameter value, using default (0) [ WARN] [1721059701.338031234]: Could not retrive debounce_s parameter value, using default (4.000000) [ WARN] [1721059701.338254374]: Could not retrive err_threshold_deg parameter value, using default (10.000000) [ INFO] [1721059701.338292658]: Plugin mount_control initialized [ INFO] [1721059701.338385269]: Plugin nav_controller_output loaded [ INFO] [1721059701.338699821]: Plugin nav_controller_output initialized [ INFO] [1721059701.338771649]: Plugin obstacle_distance loaded [ INFO] [1721059701.340162109]: Plugin obstacle_distance initialized [ INFO] [1721059701.340228520]: Plugin odom loaded [ INFO] [1721059701.342990427]: Plugin odom initialized [ INFO] [1721059701.343101841]: Plugin onboard_computer_status loaded [ INFO] [1721059701.344622934]: Plugin onboard_computer_status initialized [ INFO] [1721059701.344730337]: Plugin param loaded [ INFO] [1721059701.347169931]: Plugin param initialized [ INFO] [1721059701.347327546]: Plugin play_tune loaded [ INFO] [1721059701.349693801]: Plugin play_tune initialized [ INFO] [1721059701.349777765]: Plugin px4flow loaded [ INFO] [1721059701.354768887]: Plugin px4flow initialized [ INFO] [1721059701.355008018]: Plugin rallypoint loaded [ INFO] [1721059701.357594340]: Plugin rallypoint initialized [ INFO] [1721059701.357646896]: Plugin rangefinder blacklisted [ INFO] [1721059701.357734819]: Plugin rc_io loaded [ INFO] [1721059701.360371405]: Plugin rc_io initialized [ INFO] [1721059701.360420887]: Plugin safety_area blacklisted [ INFO] [1721059701.360521363]: Plugin setpoint_accel loaded [ INFO] [1721059701.362749275]: Plugin setpoint_accel initialized [ INFO] [1721059701.362888295]: Plugin setpoint_attitude loaded [ INFO] [1721059701.369753920]: Plugin setpoint_attitude initialized [ INFO] [1721059701.369872991]: Plugin setpoint_position loaded [ INFO] [1721059701.379478126]: Plugin setpoint_position initialized [ INFO] [1721059701.379646210]: Plugin setpoint_raw loaded [ INFO] [1721059701.385296127]: Plugin setpoint_raw initialized [ INFO] [1721059701.385406291]: Plugin setpoint_trajectory loaded [ INFO] [1721059701.390939481]: Plugin setpoint_trajectory initialized [ INFO] [1721059701.391086262]: Plugin setpoint_velocity loaded [ INFO] [1721059701.394824486]: Plugin setpoint_velocity initialized [ INFO] [1721059701.394964912]: Plugin sys_status loaded [ INFO] [1721059701.408650950]: Plugin sys_status initialized [ INFO] [1721059701.408896332]: Plugin sys_time loaded [ INFO] [1721059701.414709801]: TM: Timesync mode: MAVLINK [ INFO] [1721059701.415076233]: TM: Not publishing sim time [ INFO] [1721059701.416871928]: Plugin sys_time initialized [ INFO] [1721059701.416999020]: Plugin terrain loaded [ INFO] [1721059701.419657066]: Plugin terrain initialized [ INFO] [1721059701.419786294]: Plugin trajectory loaded [ INFO] [1721059701.426208555]: Plugin trajectory initialized [ INFO] [1721059701.426340699]: Plugin tunnel loaded [ INFO] [1721059701.428138166]: Plugin tunnel initialized [ INFO] [1721059701.428232912]: Plugin vfr_hud loaded [ INFO] [1721059701.428621063]: Plugin vfr_hud initialized [ INFO] [1721059701.428662681]: Plugin vibration blacklisted [ INFO] [1721059701.428737113]: Plugin vision_pose_estimate loaded [ INFO] [1721059701.435602217]: Plugin vision_pose_estimate initialized [ INFO] [1721059701.435714933]: Plugin vision_speed_estimate loaded [ INFO] [1721059701.437805857]: Plugin vision_speed_estimate initialized [ INFO] [1721059701.437895342]: Plugin waypoint loaded [ INFO] [1721059701.440488800]: Plugin waypoint initialized [ INFO] [1721059701.440527449]: Plugin wheel_odometry blacklisted [ INFO] [1721059701.440773507]: Plugin wind_estimation loaded [ INFO] [1721059701.442031249]: Plugin wind_estimation initialized [ INFO] [1721059701.442183187]: Built-in SIMD instructions: ARM NEON [ INFO] [1721059701.442203397]: Built-in MAVLink package version: 2022.12.30 [ INFO] [1721059701.442223242]: Known MAVLink dialects: common ardupilotmega ASLUAV AVSSUAS all cubepilot development icarous matrixpilot paparazzi standard storm32 uAvionix ualberta [ INFO] [1721059701.442239128]: MAVROS started. MY ID 1.240, TARGET ID 1.1 [ INFO] [1721059706.087746519]: waiting for offboard mode . The problem is here: When I switch between manual and offboard, the drone does not arm/disarm as expected in the video tutorial and instructions! Note 1: Here is my IP address, and detail of the config files: amirmahdi@amirmahdi:~$ ifconfig docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255 ether 02:42:72:03:47:05 txqueuelen 0 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 enp45s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether b4:45:06:94:a8:b6 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 14480 bytes 1380176 (1.3 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 14480 bytes 1380176 (1.3 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.5 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::e9cf:ce9f:8897:56e4 prefixlen 64 scopeid 0x20<link> ether cc:15:31:2b:bc:95 txqueuelen 1000 (Ethernet) RX packets 4029202 bytes 3659491459 (3.6 GB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 318206 bytes 62215059 (62.2 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
amirmahdi@amirmahdi:~$ ssh -X root@192.168.1.45 root@192.168.1.45's password: Welcome to Ubuntu 18.04.6 LTS (GNU/Linux 4.19.125 aarch64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/pro This system has been minimized by removing packages and content that are not required on a system that users do not log into. To restore this content, you can run the 'unminimize' command. Last login: Mon Jul 15 15:58:42 2024 from 192.168.1.5 ▂▂▂▂▂▂▂▂▂▂▂▂▂ ▂▄▆▆██▛▀▀▀▀▀▀▀▀▜████▆▆▄▂ ███╗ ███╗ ██████╗ ██████╗ █████╗ ██╗ ▗▆████▀▔ ▔▔▀▀▀▀▚▄ ████╗ ████║██╔═══██╗██╔══██╗██╔══██╗██║ ▗▟████▀ ▗██▖ ▐█ ▝▀▆▄▄▄ ██╔████╔██║██║ ██║██║ ██║███████║██║ ▟████▀ ▗█▘▝█▖ ▐█ ▜█▀█▄ ██║╚██╔╝██║██║ ██║██║ ██║██╔══██║██║ █▌ ▐█▌ ▗█▘ ▝█▖ ▐█ ▐▄ ▄█ ██║ ╚═╝ ██║╚██████╔╝██████╔╝██║ ██║███████╗ ▀████ ▗█▘ ▝█▖ ▐█ ▂▄███▀ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ▀▀██▄▄ ▂▆███▀ ▀▀██▄▄ ▀▀▆▄▄▄▄▆██▀▀▀▘ -------------------------------------------------------------------------------- system-image: 1.7.8-M0054-14.1a-perf kernel: #1 SMP PREEMPT Fri May 17 23:29:23 UTC 2024 4.19.125 -------------------------------------------------------------------------------- hw platform: M0054 mach.var: 1.0.0 -------------------------------------------------------------------------------- voxl-suite: 1.3.1~beta1 -------------------------------------------------------------------------------- current IP: wlan0: 192.168.1.45 --------------
voxl2:~$ more /home/mavros_test/ros_environment.sh #!/bin/bash # # load main ros environment if [ -f /opt/ros/melodic/setup.bash ]; then source /opt/ros/melodic/setup.bash elif [ -f /opt/ros/kinetic/setup.bash ]; then source /opt/ros/kinetic/setup.bash elif [ -f /opt/ros/indigo/setup.bash ]; then source /opt/ros/indigo/setup.bash fi source catkin_ws/install/setup.bash unset ROS_HOSTNAME # configure ROS IPs here export ROS_MASTER_IP=127.0.0.1 export ROS_IP=192.168.1.45 export ROS_MASTER_URI=http://${ROS_MASTER_IP}:11311/ # mavros needs to know what PX4's system id is export PX4_SYS_ID=1
And here is the voxl-vision-hub.conf:
voxl2:~$ more /etc/modalai/voxl-vision-hub.conf . . . { "config_file_version": 1, "qgc_ip": "192.168.1.5", "en_localhost_mavlink_udp": true, "localhost_udp_port_number": 14551, "en_vio": true, "vio_pipe": "qvio", "secondary_vio_pipe": "ov", "en_reset_vio_if_initialized_inverted": true, "vio_warmup_s": 3, "send_odom_while_failed": true, "horizon_cal_tolerance": 0.5, "offboard_mode": "off", "follow_tag_id": 0, "figure_eight_move_home": true, "robot_radius": 0.300000011920929, "collision_sampling_dt": 0.1, "max_lookahead_distance": 1, "backtrack_seconds": 5, "wps_move_home": true, "wps_stride": 0, "wps_timeout": 0, "wps_damp": 1, "en_tag_fixed_frame": false, "fixed_frame_filter_len": 5, "en_transform_mavlink_pos_setpoints_from_fixed_frame": false, "en_voa": true, "voa_upper_bound_m": -0.15000000596046448, "voa_lower_bound_m": 0.15000000596046448, "voa_voa_memory_s": 1, "voa_max_pc_per_fusion": 100, "voa_pie_max_dist_m": 20, "voa_pie_min_dist_m": 0.25, "voa_pie_under_trim_m": 1, "voa_pie_threshold": 3, "voa_send_rate_hz": 20, "voa_pie_slices": 36, "voa_pie_bin_depth_m": 0.15000000596046448, "voa_inputs": [{ "enabled": true, "type": "point_cloud", "input_pipe": "dfs_point_cloud", "frame": "stereo_l", "max_depth": 8, "min_depth": 0.300000011920929, "cell_size": 0.079999998211860657, "threshold": 4, "x_fov_deg": 68, "y_fov_deg": 56, "conf_cutoff": 0 }, { "enabled": true, "type": "point_cloud", "input_pipe": "stereo_front_pc", "frame": "stereo_front_l", "max_depth": 8, "min_depth": 0.300000011920929, "cell_size": 0.079999998211860657, "threshold": 4, "x_fov_deg": 68, "y_fov_deg": 56, "conf_cutoff": 0 }, { "enabled": true, "type": "point_cloud", "input_pipe": "stereo_rear_pc", "frame": "stereo_rear_l", "max_depth": 8, "min_depth": 0.300000011920929, "cell_size": 0.079999998211860657, "threshold": 4, "x_fov_deg": 68, "y_fov_deg": 56, "conf_cutoff": 0 }, { "enabled": true, "type": "tof", "input_pipe": "tof", "frame": "tof", "max_depth": 6, "min_depth": 0.15000000596046448, "cell_size": 0.079999998211860657, "threshold": 3, "x_fov_deg": 106.5, "y_fov_deg": 85.0999984741211, "conf_cutoff": 125 }, { "enabled": true, "type": "rangefinder", "input_pipe": "rangefinders", "frame": "body", "max_depth": 8, "min_depth": 0.300000011920929, "cell_size": 0.079999998211860657, "threshold": 4, "x_fov_deg": 68, "y_fov_deg": 56, "conf_cutoff": 0 }] }
Note 2: I could manually arm/disarm the Sentinel drone with QGC and RC. The motors are working properly. But this ros example is not working here! Can anyone help me?
Note 3: I also tried to change the mode channel to 5 and 6, but still not working!
This is a photo for QGC. As you can see, I could manually arm the drone and have a connection to the drone.
-
@Captain-7th . The problem is here: When I switch between manual and offboard, the drone does not arm/disarm as expected in the video tutorial and instructions!
-
-
@Captain-7th Can you do a rostopic echo of
/mavros/state
You should be able to see info printed if the autopilot is connected or disconnected.
-
Thank you for your reply. Here is the info from ros topic:
--- header: seq: 72 stamp: secs: 1726594638 nsecs: 117869663 frame_id: '' connected: True armed: False guided: False manual_input: False mode: "OFFBOARD" system_status: 3 --- header: seq: 73 stamp: secs: 1726594639 nsecs: 117602864 frame_id: '' connected: True armed: False guided: False manual_input: True mode: "MANUAL" system_status: 3
When I run the simple-example, and then I switch between the "offboard" and "manual", the drone is not able to get armed! Here is the message on the terminal:
voxl2:/home/mavros_test(simple-example)$ ./run_mavros_test.sh ... logging to /home/root/.ros/log/d9e22bd2-751b-11ef-bd2d-00c0cab5abe5/roslaunch-m0054-2796.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. started roslaunch server http://192.168.1.45:46595/ SUMMARY ======== CLEAR PARAMETERS * /mavros/ PARAMETERS * /mavros/camera/frame_id: base_link * /mavros/cmd/use_comp_id_system_control: False * /mavros/conn/heartbeat_rate: 1.0 * /mavros/conn/system_time_rate: 1.0 * /mavros/conn/timeout: 10.0 * /mavros/conn/timesync_rate: 10.0 * /mavros/distance_sensor/hrlv_ez4_pub/field_of_view: 0.0 * /mavros/distance_sensor/hrlv_ez4_pub/frame_id: hrlv_ez4_sonar * /mavros/distance_sensor/hrlv_ez4_pub/id: 0 * /mavros/distance_sensor/hrlv_ez4_pub/orientation: PITCH_270 * /mavros/distance_sensor/hrlv_ez4_pub/send_tf: True * /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/x: 0.0 * /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/y: 0.0 * /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/z: -0.1 * /mavros/distance_sensor/laser_1_sub/id: 3 * /mavros/distance_sensor/laser_1_sub/orientation: PITCH_270 * /mavros/distance_sensor/laser_1_sub/subscriber: True * /mavros/distance_sensor/lidarlite_pub/field_of_view: 0.0 * /mavros/distance_sensor/lidarlite_pub/frame_id: lidarlite_laser * /mavros/distance_sensor/lidarlite_pub/id: 1 * /mavros/distance_sensor/lidarlite_pub/orientation: PITCH_270 * /mavros/distance_sensor/lidarlite_pub/send_tf: True * /mavros/distance_sensor/lidarlite_pub/sensor_position/x: 0.0 * /mavros/distance_sensor/lidarlite_pub/sensor_position/y: 0.0 * /mavros/distance_sensor/lidarlite_pub/sensor_position/z: -0.1 * /mavros/distance_sensor/sonar_1_sub/horizontal_fov_ratio: 1.0 * /mavros/distance_sensor/sonar_1_sub/id: 2 * /mavros/distance_sensor/sonar_1_sub/orientation: PITCH_270 * /mavros/distance_sensor/sonar_1_sub/subscriber: True * /mavros/distance_sensor/sonar_1_sub/vertical_fov_ratio: 1.0 * /mavros/fake_gps/eph: 2.0 * /mavros/fake_gps/epv: 2.0 * /mavros/fake_gps/fix_type: 3 * /mavros/fake_gps/geo_origin/alt: 408.0 * /mavros/fake_gps/geo_origin/lat: 47.3667 * /mavros/fake_gps/geo_origin/lon: 8.55 * /mavros/fake_gps/gps_rate: 5.0 * /mavros/fake_gps/mocap_transform: True * /mavros/fake_gps/satellites_visible: 5 * /mavros/fake_gps/tf/child_frame_id: fix * /mavros/fake_gps/tf/frame_id: map * /mavros/fake_gps/tf/listen: False * /mavros/fake_gps/tf/rate_limit: 10.0 * /mavros/fake_gps/tf/send: False * /mavros/fake_gps/use_mocap: True * /mavros/fake_gps/use_vision: False * /mavros/fcu_protocol: v2.0 * /mavros/fcu_url: udp://127.0.0.1:1... * /mavros/gcs_url: * /mavros/global_position/child_frame_id: base_link * /mavros/global_position/frame_id: map * /mavros/global_position/gps_uere: 1.0 * /mavros/global_position/rot_covariance: 99999.0 * /mavros/global_position/tf/child_frame_id: base_link * /mavros/global_position/tf/frame_id: map * /mavros/global_position/tf/global_frame_id: earth * /mavros/global_position/tf/send: False * /mavros/global_position/use_relative_alt: True * /mavros/image/frame_id: px4flow * /mavros/imu/angular_velocity_stdev: 0.0003490659 // 0... * /mavros/imu/frame_id: base_link * /mavros/imu/linear_acceleration_stdev: 0.0003 * /mavros/imu/magnetic_stdev: 0.0 * /mavros/imu/orientation_stdev: 1.0 * /mavros/landing_target/camera/fov_x: 2.0071286398 * /mavros/landing_target/camera/fov_y: 2.0071286398 * /mavros/landing_target/image/height: 480 * /mavros/landing_target/image/width: 640 * /mavros/landing_target/land_target_type: VISION_FIDUCIAL * /mavros/landing_target/listen_lt: False * /mavros/landing_target/mav_frame: LOCAL_NED * /mavros/landing_target/target_size/x: 0.3 * /mavros/landing_target/target_size/y: 0.3 * /mavros/landing_target/tf/child_frame_id: camera_center * /mavros/landing_target/tf/frame_id: landing_target * /mavros/landing_target/tf/listen: False * /mavros/landing_target/tf/rate_limit: 10.0 * /mavros/landing_target/tf/send: True * /mavros/local_position/frame_id: map * /mavros/local_position/tf/child_frame_id: base_link * /mavros/local_position/tf/frame_id: map * /mavros/local_position/tf/send: False * /mavros/local_position/tf/send_fcu: False * /mavros/mission/pull_after_gcs: True * /mavros/mission/use_mission_item_int: True * /mavros/mocap/use_pose: True * /mavros/mocap/use_tf: False * /mavros/mount/debounce_s: 4.0 * /mavros/mount/err_threshold_deg: 10.0 * /mavros/mount/negate_measured_pitch: False * /mavros/mount/negate_measured_roll: False * /mavros/mount/negate_measured_yaw: False * /mavros/odometry/fcu/odom_child_id_des: base_link * /mavros/odometry/fcu/odom_parent_id_des: map * /mavros/plugin_blacklist: ['safety_area', '... * /mavros/plugin_whitelist: [] * /mavros/px4flow/frame_id: px4flow * /mavros/px4flow/ranger_fov: 0.118682 * /mavros/px4flow/ranger_max_range: 5.0 * /mavros/px4flow/ranger_min_range: 0.3 * /mavros/safety_area/p1/x: 1.0 * /mavros/safety_area/p1/y: 1.0 * /mavros/safety_area/p1/z: 1.0 * /mavros/safety_area/p2/x: -1.0 * /mavros/safety_area/p2/y: -1.0 * /mavros/safety_area/p2/z: -1.0 * /mavros/setpoint_accel/send_force: False * /mavros/setpoint_attitude/reverse_thrust: False * /mavros/setpoint_attitude/tf/child_frame_id: target_attitude * /mavros/setpoint_attitude/tf/frame_id: map * /mavros/setpoint_attitude/tf/listen: False * /mavros/setpoint_attitude/tf/rate_limit: 50.0 * /mavros/setpoint_attitude/use_quaternion: False * /mavros/setpoint_position/mav_frame: LOCAL_NED * /mavros/setpoint_position/tf/child_frame_id: target_position * /mavros/setpoint_position/tf/frame_id: map * /mavros/setpoint_position/tf/listen: False * /mavros/setpoint_position/tf/rate_limit: 50.0 * /mavros/setpoint_raw/thrust_scaling: 1.0 * /mavros/setpoint_velocity/mav_frame: LOCAL_NED * /mavros/startup_px4_usb_quirk: False * /mavros/sys/disable_diag: False * /mavros/sys/min_voltage: 10.0 * /mavros/target_component_id: 1 * /mavros/target_system_id: 1 * /mavros/tdr_radio/low_rssi: 40 * /mavros/time/time_ref_source: fcu * /mavros/time/timesync_avg_alpha: 0.6 * /mavros/time/timesync_mode: MAVLINK * /mavros/vibration/frame_id: base_link * /mavros/vision_pose/tf/child_frame_id: vision_estimate * /mavros/vision_pose/tf/frame_id: odom * /mavros/vision_pose/tf/listen: False * /mavros/vision_pose/tf/rate_limit: 10.0 * /mavros/vision_speed/listen_twist: True * /mavros/vision_speed/twist_cov: True * /mavros/wheel_odometry/child_frame_id: base_link * /mavros/wheel_odometry/count: 2 * /mavros/wheel_odometry/frame_id: odom * /mavros/wheel_odometry/send_raw: True * /mavros/wheel_odometry/send_twist: False * /mavros/wheel_odometry/tf/child_frame_id: base_link * /mavros/wheel_odometry/tf/frame_id: odom * /mavros/wheel_odometry/tf/send: False * /mavros/wheel_odometry/use_rpm: False * /mavros/wheel_odometry/vel_error: 0.1 * /mavros/wheel_odometry/wheel0/radius: 0.05 * /mavros/wheel_odometry/wheel0/x: 0.0 * /mavros/wheel_odometry/wheel0/y: -0.15 * /mavros/wheel_odometry/wheel1/radius: 0.05 * /mavros/wheel_odometry/wheel1/x: 0.0 * /mavros/wheel_odometry/wheel1/y: 0.15 * /rosdistro: melodic * /rosversion: 1.14.13 NODES / mavros (mavros/mavros_node) mavros_test_node (mavros_test/mavros_test_node) auto-starting new master process[master]: started with pid [2810] ROS_MASTER_URI=http://127.0.0.1:11311/ setting /run_id to d9e22bd2-751b-11ef-bd2d-00c0cab5abe5 process[rosout-1]: started with pid [2821] started core service [/rosout] process[mavros-2]: started with pid [2829] process[mavros_test_node-3]: started with pid [2830] [ INFO] [1726594796.214120407]: simple_demo [ INFO] [1726594796.314832807]: FCU URL: udp://127.0.0.1:14551@:14551 [ INFO] [1726594796.317305328]: udp0: Bind address: 127.0.0.1:14551 [ INFO] [1726594796.319478270]: GCS bridge disabled [ INFO] [1726594796.330857244]: Plugin 3dr_radio loaded [ INFO] [1726594796.332309413]: Plugin 3dr_radio initialized [ INFO] [1726594796.332392694]: Plugin actuator_control loaded [ INFO] [1726594796.334354336]: Plugin actuator_control initialized [ INFO] [1726594796.338348870]: Plugin adsb loaded [ INFO] [1726594796.340326814]: Plugin adsb initialized [ INFO] [1726594796.340427021]: Plugin altitude loaded [ INFO] [1726594796.341168262]: Plugin altitude initialized [ INFO] [1726594796.341253834]: Plugin cam_imu_sync loaded [ INFO] [1726594796.342251790]: Plugin cam_imu_sync initialized [ INFO] [1726594796.342400851]: Plugin camera loaded [ INFO] [1726594796.342852200]: Plugin camera initialized [ INFO] [1726594796.342942459]: Plugin cellular_status loaded [ INFO] [1726594796.344562803]: Plugin cellular_status initialized [ INFO] [1726594796.344652281]: Plugin command loaded [ INFO] [1726594796.348940405]: Plugin command initialized [ INFO] [1726594796.349052644]: Plugin companion_process_status loaded [ INFO] [1726594796.350713196]: Plugin companion_process_status initialized [ INFO] [1726594796.350805330]: Plugin debug_value loaded [ INFO] [1726594796.354203569]: Plugin debug_value initialized [ INFO] [1726594796.354248621]: Plugin distance_sensor blacklisted [ INFO] [1726594796.354333360]: Plugin esc_status loaded [ INFO] [1726594796.355075121]: Plugin esc_status initialized [ INFO] [1726594796.355161578]: Plugin esc_telemetry loaded [ INFO] [1726594796.355564230]: Plugin esc_telemetry initialized [ INFO] [1726594796.355666156]: Plugin fake_gps loaded [ INFO] [1726594796.366434304]: Plugin fake_gps initialized [ INFO] [1726594796.366559198]: Plugin ftp loaded [ INFO] [1726594796.370116029]: Plugin ftp initialized [ INFO] [1726594796.370203996]: Plugin geofence loaded [ INFO] [1726594796.371933715]: Plugin geofence initialized [ INFO] [1726594796.372017203]: Plugin global_position loaded [ INFO] [1726594796.383542581]: Plugin global_position initialized [ INFO] [1726594796.383671538]: Plugin gps_input loaded [ INFO] [1726594796.385748387]: Plugin gps_input initialized [ INFO] [1726594796.385841147]: Plugin gps_rtk loaded [ INFO] [1726594796.387900705]: Plugin gps_rtk initialized [ INFO] [1726594796.387991224]: Plugin gps_status loaded [ INFO] [1726594796.389556830]: Plugin gps_status initialized [ INFO] [1726594796.389657506]: Plugin guided_target loaded [ INFO] [1726594796.393238243]: Plugin guided_target initialized [ INFO] [1726594796.393468448]: Plugin hil loaded [ INFO] [1726594796.400807732]: Plugin hil initialized [ INFO] [1726594796.401154134]: Plugin home_position loaded [ INFO] [1726594796.404127952]: Plugin home_position initialized [ INFO] [1726594796.404220503]: Plugin imu loaded [ INFO] [1726594796.408209828]: Plugin imu initialized [ INFO] [1726594796.408310504]: Plugin landing_target loaded [ INFO] [1726594796.419679895]: Plugin landing_target initialized [ INFO] [1726594796.419817497]: Plugin local_position loaded [ INFO] [1726594796.424506762]: Plugin local_position initialized [ INFO] [1726594796.424627073]: Plugin log_transfer loaded [ INFO] [1726594796.428045208]: Plugin log_transfer initialized [ INFO] [1726594796.428182810]: Plugin mag_calibration_status loaded [ INFO] [1726594796.429988205]: Plugin mag_calibration_status initialized [ INFO] [1726594796.430065079]: Plugin manual_control loaded [ INFO] [1726594796.431586987]: Plugin manual_control initialized [ INFO] [1726594796.431664694]: Plugin mocap_pose_estimate loaded [ INFO] [1726594796.435245379]: Plugin mocap_pose_estimate initialized [ INFO] [1726594796.435333190]: Plugin mount_control loaded [ WARN] [1726594796.438282841]: Could not retrive negate_measured_roll parameter value, using default (0) [ WARN] [1726594796.438520651]: Could not retrive negate_measured_pitch parameter value, using default (0) [ WARN] [1726594796.438761690]: Could not retrive negate_measured_yaw parameter value, using default (0) [ WARN] [1726594796.439565846]: Could not retrive debounce_s parameter value, using default (4.000000) [ WARN] [1726594796.439798239]: Could not retrive err_threshold_deg parameter value, using default (10.000000) [ INFO] [1726594796.439838343]: Plugin mount_control initialized [ INFO] [1726594796.439924592]: Plugin nav_controller_output loaded [ INFO] [1726594796.442058888]: Plugin nav_controller_output initialized [ INFO] [1726594796.442160293]: Plugin obstacle_distance loaded [ INFO] [1726594796.444083603]: Plugin obstacle_distance initialized [ INFO] [1726594796.444191518]: Plugin odom loaded [ INFO] [1726594796.446595187]: Plugin odom initialized [ INFO] [1726594796.446678050]: Plugin onboard_computer_status loaded [ INFO] [1726594796.450546440]: Plugin onboard_computer_status initialized [ INFO] [1726594796.450646543]: Plugin param loaded [ INFO] [1726594796.452225794]: Plugin param initialized [ INFO] [1726594796.452388136]: Plugin play_tune loaded [ INFO] [1726594796.454038167]: Plugin play_tune initialized [ INFO] [1726594796.454121812]: Plugin px4flow loaded [ INFO] [1726594796.457780725]: Plugin px4flow initialized [ INFO] [1726594796.457911140]: Plugin rallypoint loaded [ INFO] [1726594796.459707316]: Plugin rallypoint initialized [ INFO] [1726594796.459784294]: Plugin rangefinder blacklisted [ INFO] [1726594796.460000750]: Plugin rc_io loaded [ INFO] [1726594796.461943694]: Plugin rc_io initialized [ INFO] [1726594796.461972548]: Plugin safety_area blacklisted [ INFO] [1726594796.462042808]: Plugin setpoint_accel loaded [ INFO] [1726594796.463607736]: Plugin setpoint_accel initialized [ INFO] [1726594796.463691017]: Plugin setpoint_attitude loaded [ INFO] [1726594796.468460645]: Plugin setpoint_attitude initialized [ INFO] [1726594796.468569081]: Plugin setpoint_position loaded [ INFO] [1726594796.477376837]: Plugin setpoint_position initialized [ INFO] [1726594796.477515898]: Plugin setpoint_raw loaded [ INFO] [1726594796.482752291]: Plugin setpoint_raw initialized [ INFO] [1726594796.482866248]: Plugin setpoint_trajectory loaded [ INFO] [1726594796.492653679]: Plugin setpoint_trajectory initialized [ INFO] [1726594796.492846750]: Plugin setpoint_velocity loaded [ INFO] [1726594796.497461849]: Plugin setpoint_velocity initialized [ INFO] [1726594796.497638149]: Plugin sys_status loaded [ INFO] [1726594796.504055413]: Plugin sys_status initialized [ INFO] [1726594796.504612906]: Plugin sys_time loaded [ INFO] [1726594796.508017864]: TM: Timesync mode: MAVLINK [ INFO] [1726594796.508257809]: TM: Not publishing sim time [ INFO] [1726594796.511214751]: Plugin sys_time initialized [ INFO] [1726594796.511329490]: Plugin terrain loaded [ INFO] [1726594796.511699329]: Plugin terrain initialized [ INFO] [1726594796.511778703]: Plugin trajectory loaded [ INFO] [1726594796.515814330]: Plugin trajectory initialized [ INFO] [1726594796.516015682]: Plugin tunnel loaded [ INFO] [1726594796.518193207]: Plugin tunnel initialized [ INFO] [1726594796.518302685]: Plugin vfr_hud loaded [ INFO] [1726594796.518638514]: Plugin vfr_hud initialized [ INFO] [1726594796.518673565]: Plugin vibration blacklisted [ INFO] [1726594796.518738512]: Plugin vision_pose_estimate loaded [ INFO] [1726594796.522767890]: Plugin vision_pose_estimate initialized [ INFO] [1726594796.522845337]: Plugin vision_speed_estimate loaded [ INFO] [1726594796.527713297]: Plugin vision_speed_estimate initialized [ INFO] [1726594796.527866004]: Plugin waypoint loaded [ INFO] [1726594796.530877112]: Plugin waypoint initialized [ INFO] [1726594796.530930341]: Plugin wheel_odometry blacklisted [ INFO] [1726594796.531022006]: Plugin wind_estimation loaded [ INFO] [1726594796.533300989]: Plugin wind_estimation initialized [ INFO] [1726594796.533477028]: Built-in SIMD instructions: ARM NEON [ INFO] [1726594796.533580933]: Built-in MAVLink package version: 2022.12.30 [ INFO] [1726594796.533718275]: Known MAVLink dialects: common ardupilotmega ASLUAV AVSSUAS all cubepilot development icarous matrixpilot paparazzi standard storm32 uAvionix ualberta [ INFO] [1726594796.533843221]: MAVROS started. MY ID 1.240, TARGET ID 1.1 [ INFO] [1726594796.534121030]: udp0: Remote address: 127.0.0.1:48652 [ INFO] [1726594796.537097921]: RC_CHANNELS message detected! [ INFO] [1726594796.537972285]: IMU: High resolution IMU detected! [ INFO] [1726594796.538613787]: IMU: Attitude quaternion IMU detected! [ WARN] [1726594796.539202009]: GP: No GPS fix [ INFO] [1726594797.117976826]: CON: Got HEARTBEAT, connected. FCU: PX4 Autopilot [ INFO] [1726594797.134853701]: RC_CHANNELS message detected! [ INFO] [1726594797.139449112]: IMU: High resolution IMU detected! [ INFO] [1726594797.177394945]: IMU: Attitude quaternion IMU detected! [ INFO] [1726594798.137137651]: GF: Using MISSION_ITEM_INT [ INFO] [1726594798.137605771]: RP: Using MISSION_ITEM_INT [ INFO] [1726594798.137778321]: WP: Using MISSION_ITEM_INT [ INFO] [1726594798.138168680]: VER: 1.1: Capabilities 0x000000000000ecff [ INFO] [1726594798.138370188]: VER: 1.1: Flight software: 010e0000 (636ffefcb102004d) [ INFO] [1726594798.138766017]: VER: 1.1: Middleware software: 010e0000 (636ffefcb1000000) [ INFO] [1726594798.138908619]: VER: 1.1: OS software: 04137dff (3f77354c0dc88793) [ INFO] [1726594798.139093200]: VER: 1.1: Board hardware: 00000001 [ INFO] [1726594798.139228511]: VER: 1.1: VID/PID: 0000:0000 [ INFO] [1726594798.139464446]: VER: 1.1: UID: 5649414c324c584f [ WARN] [1726594798.139942200]: CMD: Unexpected command 520, result 0 [ INFO] [1726594801.249404137]: waiting for offboard mode [ INFO] [1726594807.120839499]: HP: requesting home position [ INFO] [1726594809.199350808]: arming **[ INFO] [1726594809.213191783]: Vehicle failed to arm** [mavros_test_node-3] process has finished cleanly log file: /home/root/.ros/log/d9e22bd2-751b-11ef-bd2d-00c0cab5abe5/mavros_test_node-3*.log [ INFO] [1726594812.119727325]: GF: mission received [ INFO] [1726594812.123151814]: RP: mission received [ INFO] [1726594812.123413165]: WP: mission received
The only way that I can arm the drone is when I am using RC (I put it on "manual" mode, and then use the QGC bar to arb the drone! Check the attached photo!
-
@Captain-7th Are you able to arm and fly in position mode? According to the mavros state you are connected and the printout shows that the arming command is sent to the vehicle while in offboard, but it is possible there is a preflight check that is failing?
-
Yes, while I am in manual mode, I can arm and disarm the drone with using ROS command using mavros services. But, when I switch back to offboard mode, I get a message that arming/disarming failed!
The process for arming/disarming is like this:
- With the transmitter, I change the mode to the manual.
- launch the roscore
- launch px4 and mavros:
roslaunch mavros px4.launch fcu_url:=udp://127.0.0.1:14551@127.0.0.1:14551
- run this script :
#!/usr/bin/env python import rospy from geometry_msgs.msg import TwistStamped from mavros_msgs.srv import CommandBool, SetMode def move_drone(): rospy.init_node('move_drone', anonymous=True) # Service proxies for arming and setting the mode rospy.wait_for_service('/mavros/cmd/arming') rospy.wait_for_service('/mavros/set_mode') try: arm_service = rospy.ServiceProxy('/mavros/cmd/arming', CommandBool) set_mode_service = rospy.ServiceProxy('/mavros/set_mode', SetMode) except rospy.ServiceException as e: rospy.logerr("Service proxy failed: %s" % e) return # Arm the drone arm_request = arm_service(True) if arm_request.success: rospy.loginfo("Drone armed successfully") else: rospy.logerr("Failed to arm the drone") return # Set to OFFBOARD mode set_mode_request = set_mode_service(custom_mode='OFFBOARD') if set_mode_request.mode_sent: rospy.loginfo("OFFBOARD mode set") else: rospy.logerr("Failed to set OFFBOARD mode") return # Publisher for velocity commands vel_pub = rospy.Publisher('/mavros/setpoint_velocity/cmd_vel', TwistStamped, queue_size=10) rate = rospy.Rate(10) # 10 Hz # Prepare the velocity message vel_msg = TwistStamped() vel_msg.twist.linear.x = 0 vel_msg.twist.linear.y = 0 # Move up for 5 seconds rospy.loginfo("Moving up") vel_msg.twist.linear.z = 1.0 # Positive Z is upwards for i in range(100): vel_msg.header.stamp = rospy.Time.now() vel_pub.publish(vel_msg) rate.sleep() # Hover for 2 seconds rospy.loginfo("Hovering") vel_msg.twist.linear.z = 0.0 for i in range(100): vel_msg.header.stamp = rospy.Time.now() vel_pub.publish(vel_msg) rate.sleep() # Move down for 5 seconds rospy.loginfo("Moving down") vel_msg.twist.linear.z = -1.0 # Negative Z is downwards for i in range(100): vel_msg.header.stamp = rospy.Time.now() vel_pub.publish(vel_msg) rate.sleep() # Land the drone rospy.loginfo("Landing") set_mode_service(custom_mode='AUTO.LAND') if __name__ == '__main__': try: move_drone() except rospy.ROSInterruptException: pass
The drone start arming and motors are working, but the drone does not goes up! I am installed the propellers properly and have been already double checked!
-
Manual mode is not really representative of the ability to switch into offboard mode and send setpoints. You will need to be able to arm in position or hold mode first. If you do not have an rc controller then try to arm in hold mode. If you are not able to arm in either mode, then there is a preflight check fail somewhere that needs to be addressed first.