0
$\begingroup$

Rosanswers logo

Hi,

I am using robot localization to fuse odomtery, imu, and rtk gps data. Since the gps data is rtk its published a relative distace to a nearby base station, meaning I don't need to use the navsat transform node. My gps base station is the origin of my map frame and my robot usually initializes around x = -180 y = -80.

I'm finding that when I initialize, the initial position is set to (0,0) and it takes the kalman filter around 40 seconds to drift over to (-180,-80) where the robot actually is. I logged my gps data in a bag file to make sure that it wasn't publishing (0,0) initially, which its not.

How do I tell robot_localization what my actual initial position is? I had the thought that I could increase the covariance on my initial position, here is what it is currently:

<rosparam param="initial_estimate_covariance">[1e-9, 0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
                                               0,    1e-9, 0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
                                               0,    0,    1e-9, 0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
                                               0,    0,    0,    1e-9, 0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
                                               0,    0,    0,    0,    1e-9, 0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
                                               0,    0,    0,    0,    0,    1e-9, 0,    0,    0,    0,    0,    0,    0,    0,    0,
                                               0,    0,    0,    0,    0,    0,    1e-9 ,0,    0,    0,    0,    0,    0,    0,    0,
                                               0,    0,    0,    0,    0,    0,    0,    1e-9 ,0,    0,    0,    0,    0,    0,    0,
                                               0,    0,    0,    0,    0,    0,    0,    0,    1e-9, 0,    0,    0,    0,    0,    0,
                                               0,    0,    0,    0,    0,    0,    0,    0,    0,    1e-9, 0,    0,    0,    0,    0,
                                               0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    1e-9, 0,    0,    0,    0,
                                               0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    1e-9 ,0,    0,    0,
                                               0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    1e-9, 0,    0,
                                               0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    1e-9, 0,
                                               0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    1e-9]</rosparam>

But that would be a waste of valuable knowledge. I start the robot in the same place each time. I'd like to have a very small covariances to represent that and then set the initial position somehow.


Originally posted by shoemakerlevy9 on ROS Answers with karma: 545 on 2017-08-10

Post score: 1


Original comments

Comment by jayess on 2017-08-10:
What version of ROS are you using?

Comment by shoemakerlevy9 on 2017-08-10:
ROS Indigo

Comment by shoemakerlevy9 on 2017-08-10:
Oh, now I see that there is an initial_state parameter in the new documentation. Does that work on ROS Indigo?

Comment by jayess on 2017-08-10:
It would appear so. To find it, I just changed "lunar" to "indigo" in the URL. You should write this up as your answer and accept it.

Comment by shoemakerlevy9 on 2017-08-10:
I'll test it out to see if it works and then post

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

On June 12th 2017 the parameter initial_state was added to robot_localization [1]

Currently the change has been made to the following versions of ROS: Indigo / Kinetic / Lunar [2]

If you haven't done so since June 12th 2017 you will need to update the package using:

sudo apt-get intstall ros-<your version>-robot-localization

Then this will work


Originally posted by shoemakerlevy9 with karma: 545 on 2017-08-10

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.