World Frame and Axis
Last updated
Last updated
We have already seen that the root node in a sdf
file is <world>
and other entities are the child node of the world. The frame of this world node is the world frame. The easiest way to visualize it is to create a box entity and set the pose to (0,0,0). If we run the command ign gazebo shapes.sdf
, it brings a default world with shapes and the box is put at the origin of the world with an offset in z-axis.
To dislay the axis, we can use click the translate button and then select the red box. The red arrow represents the x-axis, green the y-axis, and blue the z-axis.
Strictly speaking, the axis displayed in the figure above is the axis of the local frame of the red box. It just happens that it aligns with the world frame in the shape.sdf file.
To verify it's the axis of the local frame, we can rotate the box and see the effect:
Note that if we now translate the red box, it moves along the local axis. If we want to translate a rotated entity along the world frame axis, we can hold the shift key and drag the object.