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

Revision history [back]

click to hide/show revision 1
initial version

Thanks for that, makokal. However, I am still encountering problems in accessing the data. Let me explain my problem more clearly.

I have a certain robot which is producing data under several topics, one of which includes this /XXX/Data. Now /XXX/Data has several members in its definition, for example acc_x, acc_y, acc_z, angle_roll, angle_pitch, angle_yaw etc. What I'm trying to do, is to write a listener that will extract specifically acc_x, which is of int16 type. To access this acc_x, I have tried including the header file, e.g. "information.h" that specifically contains the structure that is publishing /XXX/Data, and this structure contains acc_x, acc_y etc. Then, in my listener, I tried to create an object of the type of the structure I mentioned above. But it's not working.