I found the way to insert them inside Citadel.
Since there is no official plugin for ultrasonic or infrared sensor. I will be more than happy to share on here for anyone in future!
Ultrasonic:
This is being used as in lidar. It is included the setting of ultrasonic. Here is what I wrote:
<sensor name='gpu_lidar' type='gpu_lidar'>
<always_on>1</always_on>
<visualize>true</visualize>
<topic>ultrasonic</topic>
<update_rate>10</update_rate>
<lidar>
<scan>
<vertical>
<samples>5</samples>
<resolution>1</resolution>
<min_angle>0.00</min_angle>
<max_angle>0.25</max_angle>
</vertical>
</scan>
<range>
<min>0.120000</min>
<max>4</max>
<resolution>0.015000</resolution>
</range>
<noise>
<type>gaussian</type>
<mean>0.0</mean>
<stddev>0.01</stddev>
</noise>
</lidar>
Which this will results as one "cone" acting like ultrasonic.
Use sensor_msgs/msg/range to get the range in ros2 foxy (i don't know about ros1 since I joined ros2 only)
Infrared sensor:
This is one of the most fun challenge ever I had!
Since there is no official plugin for infrared sensor, I used the alternative plugin called Depth camera which is display on github
Since depth camera code in sdf is a little too long. Here is the code in github! It's open source as well! Feel free to explore as well since there will be a lot of documents involves Foxy (ros2) and Citadel (LTS atm)
I'm going to mark this as my official answer since it solved my issue.
Feel free to message me with questions if you have even if you are in 2023 or 2026 :P
I am not aware of an implementation of ultrasonic or IR sensor, however both can be approximated by using lidar with several layers, I've done it recently for US sensor.
Thanks for your reply! Sorry, I'm not sure how I wasn't notified by this. I got my answers already. I will post the answer for citadel or any ign versions
No problem, I'm glad you solved the issue.