gazebo_ros range plugin do not show in rostopic list
Hi,
I am trying to implement a sonar sensor in Gazebo. I search online and find this tutorial.
I follow the instruction and make some change because I use Noetic instead of Kinetic. After setting up, I get a strange result. I can see the sonar link attached to the rover but when I do rostopic list
, I cannot find the topic the plugin should publish.
Here is the sonar part of my xacro file:
And here is the sonar part of my .gazebo file:
<joint name="sonar_front_joint" type="fixed">
<axis xyz="0 1 0" />
<origin rpy="0 0 0" xyz="0.5 0 0.25" />
<parent link="base_footprint"/>
<child link="base_sonar_front"/>
</joint>
<link name="base_sonar_front">
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="0.01 0.01 0.01"/>
</geometry>
</collision>
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="0.01 0.01 0.01"/>
</geometry>
</visual>
<inertial>
<mass value="1e-5" />
<origin xyz="0 0 0" rpy="0 0 0"/>
<inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
</inertial>
</link>
And here is the launch file:
<launch>
<arg name="world" default="basic.world"/>
<arg name="paused" default="false"/>
<arg name="use_sim_time" default="true"/>
<arg name="gui" default="true"/>
<arg name="headless" default="false"/>
<arg name="debug" default="false"/>
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(find rover_gazebo)/worlds/$(arg world)"/>
<arg name="paused" value="$(arg paused)"/>
<arg name="use_sim_time" value="$(arg use_sim_time)"/>
<arg name="gui" value="$(arg gui)"/>
<arg name="headless" value="$(arg headless)"/>
<arg name="debug" value="$(arg debug)"/>
<arg name="verbose" value="false"/>
</include>
</launch>
I'm using ROS Noetic and Gazebo 11. And I have checked the libgazebo_ros_range.so
exists.
Thank you