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

Unable to arm sitl px4 using mavros (works in QGC) #406

Closed
jojo-le-pirate opened this issue Oct 22, 2015 · 1 comment
Closed

Unable to arm sitl px4 using mavros (works in QGC) #406

jojo-le-pirate opened this issue Oct 22, 2015 · 1 comment

Comments

@jojo-le-pirate
Copy link

Hi everyone!
I am running px4 in sitl mode in a virtualbox environment, hooked up with jMAVSim.
Mavros is running correctly, receives the heartbeats from the simulated px4.
QGC is even connected to px4 using mavros' proxy port.
QGC works correctly, i can arm the px4 or do whatever I want.
When trying to arm the px4 with mavros by running:
rosrun mavros mavsafety arm
I get the error
Request failed. Check mavros logs
If I try
rosservice call /mavros/cmd/arming "value: true"
I get success: false result 4

Nothing happens in the px4 terminal when those commands are issued.
I am using the latest git version of everything.

mavros is launched using roslaunch mavros px4.launch

I have exactly the same problem as in #283 except I am running a simulated px4 (software in the loop).

Thank you for your help!

rostopic echo -n1 /diagnostics` yields:

`header: 
  seq: 371
  stamp: 
    secs: 1445527373
    nsecs: 260117542
  frame_id: ''
status: 
  - 
    level: 0
    name: mavros: FCU connection
    message: connected
    hardware_id: udp://:14556@192.168.0.10:14556
    values: 
      - 
        key: Received packets:
        value: 3446
      - 
        key: Dropped packets:
        value: 0
      - 
        key: Buffer overruns:
        value: 0
      - 
        key: Parse errors:
        value: 0
      - 
        key: Rx sequence number:
        value: 11
      - 
        key: Tx sequence number:
        value: 42
      - 
        key: Rx total bytes:
        value: 12615499
      - 
        key: Tx total bytes:
        value: 12615523
      - 
        key: Rx speed:
        value: 32478.000000
      - 
        key: Tx speed:
        value: 32502.000000
  - 
    level: 0
    name: mavros: GCS bridge
    message: connected
    hardware_id: udp://:14556@192.168.0.10:14556
    values: 
      - 
        key: Received packets:
        value: 3446
      - 
        key: Dropped packets:
        value: 0
      - 
        key: Buffer overruns:
        value: 0
      - 
        key: Parse errors:
        value: 0
      - 
        key: Rx sequence number:
        value: 11
      - 
        key: Tx sequence number:
        value: 0
      - 
        key: Rx total bytes:
        value: 12615470
      - 
        key: Tx total bytes:
        value: 12615470
      - 
        key: Rx speed:
        value: 32478.000000
      - 
        key: Tx speed:
        value: 32478.000000
  - 
    level: 2
    name: mavros: GPS
    message: No satellites
    hardware_id: udp://:14556@192.168.0.10:14556
    values: 
      - 
        key: Satellites visible
        value: 0
      - 
        key: Fix type
        value: 0
      - 
        key: EPH (m)
        value: Unknown
      - 
        key: EPV (m)
        value: Unknown
  - 
    level: 0
    name: mavros: Heartbeat
    message: Normal
    hardware_id: udp://:14556@192.168.0.10:14556
    values: 
      - 
        key: Heartbeats since startup
        value: 4756
      - 
        key: Frequency (Hz)
        value: 8.928667
      - 
        key: Vehicle type
        value: Onboard-Controller
      - 
        key: Autopilot type
        value: INVALID
      - 
        key: Mode
        value: CMODE(0)
      - 
        key: System status
        value: Active
  - 
    level: 0
    name: mavros: System
    message: Normal
    hardware_id: udp://:14556@192.168.0.10:14556
    values: 
      - 
        key: Sensor present
        value: 0x00000000
      - 
        key: Sensor enabled
        value: 0x00000000
      - 
        key: Sensor helth
        value: 0x00000000
      - 
        key: CPU Load (%)
        value: 0.0
      - 
        key: Drop rate (%)
        value: 0.0
      - 
        key: Errors comm
        value: 0
      - 
        key: Errors count #1
        value: 0
      - 
        key: Errors count #2
        value: 0
      - 
        key: Errors count #3
        value: 0
      - 
        key: Errors count #4
        value: 0
  - 
    level: 2
    name: mavros: Battery
    message: No data
    hardware_id: udp://:14556@192.168.0.10:14556
    values: 
      - 
        key: Voltage
        value: -1.00
      - 
        key: Current
        value: 0.0
      - 
        key: Remaining
        value: 0.0
  - 
    level: 2
    name: mavros: Time Sync
    message: No events recorded.
    hardware_id: udp://:14556@192.168.0.10:14556
    values: 
      - 
        key: Timesyncs since startup
        value: 0
      - 
        key: Frequency (Hz)
        value: 0.000000
      - 
        key: Last dt (ms)
        value: 5.549022
      - 
        key: Mean dt (ms)
        value: 0.000000
      - 
        key: Last system time (s)
        value: 1445527110.060583830
      - 
        key: Time offset (s)
        value: 237.567260241

---
@jojo-le-pirate jojo-le-pirate changed the title Unable to arm using mavros (works in QGC) Unable to arm sitl px4 using mavros (works in QGC) Oct 22, 2015
@vooon
Copy link
Member

vooon commented Oct 31, 2015

Please check console output from px4.launch (mavros log).
Usually when arm is failing there some messages FCU: which describe problem (coming from autopilot).
Especially look at prearm messages.

@vooon vooon closed this as completed Nov 3, 2015
nmichael pushed a commit to rislab/mavros that referenced this issue Mar 19, 2016
PX4 now has more mainstate modes than colours available in mavkml.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants