robot_localization GPS integration error
###Overview I have been having quite a hard time with setting up my robot to use its GPS. I am attempting to use the navsat_transform_node and two instances of robot_localization. The set up is almost identical to the example in the wiki.
However, the localization node which combines the gps data to the data of the first localization node acts wildly. The transform it produces slowly drifts but then shoots off into one direction and doesnt stop. It sometimes rotates around the initial position while moving outwards. This happens with the robot standing still. The gps data does vary slightly and wanders a bit but within a closed area.
To get some context The robot I am using is a Jackal. It has a laser mounted up front and gps and imu built in. Much of the ros code for the integrated sensors runs on the onboard computer and is installed via debs making it difficult to modify. The GPS integration is running on my laptop which communicates to the jackal through through LAN to a router then through WiFi. I have made sure that the times are synced because this was giving me issues earlier.
###More Detail I have three frames of interest map, odom and base_link. Odom->base_link is generated by a primary localization node which combines an IMU which is earth referenced (the orientation includes the magnetometer) and wheel odometry. The second localization node combines the gps odometry from navsat_transform and the output of the first localization node. (I have also tried to combine the wheel odometry and imu directly in this node) This creates the map->odom transform.
I have used an old commit for the jackal as my starting point. Its intention was to implement this gps integration but then was removed for later development. The commit is found here. I haven't made too many changes to these file other to include a yaw offset (the imu has north pointing to x+) and magnetic declination. I have just tried making small changes to try to see if anything would help.
###Thoughts I'm not sure but I have a feeling that there is trouble transforming the data from a frame on the robot up to the map frame. To me it doesnt make sense to use data in a frame below the transform you are trying to create. You need to use the transform you're creating to transform the data to create the transform. It seems to me like a cyclical problem. But this may work I'm not sure.
The feeling im getting from what I'm seeing is that the gps is drifting a little bit and the transform is drifting as a result. Then a jump occurs in the gps data and through some delay in the tf and the fact that there is some cyclical component to the setup the same value gets added to the system repeatedly. (Data gets transformed using old tf, tf gets updated using previous ...
Are you using the output of the first EKF as input to the second? I can't access Drop Box from work, so I'll check this out later. Your use case is pretty typical and works well for me on our Husky, so I'd have to check out the bags.
I have tried that and I have tried duplicating the inputs from the first with the addition of the GPS.
OK, I'll look at the bags later today.
I looked at the bag file. You're missing a topic, I'm afraid. I need one that has all the inputs to the filter, including
/jackal_velocity_controller/odom
. Also, if you can post it on Google Drive, that would help.Ok I updated the bag. I just recorded all this time. I was avoiding this b/c the wiki said rosbag would drop a few of the first messages on a new topic.
Hello,
I downloaded the script. But it doesn't work. When I'm running the launch file I always get those errors:
Can someone help me?
@modotz Please only use answers for answering questions (not for asking new questions). I've moved your question to a comment. If you don't receive any help, please open a new question.