I'm a beginner at gazebo and ROS.

I'm trying to make mobile robot which propels itself using the friction force normal to the direction of wheel.

I want to use cylinder as wheel, and set the friction direction of the cylinder to have a small friction coefficient in the rolling direction and large in normal direction.

I set fdir1 as 1 0 0 in gazebo tag but didn't perform what I desired.

<link name = "wheel">
            <mass value="${wheel_mass}"/>
            <origin xyz="0 0 0.0" rpy="0 0 0"/> 
            <inertia ixx="${I_wheel_xx}" ixy="0.0" ixz="0.0" iyy="${I_wheel_yy}" iyz="0.0" izz="${I_wheel_zz}"/>
                <cylinder radius="${wheel_radius}" length="${wheel_thickness}"/> 
            <origin xyz="0 0 0.0" rpy="0 0 0"/> 
            <material name = "blue"/>
            <origin xyz="0 0 0.0" rpy="0 0 0"/> 
                <cylinder radius="${wheel_radius}" length="${wheel_thickness}"/> 
    <gazebo reference="wheel">
        <fdir>1 0 0</fdir>

So,I want to ask you

  1. Is it possible to set the direction of friction in URDF?

  2. If it is, how?

  3. Is it possible to visualize friction force direction in gazebo or rviz?

Thank you.

  • $\begingroup$ Please edit your post to tell us: 1) Which exact version of gazebo you want to use, 2) what OS & version? 3) Are you also using ros1 or ros2? $\endgroup$
    – Mike973
    Commented Dec 9, 2023 at 14:28
  • $\begingroup$ The answer to "Is it possible to set the direction of friction in URDF?" is Yes. But the details of how to do so depends on other things, which is why we need more info about your environment. $\endgroup$
    – Mike973
    Commented Dec 9, 2023 at 14:36
  • $\begingroup$ thank you for comment. I just typo "fdir" for "fdir1" and it perform what I desiered. $\endgroup$
    – Tama
    Commented Dec 11, 2023 at 1:30

1 Answer 1


I mistakenly used "fdir" instead of "fdir1", fixing it performs what I desired:

<fdir1>1 0 0</fdir1>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.