# Sonar+iris+gazebo rostopic sensor\_msgs/range not publishing

**URL:** <https://discuss.px4.io/t/sonar-iris-gazebo-rostopic-sensor-msgs-range-not-publishing/19351>\
**Category:** Pixhawk\
**Created:** [October 31, 2020, 2:08pm UTC](https://discuss.px4.io/t/sonar-iris-gazebo-rostopic-sensor-msgs-range-not-publishing/19351 "2020-10-31T14:08:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anoop\_g](https://discuss.px4.io/user_avatar/discuss.px4.io/anoop_g/32/7023_2.png) [@anoop\_g](https://discuss.px4.io/u/anoop_g)\
**Post date:** [October 31, 2020, 2:08pm UTC](https://discuss.px4.io/t/sonar-iris-gazebo-rostopic-sensor-msgs-range-not-publishing/19351/1 "2020-10-31T14:08:35Z")

</div>

Hai  
I am trying to include a Sonar sensor into an iris px4 plugin and simulating using gazebo. When I launch the file, I can simulate the Sonar into the Gazebo but couldn’t get the corresponding ROS topic. Could anyone please help me?

Note: The Sonar model I used from the PX4 model plugin

Thank you in advance

---

<div class="post-metadata">

**Author:** ![Jaeyoung-Lim](https://discuss.px4.io/user_avatar/discuss.px4.io/jaeyoung-lim/32/10829_2.png) [@Jaeyoung-Lim](https://discuss.px4.io/u/Jaeyoung-Lim)\
**Post date:** [November 1, 2020, 10:24pm UTC](https://discuss.px4.io/t/sonar-iris-gazebo-rostopic-sensor-msgs-range-not-publishing/19351/2 "2020-11-01T22:24:18Z")

</div>

@anoop_g PX4 SITL simulations are not publishing ROS topics by default. You either need to add a plugin which includes the ROS publisher

---

<div class="post-metadata">

**Author:** ![anoop\_g](https://discuss.px4.io/user_avatar/discuss.px4.io/anoop_g/32/7023_2.png) [@anoop\_g](https://discuss.px4.io/u/anoop_g)\
**Post date:** [November 3, 2020, 9:59pm UTC](https://discuss.px4.io/t/sonar-iris-gazebo-rostopic-sensor-msgs-range-not-publishing/19351/3 "2020-11-03T21:59:55Z")

</div>

Thanks for the reply. I used rplidar instead of the sonar and I was able to get the corresponding rostopic.
