Ask Your Question

Revision history [back]

robot localization initial position

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.

click to hide/show revision 2
retagged

robot localization initial position

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.