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

Rtabmap gps/fix msg help

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

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 -0600

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

Question Tools

1 follower

Stats

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

Seen: 335 times

Last updated: Nov 13 '20