Laser scanner / Lidar not publishing /scan
Im having trouble adding a laser sensor to my robot, im using ROS1, can you find an error ? This is what is inside my lidar.xacro file, and on gazebo i can see the rays and them adjusting to a wall colision, while not having a topic with /scan when i do a rostopic list or an echo
Also tested a code more similar to the one inside turtlebot3 but had no sucess
<robot <a="" href="http://xmlns:xacro="http://www.ros.org/wiki/xacro">xmlns:xacro="http://www.ros.org/wiki/..." ><="" p=""> </robot>
<joint name="laser_joint_s" type="fixed">
<parent link="base_link"/>
<child link="laser_frame_s"/>
<origin xyz="0.0 0.0 0.01" rpy="0 0 0"/>
</joint>
<link name="laser_frame_s">
<visual>
<geometry>
<cylinder radius="0.005" length="0.035"/>
</geometry>
<material name="red"/>
</visual>
<collision>
<geometry>
<cylinder radius="0.005" length="0.035"/>
</geometry>
</collision>
</link>
<joint name="laser_joint" type="fixed">
<parent link="laser_frame_s"/>
<child link="laser_frame"/>
<origin xyz="0.0 0.0 0.02" rpy="0 0 0"/>
</joint>
<link name="laser_frame">
<visual>
<geometry>
<cylinder radius="0.015" length="0.005"/>
</geometry>
<material name="red"/>
</visual>
<collision>
<geometry>
<cylinder radius="0.015" length="0.005"/>
</geometry>
</collision>
<gazebo reference="laser_frame">
<material>Gazebo/Red</material>
<sensor name="laser" type="ray">
<pose> 0 0 0 0 0 0 </pose>
<visualize>false</visualize>
<update_rate>60</update_rate>
<always_on>1</always_on>
<ray>
<scan>
<horizontal>
<samples>360</samples>
<min_angle>-3.14</min_angle>
<max_angle>3.14</max_angle>
</horizontal>
</scan>
<range>
<min>0.05</min>
<max>1</max>
</range>
</ray>
<plugin name="laser_controller" filename="libgazebo_ros_laser.so">
<ros>
<topicName>/scan</topicName>
<frameName>laser_frame</frameName>
</ros>
</plugin>
</sensor>
</gazebo>
</link>
</robot>