PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.54k stars 13.53k forks source link

HITL/HIL: disable lockdown not working #14069

Open gian1312 opened 4 years ago

gian1312 commented 4 years ago

Describe the bug Same behavior as in #5680. When disabling the lockdown with the px4io lockdown disable command, there is no output to the real actuators in HIL-mode.

To Reproduce Steps to reproduce the behavior:

  1. Power Servo Rail and make sure that all CS and props can move freely (and the plane is secured)
  2. Start in HIL-Mode
  3. Arm Plane
  4. Enter said command
  5. Move your TX (Ideally something would happen)

Expected behavior I want the actuators to move in Gazebo and on the real plane simultaneously. At the moment, they work either in HIL in Gazebo or in reality with HIL disabled.

Log Files and Screenshots There are no log files. If there is anything, I could provide, please let me know.

Drone: Fixed Wing (MPX Easy Glider)

gian1312 commented 4 years ago

Are there any inputs/ideas how I could fix this?

julianoes commented 4 years ago

I think you would have to debug (using a console connected and printf) your way through all the lockdown flags, or if it's correct on the FMU side, inspect the pxi4ofirmware code: https://github.com/PX4/Firmware/tree/master/src/modules/px4iofirmware

stale[bot] commented 4 years ago

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

gian1312 commented 4 years ago

Has it been addressed yet?

Mjohn1108 commented 4 years ago

yeah, same problem here i want to do HIL simulation with the servos and motors actually running. With piccolo servos and motors are working perfectly in HIL. We want to see the actual behavior of the plane.

stale[bot] commented 4 years ago

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

gian1312 commented 4 years ago

Has it been addressed yet?

ghost commented 4 years ago

I got it working. This is what I did: 1) I used the latest px4 firmware (v1.11.1 - also works on current master branch) 2) I only changed one file (state_machine_helper.cpp): Commented the line armed->lockdown = true; inside if (hil_enabled) { block 3) I compiled, built and then uploaded this firmware in QGC v3.5.6 4) In QGC I disabled HITL then rebooted vehicle and then selected Standard-Plane as the airframe 5) I pressed the safety switch to check if my servos are working as per the radio control. 6) Then, I enabled HITL, again rebooted the vehicle and selected 'HIL-Star' as my airframe.

Note: At this point, the servos should still be active and controlled by radio.

7) I launched XPlane-11 and started a flight 8) In QGC, I opened the HIL widget to connect with X-Plane 11 9) Then, I armed the vehicle

After arming; the real servos and the X-Plane aircraft wings should both be working and you should also be able to fly the plane using the radio.

I hope this helps someone.

MuneebaAsif1 commented 8 months ago

Honestly, I keep seeing this one comment regarding v 1.11.1 everywhere, but it does NOT work. Does anyone have a working solution?

julianoes commented 8 months ago

v1.11.1 is ancient. I doubt anyone is going to help with that.

MuneebaAsif1 commented 8 months ago

Yes, I am using 1.13.3 with QGC v4.3.0. How do I enable motor actuation with HITL that I can observe on both the hardware and jMAVsim?

NanyongGit commented 8 months ago

Looking for a solution as well to get the motors running... Anyone got anything?

DronecodeBot commented 8 months ago

This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-v1-14-v1-13-hitl-actual-motors-spinning/37437/1