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

Revision history [back]

ROS_INFO is used like printf, so you can't just pass a message as a parameter. It should be some kind of string. I would recommend creating the message you need like this:

ROS_INFO("--IMU MESSAGE--");
ROS_INFO("stamp: %d", imu.header.stamp);
ROS_INFO("linear acceleration x: %f", imu.linear_acceleration.x);
etc..
ROS_INFO("---------------");

I have not compiled/tested the code, but I think it should work. (You might need to cast some values)

Good luck.