ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

help for installing lidar on a drone

asked 2023-07-31 10:34:12 -0600

SébastienL gravatar image

Hi all,

(note: I posted this question on gazebo forum, but it is seems to be a ros plugin, so I post here too)

I'm trying to install a lidar on a drone (x500, model provided by PX4 repo). I found some examples, but all seems outdated.

For the plugin, an example give the name of libgazebo_ros_ray_sensor.so, another libgazebo_ros_laser.so. Some doc points to "https://github.com/ros-simulation/gaz..." to get the plugin, but the list of available branch is huge, and I already installed libgz-sim7-plugins on my machine (which contains libgz-sensors7-lidar.so that "does not export any plugins").

Well I'm totally lost !
Which plugin should I used ?

I'm using gazebo garden on ubuntu 22.04. Here is part of my sdf file

<sdf version="1.10">
  <model name="x500_lidar">
    <include><uri>model://x500</uri>[...]</include>

  <!--add lidar-->
  <link name="hokuyo_link">
    <pose>0 0 0 0 0 0</pose>
    [...]
    <sensor type="gpu_ray" name="laser">
      <pose>0 0 0.3 0 0 1.57</pose>
      [...]
      <plugin name="hokuyo_node" filename="libgz-sensors7-lidar.so">
        <robotNamespace></robotNamespace>
        <topicName>/spur/laser/scan</topicName>
        <frameName>/hokuyo_sensor_link</frameName>
      </plugin>
    </sensor>
  </link>
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2023-08-01 03:32:45 -0600

SébastienL gravatar image

Answering my own question : I found solution in ros_gz/ros_gz_sim_demos/launch/gpu_lidar_bridge.launch.py

In there, I read that plugin gz-sim-sensors-system was the one to use, I have had this clue somewhere, but can't make it worked.
For the sensor itself it's almost the same i used, except the type which is 'gpu_lidar' (param value are also little differents, but I did not check yet how important this is).

Note this publish on gz topics, not ROS2, I have to use a bridge to be able to use those data in ROS (but that is expected).

<sensor name='gpu_lidar' type='gpu_lidar'>
  <pose>0 0 0 0 0 0</pose>
  <topic>lidar</topic>
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2023-07-31 10:34:12 -0600

Seen: 379 times

Last updated: Aug 01 '23