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

Question about topic mavros/imu/atm_pressure #608

Closed
JM-SNU opened this issue Sep 29, 2016 · 10 comments
Closed

Question about topic mavros/imu/atm_pressure #608

JM-SNU opened this issue Sep 29, 2016 · 10 comments

Comments

@JM-SNU
Copy link

JM-SNU commented Sep 29, 2016

Hello, all.

I have some problems with obtaining pressure information from pixhawk.

I use qgroundcontrol software to set "pixhawk", and receive sensor data (e.g. gyro, acc, baro, ... ) using "mavros" package in ROS.

When I use 2.7.1 version, I can receive air pressure value from pixhawk (ROS topic is mavros/imu/atm_pressure).

However, after updating firmware and setting pixhawk using 3.0.1 version, the air pressure value is always zero.

That means, I can subscribe topic about air pressure but cannot receive correct pressure data.

I'm not sure, but I think it is problem with version of qgroundcontrol. (or parameter setting in updated version) or mavros package (other topics like mavros/imu/data, mavros/imu/mag are obtained correctly)

And, I tried to install updated mavros package, but I cannot install correctly, so now I use old version of mavros package (maybe I installed it on April, 2016)

If you think it is problem with mavros package (like version,..) , let me know how I can handle this problem.
( And if it is problem with qgroundcontrol, maybe I should ask them it)

Thank you.

@vooon vooon added the question label Sep 29, 2016
@vooon
Copy link
Member

vooon commented Sep 29, 2016

a. What firmware (flight stack) are used? PX4 / APM? APM copter (which)?
b. rostipic echo -n1 /disgnostics in ``` code block
c. How you launch node? Log output may be useful too
d. Did you try to change message streams rate? mavsys rate --help
e. What the problem with update? Did you try to follow instructions? What ROS version used? OS version?

@JM-SNU
Copy link
Author

JM-SNU commented Sep 29, 2016

a. I use PX4 Flight stack

b. I tried, and results is like this.

header: 
  seq: 144
  stamp: 
    secs: 1475141287
    nsecs: 629067252
  frame_id: ''
status: 
  - 
    level: 0
    name: mavros: FCU connection
    message: connected
    hardware_id: /dev/ttyUSB0:921600
    values: 
      - 
        key: Received packets:
        value: 56946
      - 
        key: Dropped packets:
        value: 0
      - 
        key: Buffer overruns:
        value: 0
      - 
        key: Parse errors:
        value: 0
      - 
        key: Rx sequence number:
        value: 39
      - 
        key: Tx sequence number:
        value: 1
      - 
        key: Rx total bytes:
        value: 2331720
      - 
        key: Tx total bytes:
        value: 43008
      - 
        key: Rx speed:
        value: 19142.000000
      - 
        key: Tx speed:
        value: 360.000000
  - 
    level: 0
    name: mavros: GCS bridge
    message: connected
    hardware_id: /dev/ttyUSB0:921600
    values: 
      - 
        key: Received packets:
        value: 0
      - 
        key: Dropped packets:
        value: 0
      - 
        key: Buffer overruns:
        value: 0
      - 
        key: Parse errors:
        value: 0
      - 
        key: Rx sequence number:
        value: 0
      - 
        key: Tx sequence number:
        value: 0
      - 
        key: Rx total bytes:
        value: 0
      - 
        key: Tx total bytes:
        value: 0
      - 
        key: Rx speed:
        value: 0.000000
      - 
        key: Tx speed:
        value: 0.000000
  - 
    level: 2
    name: mavros: GPS
    message: No satellites
    hardware_id: /dev/ttyUSB0:921600
    values: 
      - 
        key: Satellites visible
        value: 0
      - 
        key: Fix type
        value: 0
      - 
        key: EPH (m)
        value: 99.99
      - 
        key: EPV (m)
        value: 99.99
  - 
    level: 0
    name: mavros: Heartbeat
    message: Normal
    hardware_id: /dev/ttyUSB0:921600
    values: 
      - 
        key: Heartbeats since startup
        value: 182
      - 
        key: Frequency (Hz)
        value: 0.999933
      - 
        key: Vehicle type
        value: Quadrotor
      - 
        key: Autopilot type
        value: PX4
      - 
        key: Mode
        value: MANUAL
      - 
        key: System status
        value: Standby
  - 
    level: 0
    name: mavros: System
    message: Normal
    hardware_id: /dev/ttyUSB0:921600
    values: 
      - 
        key: Sensor present
        value: 0x00000000
      - 
        key: Sensor enabled
        value: 0x00000000
      - 
        key: Sensor helth
        value: 0x00000000
      - 
        key: CPU Load (%)
        value: 47.4
      - 
        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: 0
    name: mavros: Battery
    message: Normal
    hardware_id: /dev/ttyUSB0:921600
    values: 
      - 
        key: Voltage
        value: 65.54
      - 
        key: Current
        value: -0.0
      - 
        key: Remaining
        value: -1.0
---

c. Now, for checking pressure information, I just run mavros node. That is,
: enter "rosrun mavros mavros_node _fcu_url:=/dev/ttyUSB0:921600" in terminal
And output is like this

[ INFO] [1475141105.354117869]: FCU URL: /dev/ttyUSB0:921600
[ INFO] [1475141105.354557448]: serial0: device: /dev/ttyUSB0 @ 921600 bps
[ INFO] [1475141105.356091423]: GCS URL: udp://@
[ INFO] [1475141105.356421997]: udp1: Bind address: 0.0.0.0:14555
[ INFO] [1475141105.402012033]: Plugin 3dr_radio loaded and initialized
[ INFO] [1475141105.405309260]: Plugin actuator_control loaded and initialized
[ INFO] [1475141105.406515604]: Plugin altitude loaded and initialized
[ INFO] [1475141105.464364400]: Plugin cam_imu_sync loaded and initialized
[ INFO] [1475141105.470699071]: Plugin command loaded and initialized
[ WARN] [1475141105.471546855]: DS: plugin not configured!
[ INFO] [1475141105.471588999]: Plugin distance_sensor loaded and initialized
[ INFO] [1475141105.482967052]: Plugin ftp loaded and initialized
[ INFO] [1475141105.488838573]: Plugin global_position loaded and initialized
[ INFO] [1475141105.526470625]: Plugin image_pub loaded and initialized
[ INFO] [1475141105.532537462]: Plugin imu_pub loaded and initialized
[ INFO] [1475141105.535840148]: Plugin local_position loaded and initialized
[ INFO] [1475141105.537014213]: Plugin manual_control loaded and initialized
[ INFO] [1475141105.543202702]: Plugin mocap_pose_estimate loaded and initialized
[ INFO] [1475141105.546952980]: Plugin param loaded and initialized
[ INFO] [1475141105.550553225]: IMU: High resolution IMU detected!
[ INFO] [1475141105.551337278]: Plugin px4flow loaded and initialized
[ INFO] [1475141105.557104506]: Plugin rc_io loaded and initialized
[ INFO] [1475141105.562270413]: Plugin safety_area loaded and initialized
[ INFO] [1475141105.565796074]: Plugin setpoint_accel loaded and initialized
[ INFO] [1475141105.576459191]: Plugin setpoint_attitude loaded and initialized
[ INFO] [1475141105.580801829]: Plugin setpoint_position loaded and initialized
[ INFO] [1475141105.593958916]: Plugin setpoint_raw loaded and initialized
[ INFO] [1475141105.596844944]: Plugin setpoint_velocity loaded and initialized
[ INFO] [1475141105.599290419]: RC_CHANNELS message detected!
[ INFO] [1475141105.603144600]: Plugin sys_status loaded and initialized
[ INFO] [1475141105.606544665]: Plugin sys_time loaded and initialized
[ INFO] [1475141105.608024904]: Plugin vfr_hud loaded and initialized
[ INFO] [1475141105.609417190]: Plugin vibration loaded and initialized
[ INFO] [1475141105.617150974]: Plugin vision_pose_estimate loaded and initialized
[ INFO] [1475141105.621955895]: Plugin vision_speed_estimate loaded and initialized
[ INFO] [1475141105.627430012]: Plugin waypoint loaded and initialized
[ INFO] [1475141105.627572355]: Built-in SIMD instructions: SSE, SSE2
[ INFO] [1475141105.627591971]: Built-in MAVLink dialect: ardupilotmega
[ INFO] [1475141105.627603467]: MAVROS started. MY ID [1, 240], TARGET ID [1, 1]
[ WARN] [1475141105.711080657]: GP: No GPS fix
[ INFO] [1475141106.306266415]: CON: Got HEARTBEAT, connected.
[ INFO] [1475141106.313138258]: IMU: High resolution IMU detected!
[ INFO] [1475141106.321958757]: RC_CHANNELS message detected!
[ INFO] [1475141107.316368499]: VER: 1.1: Capabilities 0x00000000000004eb
[ INFO] [1475141107.316683761]: VER: 1.1: Flight software:     01040100 (0c2aa165feee1cb4)
[ INFO] [1475141107.316857261]: VER: 1.1: Middleware software: 01040100 (0c2aa165feee1cb4)
[ INFO] [1475141107.317012909]: VER: 1.1: OS software:         ffffffff (0000000000000000)
[ INFO] [1475141107.317126564]: VER: 1.1: Board hardware:      00000011
[ INFO] [1475141107.317236919]: VER: 1.1: VID/PID: 26ac:0011
[ INFO] [1475141107.317403194]: VER: 1.1: UID: 3333471335313431
[ INFO] [1475141121.312279485]: WP: mission received

d. I enter like "rosrun mavros mavsys rate --all 10", but nothing's changed...

e. I don't know.. I usually download mavros package using git clone and catkin_make, but the instruction is not same. So I don't know how I can install mavros package using this method.
I tried source installation method, but doesn't work -- wstool update -t src doesn't work. Then, catkin build/make doesn't work, too

And ROS version is indigo / OS version is Ubuntu 14.04
And I tried "rosinstall_generator --rosdistro indigo --upstream mavlink | tee /tmp/mavros.rosinstall" (not kinetic, use indigo), but it does not work due to same reason (wstool update).

Thanks.

@vooon
Copy link
Member

vooon commented Sep 29, 2016

I do not see any problem in diag & log. To run better to use roslaunch mavros px4.launch fcu_url:=<url> since it will load some defaults.

d. Perhaps only work on APM.

Atmospheric pressure is a part of HIGHRES_IMU message, and i see log message about it's detection.
Check firmware side, and ensure that bit mask still valid.

e. Indigo too outdated, but current mavros still may work on it. Use --rosdistro kinetic on both calls.
Version in Indigo repo too outdated to compile. So you should use Kinetic.

What error give wstool?

@LorenzMeier
Copy link
Member

@JM-SNU Can you connect to QGroundControl and look at the highres IMU message?

@vooon PX4 implements the altitude message:
http://mavlink.org/messages/common#ALTITUDE

@vooon
Copy link
Member

vooon commented Sep 29, 2016

@LorenzMeier and it is supported by altitude plugin :)

@JM-SNU
Copy link
Author

JM-SNU commented Sep 30, 2016

@vooon I tried using "roslaunch mavros px4.launch fcu_url:=/dev/ttyUSB0:921600" but results are same.. air pressure value is still zero.

d. OK. And How can I check firmware side? I already tried to calibrate sensor, set parameter or upload firmware, etc.. but it doesn't work.. I'm curious that other IMU topics (mavros/imu/data, mavros/imu/mag,...) are obtained correctly, but the only mavros/imu/atm_pressure data is not available..

e. As I remember, error is about "2016.9.9 version check".

@LorenzMeier I tried analyzing data using qgroundcontrol. Then, other IMU values are obtained correctly. (e.g. x/y/z acc/gyro/mag) However, abs_pressure is still zero. I think it is problem with firmware from the qgroundcontrol...
But the strange thing is that pressure_alt value has non-zero value but abs_pressure is always zero. Do you know why? Thanks.

@vooon
Copy link
Member

vooon commented Sep 30, 2016

e. Try to remove mavros and mavlink folders, then edit ws/src/.rosinstall file to remove that entries.

Then try installation instructions again.

@vooon
Copy link
Member

vooon commented Sep 30, 2016

Anyway for what do you want pressure data?

@vooon vooon added the PX4 label Sep 30, 2016
@JM-SNU
Copy link
Author

JM-SNU commented Sep 30, 2016

@vooon Thanks, I will try to install mavros following your advice.
And I want pressure data to obtain z-position measurement using raw-sensor data (not using pixhawk estimator) Thanks.

@hridaybavle
Copy link

Hi, I was having the same problem, that after updating the firmaware of pixhawk to 1.4.4, it stopped publishing atm pressure, for now I went back to 1.3 version to get the pressure data again.

Let me know if you find the solution.

@vooon vooon closed this as completed Mar 3, 2017
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

4 participants