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

Low mass is causing UAV to climb on arming #42

Closed
sytelus opened this issue Oct 20, 2016 · 12 comments
Closed

Low mass is causing UAV to climb on arming #42

sytelus opened this issue Oct 20, 2016 · 12 comments

Comments

@sytelus
Copy link

sytelus commented Oct 20, 2016

Recently @kd0aij made a change to set the default mass to 0.8 from 1.0. See below line:

https://github.com/PX4/jMAVSim/blob/master/src/me/drton/jmavsim/Simulator.java#L309

To reproduce issue:

  1. Connect Pixhawk board to PC via USB.
  2. Start jMavSim in HIL mode using the command line: `java -Djava.ext.dirs= -cp lib/*;out/production/jmavsim.jar me.drton.jmavsim.Simulator -serial COM4 115200 -qgc'
  3. Start qGroundControl and arm.
  4. Watch quadcopter climb just on arming.
  5. Change the mass to 1 or 1.2. Repeat the steps above to see vehicle doesn't climb on arm.

Log file:
low_mass.zip

Recommandation:
Add switch for iris and 0.8 mass and leave the default to 1 or 1.2 that works with SITL as well as HIL default setup.

@sytelus sytelus changed the title Low mass is causing UAV to climb on ARM Low mass is causing UAV to climb on arming Oct 20, 2016
@kd0aij
Copy link

kd0aij commented Oct 20, 2016

Can you provide a log generated by sdlog2 or the new logger?
Do you see the same problems in SITL?

@bkueng
Copy link
Member

bkueng commented Oct 20, 2016

I was able to reproduce, it climbes with HITL, but not with SITL.
But I'm not sure if changing the mass is the right solution. @kd0aij can you reproduce?

@kd0aij
Copy link

kd0aij commented Oct 20, 2016

Do you get no flight log with HIL? It would be less work for me to analyze a log than to set up a HIL run.

@bkueng
Copy link
Member

bkueng commented Oct 20, 2016

I thought you had this working. Here's a log: http://logs.uaventure.com/view/ZXXowDSpCugMJXjoLfHN4X

@kd0aij
Copy link

kd0aij commented Oct 20, 2016

Wow, that log has no data on thrust, RC inputs or actuator outputs. As far as I can tell nothing should be happening at all.

@kd0aij
Copy link

kd0aij commented Oct 20, 2016

@sytelus I don't know how you're commanding the thrust level in your HIL setup, but the mavlink log shows that the only non-zero actuator_control_target is 0.68. If that's the thrust level, then it's no wonder that the quad is taking off.

@sytelus
Copy link
Author

sytelus commented Oct 20, 2016

I'm not doing anything about commanding the thrust level. My setup is everything with its defaults. After launching jMavLink, I just go to qGroundControl and arm the vehicle. That's all I do. The problem is reproducible even if you don't connect RC to pixhawk board.

One thing that is different in HIL and SITL is airframe. For HIL, I set the Airframe to Simulation > HIL Quadcopter X. For SITL, I think the default airframe is something else.

@kd0aij
Copy link

kd0aij commented Oct 20, 2016

Then neither one of us knows what thrust level has been commanded. Why do you expect it to stay on the ground then?

@sytelus
Copy link
Author

sytelus commented Oct 20, 2016

As I'd mentioned, I'm using qGroundControl to arm the vehicle by sliding the switch. There is nothing else I'm doing to send any thrust commands. My setup is simple HIL with everything default. The only additional thing is setting airframe to Simulation > HIL Quadrotor X as per the readme instructions. It is clear that problem is not occurring without your change and is occurring with your change. I would suggest to test your changes with HIL first and then push your changes.

@mhkabir
Copy link
Member

mhkabir commented Oct 22, 2016

The the difference here is that @sytelus and the others having issues don't have an RC unit or other input. @kd0aij has an RC connected.

@kd0aij could you check the behaviour without any RC input?

@julianoes
Copy link

This is nothing about a wrong mass but the issue is that the actuator scaling is wrong (or at least different for SITL vs. HITL right now.

A fix is coming up: #45, PX4/PX4-Autopilot#5716.

@LorenzMeier
Copy link
Member

Fixed.

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

6 participants