# Can set friction direction based on link cordinate in URDF

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">
<inertial>
<mass value="$${wheel_mass}"/>  {I_wheel_xx}" ixy="0.0" ixz="0.0" iyy="$${I_wheel_yy}" iyz="0.0" izz="$${I_wheel_zz}"/>
</inertial>
<visual>
<geometry>
<cylinder radius="$${wheel_radius}" length="$${wheel_thickness}"/>
</geometry>
<origin xyz="0 0 0.0" rpy="0 0 0"/>
<material name = "blue"/>
</visual>
<collision>
<origin xyz="0 0 0.0" rpy="0 0 0"/>
<geometry>
<cylinder radius="$${wheel_radius}" length="$${wheel_thickness}"/>
</geometry>
</collision>
<gazebo reference="wheel">
<material>Gazebo/Blue</material>
<mu>$${mu} $${mu_2}</mu2>
<fdir>1 0 0</fdir>


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.

• 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? Commented Dec 9, 2023 at 14:28
• 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. Commented Dec 9, 2023 at 14:36
• thank you for comment. I just typo "fdir" for "fdir1" and it perform what I desiered.
– Tama
Commented Dec 11, 2023 at 1:30

<fdir1>1 0 0</fdir1>