Gazebo | Ignition | Community
Ask Your Question
0

Ultrasonic and infrared sensor availability?

asked 2021-09-08 14:57:25 -0500

kakcalu13 gravatar image

Is there one for ros2 foxy and igniton citadel?

I can only find lidar on citadel, but I'm having hard time to find ones for ultrasonic and IR sensor

edit retag flag offensive close merge delete

Comments

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.

m.bahno gravatar imagem.bahno ( 2021-09-15 07:45:23 -0500 )edit

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

kakcalu13 gravatar imagekakcalu13 ( 2021-09-17 13:19:20 -0500 )edit

No problem, I'm glad you solved the issue.

m.bahno gravatar imagem.bahno ( 2021-10-15 02:28:38 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-09-17 13:30:26 -0500

kakcalu13 gravatar image

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.

image description

Feel free to message me with questions if you have even if you are in 2023 or 2026 :P

edit flag offensive delete link more

Comments

I just wanted to mention this, I use citadel with ros2 only.

kakcalu13 gravatar imagekakcalu13 ( 2021-09-17 13:31:26 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-09-08 14:57:25 -0500

Seen: 742 times

Last updated: Sep 17 '21