When you say 90 degrees clockwise, its not giving us quite enough information to give you an exact answer. Clockwise about which axis? ROS uses a right handed coordinate system (more info here), with x = forward, y = left, z = up
URDF
, SDF
, and XACRO
define rotations using Euler angles in radians. The rpy
field in your visual
and collision
elements are the roll (rotation about x), pitch (rotation about y) and yaw (rotation a bout z) angles. 90 degrees in radians is approx. 1.5708rad. Whether "clockwise" means positive or negative depends on the axis you choose and the direction you are looking from.
All that aside, there are two ways you can apply a rotation to a joint.
in the link, you can apply a rotation to the origin
of your inertial
, collision
, and visual
fields. E.g. for 90deg clockwise about z, you'd set`rpy="0 0 -1.5708"; this can be a bit tedious, and I'd only recommend it if your CAD just happened to use a different coordinate frame and you'll be including the link in different files
the alternative is to define the joint
between your link
and whatever its attached to. The joint
field also lets you specify the rotation of a part relative to its parent; this way, you only have to specify it once (less error prone if you need to change it). again, you'd be setting the rpy
field of the joint
's origin.
As a final note, if all you want to do is have the RVIZ viewer look at your model from a different perspective, without actually changing the part's orientation with respect to the rest of the robot, then I'd suggest defining a dummy joint at 90 degrees to the mastmount_link
, making sure you are publishing the tf
, and changing the reference frame in RVIZ (under the fixed frame setting)