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

GPSFix doesn't match Rosbag MessageInstance type

asked 2011-04-11 07:08:13 -0500

Vaibhav Bajpai gravatar image

I am using Diamondback. I have a captured bag file with data from a number of sensors. I am iterating over the bag file, and initiating a callback function depending on the topic I iterate over in the bag file. However somehow /fix topic is not matching to the message type anytime. Here is a code snippet -

BOOST_FOREACH(rosbag::MessageInstance const m, view){
  if (m.isType<...>()){ ... }
  else if (m.isType<...>()){ ... }
  else if (m.isType<>(gps_common::GPSFix)){     //this never matches!
    ROS_INFO("inside GPS");   
  }    
}

My includes are -

#include "sensor_msgs/NavSatFix.h"
#include "sensor_msgs/NavSatStatus.h"
#include "gps_common/GPSFix.h"
#include "gps_common/GPSStatus.h"

When I echo the message type:

ROS_INFO("messageInstance: Topic: %s ", m.getDataType().c_str());

I can see -

[ INFO] [1302536886.734404934]: messageInstance: Topic: gps_common/GPSFix 
[ INFO] [1302536886.819590013]: messageInstance: Topic: gps_common/GPSFix 
[ INFO] [1302536886.826344633]: messageInstance: Topic: gps_common/GPSFix
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2011-04-12 21:40:18 -0500

Vaibhav Bajpai gravatar image

switching back to cturtle solved my problem.

edit flag offensive delete link more
0

answered 2011-04-12 08:34:48 -0500

tfoote gravatar image

Could the topic be a sensor_msgs::NavSatFix ? What's the output of rostopic info /fix ?

edit flag offensive delete link more

Comments

i cant get /GPSFIx information in my bagfile through gpsd client and subscriber instead i am using rostopic echo!!!!. Any idea to get through gpsd pls?

Bindu gravatar image Bindu  ( 2013-07-23 22:07:56 -0500 )edit

Question Tools

Stats

Asked: 2011-04-11 07:08:13 -0500

Seen: 418 times

Last updated: Apr 12 '11