Absolute localization using GPS + IMU + visual odometry
Hi, I'm rather new to ROS, and completly new to the localization using ROS.
I'm working on a robot with 3 sensors usefull for localization :
1) A RTK-GNSS GPS from ardusimple (simpleRTK kit), providing very accurate position (precision=2cm) in good very good conditions, not so good ones if there are too many obstacles blocking the view of satelites. It is outputting the position in the topic /gps/fix at 1Hz as a sensor_msgs/NavSatFix (and some other messages specific to the ublox_gps node, including more detailed information about the type of corrections we are getting).
2) A stereo camera (Zed2 from Stereolabs), which provides visual odometry ( topic : /zed2/zed_node/odom ; Type: nav_msgs/Odometry). Alternatively, it also provide also /zed2/zed_node/pose (type : geometry_msgs/PoseStamped) and /zed2/zed_node/pose_with_covariance (type : geometry_msgs/PoseWithCovarianceStamped)
3) An IMU integrated in the camera (the magnetometer in it is unsusable right now, because it is sitting just next to a speaker with a big magnet). We ordered a separated magnetometer to put it in a better location. The output topic is /zed2/zed_node/imu/data (of type sensor_msgs/Imu)
My goal is to fuse this data, in order to get an accurate absolute position at all time (ideally in the form of UTM coordinates or longitude/latitude).
One significative contrain is that I will not have permanent GPS signals (I will filter the GPS data to keep it only when in "fixed" mode, ie when accuracy is very good). This step will be implemented later on (for a start, I just do the tests where I know the signal will be good).
So my main question is : how to fuse this data and retrieve real time absolute position?
So far, I tried the solution my predecessor started looking into :
using 2 instances of ekf_localization_node of the robot_localization package (one for fusing the IMU with the visual odometry to get the base_link to odom transform ; and a second one fusing the IMU, the visual odometry and the GPS data in order to get the base_link to map transform (wich is output as a odom to map transform because baselink can't have 2 parents)
using one instance of navsat transform node (from robot_localization package) in order to get the GPS data into an odometry format usable in the ekf_localization_node and outputing a (static!) map->utm transform
If I understand well, the baselink->utm transform should correspond to the absolute position of the robot. However, when I tested, with the robot immobile with decent GPS precision, I got completly unstable output (drift of >10m per second).
As can't attach files yet, I put those I think might be relevant on a google drive : https://drive.google.com/drive/folder...
So do you have an idea either :
how to get my current setup working
or another way that would be easier to get the absolute location of the robot fusing all data?
Thank you very much in advance
Felix
PS : I'm using ros melodic on a ...