Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If your message is called data then you'd access the x, y, and z components of the direction attribute as:

x = data.direction.x
y = data.direction.y
z = data.direction.z

If your message is called data then you'd access the x, y, and z components of the direction attribute as:

x = data.direction.x
y = data.direction.y
z = data.direction.z

You can access the attributes of messages by using the . operator.

If your message is called data then you'd access the x, y, and z components of the direction attribute as:

x = data.direction.x
y = data.direction.y
z = data.direction.z

This is assuming Python. You can access the attributes of messages by using the . operator.operator. If you're using C++, replace the . with a ->.

If your message is called data then you'd access the x, y, and z components of the direction attribute as:

x = data.direction.x
y = data.direction.y
z = data.direction.z

This is assuming Python. You can access the attributes of messages by using the . operator. If you're using C++, replace the first . with a ->.. So it becomes

x = data->direction.x
y = data->direction.y
z = data->direction.z