Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to subscribe to GPS data published by MTI-G-710 xsens_driver?

So I'm trying to make a state publisher for our custom robot, I managed to receive GPS data published on "/mti/sensor/gnssPvt". So it sends data. In my state_publisher.cpp I have:

#include "sensor_msgs/NavSatFix.h"

and

ros::Subscriber gnss_sub = g.subscribe("/mti/sensor/gnssPvt", 1000, gnssCallback);

and fro callBack I have:

void gnssCallback(const sensor_msgs::NavSatFix::ConstPtr& msg) {

I get following warning by running xsens_driver:

[WARN] [1542263240.955337]: Could not process inbound connection: topic types do not match: [sensor_msgs/NavSatFix] vs. [custom_msgs/gnssSample]{'topic': '/mti/sensor/gnssPvt', 'tcp_nodelay': '0', 'md5sum': '2d3a8cd499b9b4a0249fb98fd05cfa48', 'type': 'sensor_msgs/NavSatFix', 'callerid': '/state_publisher'}

And I don't receive data in my state_publisher.cpp node. F.Y.I I did same implementation for IMU data subscribing to "imu_raw" and it works:

#include "sensor_msgs/Imu.h"

and

ros::Subscriber imu_sub = m.subscribe("imu_raw", 1000, imuCallback);

for callBack:

void imuCallback(const sensor_msgs::Imu::ConstPtr& msg) {

Any help would be appreciated.

How to subscribe to GPS data published by MTI-G-710 xsens_driver?

So I'm trying to make a state publisher for our custom robot, I managed to receive GPS data published on "/mti/sensor/gnssPvt". So it sends data. In my state_publisher.cpp I have:

#include "sensor_msgs/NavSatFix.h"

and

ros::Subscriber gnss_sub = g.subscribe("/mti/sensor/gnssPvt", 1000, gnssCallback);

and fro callBack I have:

void gnssCallback(const sensor_msgs::NavSatFix::ConstPtr& msg) {

I get following warning by running xsens_driver:

[WARN] [1542263240.955337]: Could not process inbound connection: topic types do not match: [sensor_msgs/NavSatFix] vs. [custom_msgs/gnssSample]{'topic': '/mti/sensor/gnssPvt', 'tcp_nodelay': '0', 'md5sum': '2d3a8cd499b9b4a0249fb98fd05cfa48', 'type': 'sensor_msgs/NavSatFix', 'callerid': '/state_publisher'}

And I don't receive data in my state_publisher.cpp node. F.Y.I I did same implementation for IMU data subscribing to "imu_raw" and it works:

#include "sensor_msgs/Imu.h"

and

ros::Subscriber imu_sub = m.subscribe("imu_raw", 1000, imuCallback);

for callBack:

void imuCallback(const sensor_msgs::Imu::ConstPtr& msg) {

Any help would be appreciated.