mavlink / mavros

MAVLink to ROS gateway with proxy for Ground Control Station
Other
902 stars 993 forks source link

How to get local position and orientation through IMU by MAVROS #169

Closed weiweikong closed 9 years ago

weiweikong commented 9 years ago

Hi there, I am currently working on project where we are implementing a Pixhawk Autopilot and ROS for SLAM with Hokuyo UTM-30LX laser and monocular/stereo camera. Now we did not use external IMU. So the setup of our system are

I have already use MAVROS receive the data from IMU. After running rosrun mavros mavros_node, there are /mavros/imu/data and /mavros/imu/data_raw on the topic list. But I am not so familiar with Pixhawk and this research filed, so here are some questions:

Does anyone have any ideas or suggestions?

Thanks.

Best, Weiwei

vooon commented 9 years ago

What pixhawk firmware do you use?

  1. Handles different set of messages and consolidate to standartized imu/data and imu/data_raw topics. Where:

    • imu/data - oprientation computed by FCU (converted from Euler for ATTITUDE or Q from ATTITUDE_QUATERNION) plus accel data from last sensor raw data.
    • imu/data_raw - only data from raw messages.

    Note that ROS use ENU frame, while FCU - NED.

  2. Did you calibrate IMU?
  3. imu/mag.
  4. Maybe local_position.cpp?
weiweikong commented 9 years ago

Hi Vooon, thanks for your reply. The Firmware is the stable version, px4fmu-v2_default.px4 for PX4FMU v2.x (in Pixhawk)

vooon commented 9 years ago
  1. ATTITUDE give RPY angels, and then translated to Quaternion, is body frame. See #49. ATTITUDE_QUATERNION only rotates axis to match ROS ones. Some FCU's provide both of this messages, some not. Also all fusion done in FCU, so compass processing must be in firmware.
mhkabir commented 9 years ago

@weiweikong Any updates on this?

mhkabir commented 9 years ago

Please use the PX4users mailing list or Gitter if you have further questions : https://gitter.im/mavlink/mavros https://gitter.im/PX4/Firmware

zer1988 commented 8 years ago

Hi vooon can you guide me how I can convert data of orientation of mavros/imu/data from quaternion to spatial rotaion?

vooon commented 8 years ago

Use tf python lib. Or use Eigen.