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

Offboard Mode not Switching after Arming #13799

Closed
hsilvaga opened this issue Dec 28, 2019 · 7 comments
Closed

Offboard Mode not Switching after Arming #13799

hsilvaga opened this issue Dec 28, 2019 · 7 comments
Labels
bug Mode: Offboard Offboard mode control

Comments

@hsilvaga
Copy link

hsilvaga commented Dec 28, 2019

Issue: Switching to offboard after arming sets off error on real-world Drone, however switching straight into offboard is possible

Steps:

  1. ROS_Node is run that:
    1.Arms drone
    2. Then sends stream of setpoints
    3. Switches to offboard mode
  2. Warning is displayed on PX4 log
    [ WARN] [1577568026.571076614]: CMD: Unexpected command 176, result 0
  3. While the drone is still armed and receiving setpoints, switching to offboard via RC is possible but exits after a split second.

PX4 LOG:

NODES
  /
    mavros (mavros/mavros_node)

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

setting /run_id to ae23efc6-29b7-11ea-8058-00044be6704f
WARNING: Package name "Drone" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
WARNING: Package name "schoolThings" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
process[rosout-1]: started with pid [9882]
started core service [/rosout]
process[mavros-2]: started with pid [9890]
[ INFO] [1577567950.983533636]: FCU URL: /dev/ttyACM0:57600
[ INFO] [1577567950.993841604]: serial0: device: /dev/ttyACM0 @ 57600 bps
[ INFO] [1577567950.996088252]: GCS bridge disabled
[ INFO] [1577567951.195053799]: Plugin 3dr_radio loaded
[ INFO] [1577567951.205287286]: Plugin 3dr_radio initialized
[ INFO] [1577567951.205849430]: Plugin actuator_control loaded
[ INFO] [1577567951.218821136]: Plugin actuator_control initialized
[ INFO] [1577567951.349121587]: Plugin adsb loaded
[ INFO] [1577567951.360487747]: Plugin adsb initialized
[ INFO] [1577567951.361059891]: Plugin altitude loaded
[ INFO] [1577567951.364989586]: Plugin altitude initialized
[ INFO] [1577567951.365421988]: Plugin cam_imu_sync loaded
[ INFO] [1577567951.367913849]: Plugin cam_imu_sync initialized
[ INFO] [1577567951.368404637]: Plugin command loaded
[ INFO] [1577567951.387956755]: Plugin command initialized
[ INFO] [1577567951.388408532]: Plugin companion_process_status loaded
[ INFO] [1577567951.393551110]: Plugin companion_process_status initialized
[ INFO] [1577567951.393931220]: Plugin debug_value loaded
[ INFO] [1577567951.405495612]: Plugin debug_value initialized
[ INFO] [1577567951.405627437]: Plugin distance_sensor blacklisted
[ INFO] [1577567951.406209217]: Plugin fake_gps loaded
[ INFO] [1577567951.434577196]: Plugin fake_gps initialized
[ INFO] [1577567951.435246633]: Plugin ftp loaded
[ INFO] [1577567951.457281027]: Plugin ftp initialized
[ INFO] [1577567951.457754368]: Plugin global_position loaded
[ INFO] [1577567951.496433856]: Plugin global_position initialized
[ INFO] [1577567951.496840737]: Plugin gps_rtk loaded
[ INFO] [1577567951.502291809]: Plugin gps_rtk initialized
[ INFO] [1577567951.502772858]: Plugin hil loaded
[ INFO] [1577567951.535181679]: Plugin hil initialized
[ INFO] [1577567951.535688874]: Plugin home_position loaded
[ INFO] [1577567951.545151777]: Plugin home_position initialized
[ INFO] [1577567951.545810537]: Plugin imu loaded
[ INFO] [1577567951.564496287]: Plugin imu initialized
[ INFO] [1577567951.565104525]: Plugin landing_target loaded
[ INFO] [1577567951.607008645]: Plugin landing_target initialized
[ INFO] [1577567951.607483444]: Plugin local_position loaded
[ INFO] [1577567951.622882426]: Plugin local_position initialized
[ INFO] [1577567951.623460039]: Plugin log_transfer loaded
[ INFO] [1577567951.633395970]: Plugin log_transfer initialized
[ INFO] [1577567951.633889258]: Plugin manual_control loaded
[ INFO] [1577567951.640757330]: Plugin manual_control initialized
[ INFO] [1577567951.641162076]: Plugin mocap_pose_estimate loaded
[ INFO] [1577567951.649337303]: Plugin mocap_pose_estimate initialized
[ INFO] [1577567951.650025907]: Plugin mount_control loaded
[ INFO] [1577567951.659725897]: Plugin mount_control initialized
[ INFO] [1577567951.660209498]: Plugin obstacle_distance loaded
[ INFO] [1577567951.667647579]: Plugin obstacle_distance initialized
[ INFO] [1577567951.668090138]: Plugin odom loaded
[ INFO] [1577567951.678262270]: Plugin odom initialized
[ INFO] [1577567951.678733839]: Plugin onboard_computer_status loaded
[ INFO] [1577567951.685217322]: Plugin onboard_computer_status initialized
[ INFO] [1577567951.685845353]: Plugin param loaded
[ INFO] [1577567951.695682949]: Plugin param initialized
[ INFO] [1577567951.696142018]: Plugin px4flow loaded
[ INFO] [1577567951.711075160]: Plugin px4flow initialized
[ INFO] [1577567951.711207089]: Plugin rangefinder blacklisted
[ INFO] [1577567951.711747565]: Plugin rc_io loaded
[ INFO] [1577567951.721560994]: Plugin rc_io initialized
[ INFO] [1577567951.721872822]: Plugin safety_area blacklisted
[ INFO] [1577567951.722344131]: Plugin setpoint_accel loaded
[ INFO] [1577567951.729847734]: Plugin setpoint_accel initialized
[ INFO] [1577567951.730641131]: Plugin setpoint_attitude loaded
[ INFO] [1577567951.754769307]: Plugin setpoint_attitude initialized
[ INFO] [1577567951.755314680]: Plugin setpoint_position loaded
[ INFO] [1577567951.792490916]: Plugin setpoint_position initialized
[ INFO] [1577567951.793004986]: Plugin setpoint_raw loaded
[ INFO] [1577567951.814774845]: Plugin setpoint_raw initialized
[ INFO] [1577567951.815367042]: Plugin setpoint_trajectory loaded
[ INFO] [1577567951.828349581]: Plugin setpoint_trajectory initialized
[ INFO] [1577567951.828841255]: Plugin setpoint_velocity loaded
[ INFO] [1577567951.842054995]: Plugin setpoint_velocity initialized
[ INFO] [1577567951.843149752]: Plugin sys_status loaded
[ INFO] [1577567951.870197398]: Plugin sys_status initialized
[ INFO] [1577567951.870785272]: Plugin sys_time loaded
[ INFO] [1577567951.885222833]: TM: Timesync mode: MAVLINK
[ INFO] [1577567951.888833200]: Plugin sys_time initialized
[ INFO] [1577567951.889287217]: Plugin trajectory loaded
[ INFO] [1577567951.901037967]: Plugin trajectory initialized
[ INFO] [1577567951.901510422]: Plugin vfr_hud loaded
[ INFO] [1577567951.903667694]: Plugin vfr_hud initialized
[ INFO] [1577567951.903790768]: Plugin vibration blacklisted
[ INFO] [1577567951.904182753]: Plugin vision_pose_estimate loaded
[ INFO] [1577567951.921912083]: Plugin vision_pose_estimate initialized
[ INFO] [1577567951.922364329]: Plugin vision_speed_estimate loaded
[ INFO] [1577567951.930803779]: Plugin vision_speed_estimate initialized
[ INFO] [1577567951.931347746]: Plugin waypoint loaded
[ INFO] [1577567951.946356617]: Plugin waypoint initialized
[ INFO] [1577567951.946555422]: Plugin wheel_odometry blacklisted
[ INFO] [1577567951.946993710]: Plugin wind_estimation loaded
[ INFO] [1577567951.949341246]: Plugin wind_estimation initialized
[ INFO] [1577567951.949515519]: Autostarting mavlink via USB on PX4
[ INFO] [1577567951.949883858]: Built-in SIMD instructions: ARM NEON
[ INFO] [1577567951.949976047]: Built-in MAVLink package version: 2019.12.12
[ INFO] [1577567951.950076465]: Known MAVLink dialects: common ardupilotmega ASLUAV autoquad icarous matrixpilot paparazzi slugs standard uAvionix ualberta
[ INFO] [1577567951.950150789]: MAVROS started. MY ID 1.240, TARGET ID 1.1
[ INFO] [1577567951.968636432]: IMU: High resolution IMU detected!
[ INFO] [1577567951.970489637]: IMU: Attitude quaternion IMU detected!
[ INFO] [1577567951.993582432]: RC_CHANNELS message detected!
[ INFO] [1577567952.201876088]: CON: Got HEARTBEAT, connected. FCU: PX4 Autopilot
[ INFO] [1577567952.211798008]: IMU: High resolution IMU detected!
[ INFO] [1577567952.213290322]: IMU: Attitude quaternion IMU detected!
[ INFO] [1577567952.240405106]: RC_CHANNELS message detected!
[ERROR] [1577567952.856373856]: FCU: REJECT POSITION CONTROL
[ERROR] [1577567952.907173683]: FCU: Manual control lost
[ INFO] [1577567952.955694726]: FCU: Manual control regained after 669ms
[ERROR] [1577567953.005133803]: FCU: Manual control lost
[ INFO] [1577567953.056567233]: FCU: Manual control regained after 588ms
[ INFO] [1577567953.216666518]: VER: 1.1: Capabilities         0x000000000000e4ef
[ INFO] [1577567953.218138936]: VER: 1.1: Flight software:     010a00ff (4f6faac2c8000000)
[ INFO] [1577567953.220683297]: VER: 1.1: Middleware software: 010a00ff (4f6faac2c8000000)
[ INFO] [1577567953.222034515]: VER: 1.1: OS software:         071d00ff (427238133be2b0ec)
[ INFO] [1577567953.223093281]: VER: 1.1: Board hardware:      00000011
[ INFO] [1577567953.223882147]: VER: 1.1: VID/PID:             26ac:0011
[ INFO] [1577567953.225017008]: VER: 1.1: UID:                 3337510e31303337
[ WARN] [1577567953.225645507]: CMD: Unexpected command 520, result 0
[ INFO] [1577567955.492892913]: FCU: Manual control regained after 3890ms
[ WARN] [1577567956.340414471]: GP: No GPS fix
[ INFO] [1577567962.203184899]: HP: requesting home position
[ INFO] [1577567967.215087572]: WP: mission received
[ INFO] [1577567972.203889482]: HP: requesting home position
[ INFO] [1577567982.202857996]: HP: requesting home position
[ WARN] [1577567986.446954895]: GP: No GPS fix
[ INFO] [1577567992.203256429]: HP: requesting home position
[ INFO] [1577567999.609928479]: FCU: [logger] file: /fs/microsd/log/2019-12-28/21_19_5
[ INFO] [1577568002.203472254]: HP: requesting home position
[ INFO] [1577568012.203384429]: HP: requesting home position
[ WARN] [1577568016.455092484]: GP: No GPS fix
[ INFO] [1577568018.183989078]: FCU: ARMED by Arm/Disarm component command
[ INFO] [1577568018.230233264]: FCU: [logger] file: /fs/microsd/log/2019-12-28/21_20_1
[ INFO] [1577568022.202710866]: HP: requesting home position
[ WARN] [1577568026.571076614]: CMD: Unexpected command 176, result 0
[ INFO] [1577568028.180467556]: FCU: DISARMED by Auto disarm initiated
[ INFO] [1577568032.202880597]: HP: requesting home position
[ INFO] [1577568042.203011109]: HP: requesting home position
^C[mavros-2] killing on exit
Debug:   mavconn: serial0: recv: v2.0 !CRC Message-Id: 111 [13 bytes] IDs: 1.1 Seq: 147
Debug:   mavconn: serial0: recv: v2.0 !CRC Message-Id: 65 [42 bytes] IDs: 1.1 Seq: 148
Debug:   mavconn: serial0: recv: v2.0 !CRC Message-Id: 141 [32 bytes] IDs: 1.1 Seq: 149
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

Drone Description:
-QuadCopter
-PX4
-Jetson Nano companion
Additional context
Add any other context about the problem here.

**Code used for the ROS_NODE works in Gazebo simulation

@julianoes
Copy link
Contributor

Thanks for the report. I have seen similar complaints. Have you found a solution or workaround?
I still need to understand what is going on.

@julianoes julianoes added bug Mode: Offboard Offboard mode control labels Jan 30, 2020
@stale
Copy link

stale bot commented Apr 29, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Apr 29, 2020
@DiegoHerrera1890
Copy link

Hello! I am facing the same issue. Is there an answer?

@stale stale bot removed the stale label Feb 3, 2021
@hsilvaga
Copy link
Author

hsilvaga commented Feb 4, 2021

Not a solution but more of a workaround... I reverted the pixhawk firmware to version 1.10.0 and that seemed to fixed my issue.

@Jaeyoung-Lim
Copy link
Member

@hsilvaga Looking at your log outputs such as

ERROR] [1577567952.856373856]: FCU: REJECT POSITION CONTROL
[ WARN] [1577567986.446954895]: GP: No GPS fix

You don't have a valid position estimate. Therefore you cannot use position/velocity setpoints

@ninja-hu
Copy link

I saw a similar error for the latest stable build v1.12.0. Manual flight seems to work fine, but the offboard command is rejected when using mavros.

I then reverted to v1.11.0 and it worked. Haven't tried other versions yet.

@julianoes
Copy link
Contributor

I'm going to close this. Please comment again if this is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Mode: Offboard Offboard mode control
Projects
None yet
Development

No branches or pull requests

5 participants