Gazebo LiDAR sensor not publishing topic

First let me just say robotics is not my area of study so pardon me for any miss use of terms.
I am building a small self driving diferential robot using a raspberry pi 5 and a lidar sensor.
For now I am just trying to get a ROS2 robot working with gazebo, and so far I have already build a robot that I can control using my keyboard, so now I am trying to integrate the LiDAR.
I am using ROS2 Jazzy Jalisco with Gazebo harmonic, and most of the documentation is for other version which is causing me some issues.
Bellow is URDF file for my robot, where it uses the gz-sim-sensors-system plugin, but when I run this, I can still control the robot on gz but when I run “ros2 topic list” there’s no “/scan” or “/lidar” topic to subscribe.
Any help here is appreciated!

<?xml version="1.0"?>

<robot name="differential_drive_robot" xmlns:xacro="http://www.ros.org/wiki/xacro">

    <!-- Robot Parameters -->
    <xacro:property name="PI" value="3.14159265"/>
    <xacro:property name="body_length" value="0.5"/>
    <xacro:property name="body_width" value="0.3"/>
    <xacro:property name="body_height" value="0.1"/>
    <xacro:property name="body_density" value="7850.0"/> <!-- Steel -->
    <xacro:property name="body_mass" value="${body_density * body_length * body_height * body_width}"/>
    <xacro:property name="body_inertia_x" value="${1.0/12.0 * body_mass * (body_height*body_height + body_width*body_width)}"/>
    <xacro:property name="body_inertia_y" value="${1.0/12.0 * body_mass * (body_length*body_length + body_height*body_height)}"/>
    <xacro:property name="body_inertia_z" value="${1.0/12.0 * body_mass * (body_length*body_length + body_width*body_width)}"/>

    <xacro:property name="wheel_radius" value="0.1"/>
    <xacro:property name="wheel_width" value="0.05"/>
    <xacro:property name="wheel_separation" value="${body_width + wheel_width}"/>
    <xacro:property name="wheel_offset" value="${body_length/2 - wheel_radius}"/>
    <xacro:property name="wheel_density" value="900"/> <!-- Ruber -->
    <xacro:property name="wheel_mass" value="${wheel_density * PI * wheel_radius * wheel_radius * wheel_width}"/>
    <xacro:property name="wheel_inertia_x" value="${1.0/12.0 * wheel_mass * (3*wheel_radius*wheel_radius + wheel_width*wheel_width)}"/>
    <xacro:property name="wheel_inertia_y" value="${1.0/12.0 * wheel_mass * (3*wheel_radius*wheel_radius + wheel_width*wheel_width)}"/>
    <xacro:property name="wheel_inertia_z" value="${1.0/2.0 * wheel_mass * wheel_radius * wheel_radius}"/>

    <xacro:property name="caster_radius" value="0.1"/>
    <xacro:property name="caster_offset" value="${body_length/2 - caster_radius}"/>
    <xacro:property name="caster_density" value="0.1"/>
    <xacro:property name="caster_mass" value="${caster_density * 4.0/3.0 * PI * caster_radius * caster_radius * caster_radius}"/>
    <xacro:property name="caster_inertia_x" value="${2.0/5.0 * caster_mass * caster_radius * caster_radius}"/>
    <xacro:property name="caster_inertia_y" value="${2.0/5.0 * caster_mass * caster_radius * caster_radius}"/>
    <xacro:property name="caster_inertia_z" value="${2.0/5.0 * caster_mass * caster_radius * caster_radius}"/>

    <!-- Control Parameters -->    
    <xacro:property name="max_linear_acceleration" value="10"/>

    <!-- Links -->

    <!-- Body Link -->
    <link name="body_link">
        <visual>
            <origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
            <geometry>
                <box size="${body_length} ${body_width} ${body_height}"/>
            </geometry>
            <material name="body_material">
                <color rgba="0.25 0.25 0.25 1.0"/>
            </material>
        </visual>
        <collision>
            <origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
            <geometry>
                <box size="${body_length} ${body_width} ${body_height}"/>
            </geometry>
        </collision>
        <inertial>
            <mass value="10"/>
            <inertia ixx="${body_inertia_x}" ixy="0.0" ixz="0.0" iyy="${body_inertia_y}" iyz="0" izz="${body_inertia_z}"/>
            <origin xyz="0 0 0" rpy="0 0 0"/>
        </inertial>
    </link>

    <!-- Left Wheel -->
    <link name="left_wheel_link">
        <visual>
            <origin xyz="0.0 0.0 0.0" rpy="1.570795 0.0 0.0"/>
            <geometry>
                <cylinder radius="${wheel_radius}" length="${wheel_width}"/>
            </geometry>
            <material name="wheel_material">
                <color rgba="0.0 0.0 0.0 1.0"/>
            </material>
        </visual>
        <collision>
            <origin xyz="0.0 0.0 0.0" rpy="1.570795 0.0 0.0"/>
            <geometry>
                <cylinder radius="${wheel_radius}" length="${wheel_width}"/>
            </geometry>
        </collision>
        <inertial>
            <mass value="2"/>
            <inertia ixx="${wheel_inertia_x}" ixy="0.0" ixz="0.0" iyy="${wheel_inertia_y}" iyz="0" izz="${wheel_inertia_z}"/>
            <origin xyz="0.0 0.0 0.0" rpy="1.570795 0.0 0.0"/>
        </inertial>
    </link>

    <!-- Right Wheel -->
    <link name="right_wheel_link">
        <visual>
            <origin xyz="0.0 0.0 0.0" rpy="1.570795 0.0 0.0"/>
            <geometry>
                <cylinder radius="${wheel_radius}" length="${wheel_width}"/>
            </geometry>
            <material name="wheel_material">
                <color rgba="0.0 0.0 0.0 1.0"/>
            </material>
        </visual>
        <collision>
            <origin xyz="0.0 0.0 0.0" rpy="1.570795 0.0 0.0"/>
            <geometry>
                <cylinder radius="${wheel_radius}" length="${wheel_width}"/>
            </geometry>
        </collision>
        <inertial>
            <mass value="2"/>
            <inertia ixx="${wheel_inertia_x}" ixy="0.0" ixz="0.0" iyy="${wheel_inertia_y}" iyz="0" izz="${wheel_inertia_z}"/>
            <origin xyz="0.0 0.0 0.0" rpy="1.570795 0.0 0.0"/>
        </inertial>
    </link>

    <!-- Caster Wheel -->
    <link name="caster_link">
        <visual>
            <origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
            <geometry>
                <sphere radius="${caster_radius}"/>
            </geometry>
            <material name="caster_material">
                <color rgba="0.0 0.0 0.0 1.0"/>
            </material>
        </visual>
        <collision>
            <origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
            <geometry>
                <sphere radius="${caster_radius}"/>
            </geometry>
        </collision>
        <inertial>
            <mass value="0.5"/>
            <inertia ixx="${caster_inertia_x}" ixy="0.0" ixz="0.0" iyy="${caster_inertia_y}" iyz="0" izz="${caster_inertia_z}"/>
            <origin xyz="0 0 0" rpy="0 0 0"/>
        </inertial>
    </link>
    
    <!--Lidar Link-->
    <link name="lidar_link">
        <inertial>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <mass value="0.125"/>
            <inertia ixx="0.001"  ixy="0"  ixz="0" iyy="0.001" iyz="0" izz="0.001" />
        </inertial>

        <collision>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
            <cylinder radius="0.0508" length="0.055"/>
            </geometry>
        </collision>

        <visual>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
            <cylinder radius="0.0508" length="0.055"/>
            </geometry>
        </visual>
    </link>




    <!-- Joints -->
    <joint name="lidar_joint" type="fixed">
        <parent link="body_link"/>
        <child link="lidar_link"/>
        <origin xyz="0 0 ${body_height / 2 + 0.055 / 2}" rpy="0 0 0"/>
    </joint>


    <!-- Left Wheel Joint -->
    <joint name="left_wheel_joint" type="continuous">
        <origin xyz="-${wheel_offset} ${wheel_separation/2} -${wheel_radius/2}" rpy="0 0 0"/>
        <parent link="body_link"/>
        <child link="left_wheel_link"/>
        <axis xyz="0 1 0"/>
        <limit effort="100" velocity="10.0"/>
        <dynamics damping="0.1" friction="0.1"/>
    </joint>

    <!-- Right Wheel Joint -->
    <joint name="right_wheel_joint" type="continuous">
        <origin xyz="-${wheel_offset} ${-wheel_separation/2} -${wheel_radius/2}" rpy="0 0 0"/>
        <parent link="body_link"/>
        <child link="right_wheel_link"/>
        <axis xyz="0 1 0"/>
        <limit effort="100" velocity="10.0"/>
        <dynamics damping="0.1" friction="0.1"/>
    </joint>

    <!-- Caster Wheel Joint (fixed) -->
    <joint name="caster_joint" type="fixed">
        <origin xyz="${caster_offset} 0 -${caster_radius/2}" rpy="0 0 0"/>
        <parent link="body_link"/>
        <child link="caster_link"/>
    </joint>




    <!-- Gazebo Parameters -->
    <gazebo reference="body_link">
        <mu1>1.0</mu1>
        <mu2>1.0</mu2>
    </gazebo>

    <gazebo reference="right_wheel_link">
        <mu1>1.0</mu1>
        <mu2>1.0</mu2>
    </gazebo>

    <gazebo reference="left_wheel_link">
        <mu1>1.0</mu1>
        <mu2>1.0</mu2>
    </gazebo>

    <gazebo reference="caster_link">
        <mu1>0.000001</mu1>
        <mu2>0.000001</mu2>
    </gazebo>

    <gazebo reference="lidar_link">
        <sensor name="lidar" type="ray">
            <topic>lidar</topic>
            <always_on>true</always_on>
            <visualize>true</visualize>
            <update_rate>5</update_rate>
            <ray>
            <scan>
                <horizontal>
                <samples>360</samples>
                <resolution>1.000000</resolution>
                <min_angle>0.000000</min_angle>
                <max_angle>6.280000</max_angle>
                </horizontal>
            </scan>
            <range>
                <min>0.120000</min>
                <max>3.5</max>
                <resolution>0.015000</resolution>
            </range>
            <noise>
                <type>gaussian</type>
                <mean>0.0</mean>
                <stddev>0.01</stddev>
            </noise>
            </ray>
            <plugin
                filename="gz-sim-sensors-system"
                name="gz::sim::systems::Sensors">
                <render_engine>ogre2</render_engine>
            </plugin>
        </sensor>
    </gazebo>

    <!-- Gazebo Plugins -->
    <gazebo>
        <plugin filename="gz-sim-diff-drive-system" name="gz::sim::systems::DiffDrive">
            <right_joint>right_wheel_joint</right_joint>
            <left_joint>left_wheel_joint</left_joint>
            <wheel_separation>${wheel_separation}</wheel_separation>
            <wheel_radius>${wheel_radius}</wheel_radius>
            <max_linear_acceleration>${max_linear_acceleration}</max_linear_acceleration>
            <odom_publish_frequency>100</odom_publish_frequency>
            <topic>cmd_vel</topic>
            <odom_topic>odom</odom_topic>
        </plugin>

        <plugin filename="gz-sim-joint-state-publisher-system" name="gz::sim::systems::JointStatePublisher">
            <topic>joint_states</topic>
            <joint_name>right_wheel_joint</joint_name>
            <joint_name>left_wheel_joint</joint_name>
        </plugin>
    </gazebo>

</robot>

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật