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

HITL jmavsim fail #11203

Closed
yiwc opened this issue Jan 13, 2019 · 9 comments
Closed

HITL jmavsim fail #11203

yiwc opened this issue Jan 13, 2019 · 9 comments
Assignees
Labels
bug Sim: HITL hardware in the loop simulation

Comments

@yiwc
Copy link

yiwc commented Jan 13, 2019

Describe the bug
I follow http://dev.px4.io/en/simulation/hitl.html
but meet error.
It can obviously get RC signal, I can easily see it arm and disarm in the qground. I can also see it
'MSG: Landing detected'
and
'MSG: Takeoff detected',when I control my RC controller.
but virtual copter moves nothing in the Jmavsim simulator. Virtual copter keeps staying still.

I tested it indoors, is it a problem about GPS thing? If is, why there is also no reponse in Z direction.

Expected behavior
Virtual copter moves as I control with RC Controller.

Log Files and Screenshots
Always provide a link to the flight log file:

Here's the flight log.
test log 5
test log 4
test log 3
test log 2
test log 1

screenshots
2019-01-13 22-32-10

Additional context
Thanks for your team's work

@julianoes julianoes self-assigned this Jan 17, 2019
@julianoes julianoes added the bug label Jan 17, 2019
@julianoes
Copy link
Contributor

What target have you flashed on your hardware? Could it be px4_fmu-v2_default?

@julianoes julianoes added unconfirmed Sim: HITL hardware in the loop simulation labels Jan 17, 2019
@yiwc
Copy link
Author

yiwc commented Jan 17, 2019

What target have you flashed on your hardware? Could it be px4_fmu-v2_default?

Thank you for focusing on my problem.

I flashed px4_fmu-v2_default . Because my hardware is Pixhawker.(pixhawk1)

@julianoes
Copy link
Contributor

Ok, so the problem is that for v2 there is not enough flash space. What you have to do is to enable pwm_out_sim here:
https://github.com/PX4/Firmware/blob/ef54bff4ed45755b4762ef58db21fa37d612d44e/boards/px4/fmu-v2/default.cmake#L50

Then it will overflow of space, so you need to deactivate some other modules such as fixedwing (fw_) or vtol (vtol_).

@julianoes
Copy link
Contributor

Also, you can check if you really do have the silicon errata which limits you to 1MB of flash instead of 2MB by doing ver all in nsh>.

More info here:
https://docs.px4.io/en/flight_controller/silicon_errata.html#fmuv2--pixhawk-silicon-errata
https://docs.px4.io/en/advanced_config/bootloader_update.html

@yiwc
Copy link
Author

yiwc commented Jan 17, 2019

Thanks
I follow your advise, unfortunately it doesn't work.
It still have somehow problem.
CRITICAL NAVIGATION FAILURE - CHECK SENSOR CALIBR
2019-01-17 19-39-30

PS.

  1. I try to update bootloader, it still be v2. I guess it can't be updated to v3.
  2. My hardware has 2mb flash, I use
    make px4_fmu-v3_default force-upload and
    make px4_fmu-v2_default force-upload (for overflowed v2).
    But both failed in CRITICAL NAVIGATION FAILURE - CHECK SENSOR CALIBR

@julianoes
Copy link
Contributor

You have this problem #11179.

@yiwc
Copy link
Author

yiwc commented Jan 17, 2019

Amazing, I follow your advice:
1.Enable pwm_out_sim. 2.And I pull the latest PX4 Firmware as told in #11179 #11104
The virtual copter successful flied!

BUT, there is a strange thing.
HITL only works when it is the first time HITL after flash new firmware. Strange, right?
It's like this
| flash Firmware
| HITL (working!)
MSG: RECOVERING FROM FMU IN-AIR RESTART MSG:Failed to recover from in-air restart (1), abort MSG:RECOVERING FROM FMU IN-AIR RESTART MSG:ARMED by arm/disarm component command MSG:Failsafe enabled:no RC Init MAVLink
And after arm, it works fine!
Working status Screenshot
2019-01-17 22-28-03

| close HITL, and reboot vehicle
| HITL (not working)
2019-01-17 22-18-14

| reboot again
| HITL (never working again)

Based upon: v2, I use make xxx force-upload to upload it. (my hardware has 2mb flash)

-----------------------Line----------------

I use
make px4_fmu-v3_default upload HITL works.(I can use v3, because i followed update bootloader. Evan though QGround still shows I'm using fmu_v2, but when I 'make px4_fmu-v2_default upload' It tells me should use "px4_fmu-v3_default")

Anyway, HITL works anytime! So it solved for me.
Thanks for your help.
If interesting, strange problem above the --line-- can be looked into.

@julianoes
Copy link
Contributor

| HITL (not working)

When HITL is not working, does also unplugging it and re-plugging it not work?

@stale
Copy link

stale bot commented Jun 24, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Sim: HITL hardware in the loop simulation
Projects
None yet
Development

No branches or pull requests

2 participants