ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

robot localization initial position

asked 2017-08-10 12:55:25 -0500

updated 2017-08-10 14:19:12 -0500

jayess gravatar image

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.

edit retag flag offensive close merge delete

Comments

What version of ROS are you using?

jayess gravatar image jayess  ( 2017-08-10 13:31:59 -0500 )edit

ROS Indigo

shoemakerlevy9 gravatar image shoemakerlevy9  ( 2017-08-10 14:17:47 -0500 )edit

Oh, now I see that there is an initial_state parameter in the new documentation. Does that work on ROS Indigo?

shoemakerlevy9 gravatar image shoemakerlevy9  ( 2017-08-10 14:28:46 -0500 )edit

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.

jayess gravatar image jayess  ( 2017-08-10 14:36:13 -0500 )edit

I'll test it out to see if it works and then post

shoemakerlevy9 gravatar image shoemakerlevy9  ( 2017-08-10 14:44:50 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-08-10 16:27:09 -0500

updated 2017-08-10 16:33:58 -0500

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

edit flag offensive delete link more

Question Tools

Stats

Asked: 2017-08-10 12:55:25 -0500

Seen: 1,359 times

Last updated: Aug 10 '17