robot_localization with GPS + IMU
I'm trying to setup a localization system for my aerial vehicle, however I never used robot_localization or the TF package, so everything seems a little overwhelming, setup wise. I have a couple of questions:
1) Is it possible to use robot_localization with only GPS and IMU? Would the output be any good?
2) I have a bottom camera that is used from ground target detection. Should I use it for some kind of visual odometry? I'm afraid that this will put the processor under too much strain (odroid X2).
Can I get some tips on how to setup all of this? I find myself a little lost.
EDIT1: Just for some context, my system is an aerial vehicle supported by a balloon that uses two rotors in order to adjust its position:
(1-baloon; 5-rotors; 4-bottom camera (webcam); 3-main "box" with GPS, IMU, odroid X2, etc)
I had already changed the IMU output to be as specified in REP-103. Initially I was using "udm_odometry_node" from gps_common, but switched to the "navsat_transforme_node". For the altitude I'm using the GPS, since the IMU I'm using doesn't have altitude information.
The bottom camera (simple webcam) is meant for ground target detection/tracking, however I could use it for some kind of visual odometry if the odroid is able to handle it.
I think I was able to setup everything correctly since I'm able to "echo" the output on odometry/filtered. However it seems like it has a lot of noise. I still have to do some real tests, since I only tested this with my laptop and the sensors were stationary. (Note: Are the velocities in Twist set as m/s?)
However I got an error when trying to set the process_noise_covariance (type 7 if I recall correctly). Since I was using the covariance from the template launch file, I just deleted it in order to check if everything was working (if I was able to get an output).
EDIT2: (For some reason I'm unable to comment your answer. Whenever I write a comment it disappears when I refresh the page)
One of the problems might be connected to the fact that all covariances on the IMU message are set to 0, since I wasn't able to find information about those parameters for the mpu9150. Besides that, the IMU might need some new calibration.
Sample of the IMU msg:
---
header:
seq: 14983
stamp:
secs: 1429104187
nsecs: 410562312
frame_id: imu
orientation:
x: 0.00824941202457
y: 0.0174910227596
z: 0.0350623021512
w: 0.997508466348
orientation_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
angular_velocity:
x: -0.0017719756579
y: 0.00648836186156
z: 0.000426339596743
angular_velocity_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
linear_acceleration:
x: -0.210282728076
y: 0.174357444048
z: 9.848320961
linear_acceleration_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0 ...
Thanks, I'll check out the bags when I get a chance.
Question: as this is a UAV, does the robot often fly in a direction other than the direction it's facing? In other words, is its course over ground different from its heading/yaw? Even though the direction of travel in your GPS data is west-to-east, the IMU reads about -0.99 radians.
Also, can you add a cheap barometer to this thing? You should really have an altitude estimate of some kind. I have a launch file that worked for me (with the latest source), and I will post it when you answer these questions.
The bagfile is from a test I did with only the GPS and IMU. That is, it was not the UAV that performed the path. I performed the path with the laptop, GPS and IMU while mantaining the imu in a position similar to the one it would be in the system. Notice that this IMU has no magnometer information.
The GPS altitude information is really bad, so I will have to add a barometer to the system. By the end of this month I might have a new IMU with barometer, which should be enough, right? Another question, is there a way to get a better estimate of linear velocity? with the GPS alone it's too noisy
If you don't have a world-referenced yaw/heading estimate,
navsat_transform_node
will not perform correctly. You need a magnetometer. You could always try pointing a camera downward and using optical flow + altitude to determine linear velocity.The IMU I'm using has a magnetometer, however I decided not to use it since it seemed to be sensible to electrical noise (from other hardware around the IMU). The use of the downward camera and optical flow was my first idea, however I'm not sure if it will be too demanding for the odroid.
Can you calibrate the IMU for hard and soft iron distortion? Also, if you downsampled the image data enough, you could probably get by with optical flow on an Odroid. I'm not sure how powerful the X2 is (I have a U3).