To make the URDF file my_robot_description.urdf file compatible with Xacro follow the below steps:

xmlns:xacro="[<http://www.ros.org/wiki/xacro>](<http://www.ros.org/wiki/xacro>)"<?xml version="1.0"?>
<robot name="my_robot" xmlns:xacro="<http://www.ros.org/wiki/xacro>">
<material name="blue">
<color rgba="0 0 0.5 1" />
</material>
...........
Change the file name in display,launch files from my_robot.urdf to my_robot.urdf.xacro
<launch>
<let name="urdf_path"
value="$(find-pkg-share my_robot_description)/urdf/my_robot.urdf.xacro" />
........