Ask Your Question
0

Rtabmap gps/fix msg help

asked 2020-11-03 11:43:34 -0500

MisticFury gravatar image

i've finally gotten my rtabmap to work but i want to add in my gps to get better results. i got a seperate gps modual and already setup the latitude longitude and altitude for the msg but i don't know what to do for the status, service, position_covariance, and position_covariance_type. im assuming the service is just how many satalites it's connected to but i can't find any information that tells me what each one is.

http://docs.ros.org/en/melodic/api/se...

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-11-13 17:52:11 -0500

matlabbe gravatar image

rtabmap uses only the following minimal parameters from the message:

  • stamp
  • longitude
  • latitude
  • altitude

If the position_covariance is not set, it will use a 10 meters error by default.

Reference https://github.com/introlab/rtabmap_r...:

double error = 10.0;
if(gpsFixMsg->position_covariance_type != sensor_msgs::NavSatFix::COVARIANCE_TYPE_UNKNOWN)
{
    double variance = uMax3(gpsFixMsg->position_covariance.at(0), gpsFixMsg->position_covariance.at(4), gpsFixMsg->position_covariance.at(8));
    if(variance>0.0)
    {
        error = sqrt(variance);
    }
}
gps_ = rtabmap::GPS(
        gpsFixMsg->header.stamp.toSec(),
        gpsFixMsg->longitude,
        gpsFixMsg->latitude,
        gpsFixMsg->altitude,
        error,
        0);
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-11-03 11:43:34 -0500

Seen: 118 times

Last updated: Nov 13 '20