robotics-upo / gazebo_sfm_plugin

A plugin for simulation of human pedestrians in ROS Gazebo
BSD 3-Clause "New" or "Revised" License
57 stars 15 forks source link

Cant detect model with lidar #1

Closed prat1kbhujbal closed 1 year ago

prat1kbhujbal commented 1 year ago

Hi, I am trying to visualize the model as an obstacle in rviz using the Lidar sensor but I can't see any collision, in other words, it ignores the collision of the model. Can you please help me with this?

prat1kbhujbal commented 1 year ago

Solved problem with lidar

ai-winter commented 1 year ago

Hello, @prat1kbhujbal

I faced the same problem, could you please give me some suggestions?

noeperez commented 1 year ago

Hi,

You just need to change the type of your robot laser to gpu_ray.

El lun., 13 mar. 2023 9:12, Yang Haodong @.***> escribió:

Hello, @prat1kbhujbal https://github.com/prat1kbhujbal

I faced the same problem, could you please give me some suggestions?

— Reply to this email directly, view it on GitHub https://github.com/robotics-upo/gazebo_sfm_plugin/issues/1#issuecomment-1465687130, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADUK36AQF5KE5UBSA4MUZJLW33JHTANCNFSM6AAAAAAVHUU2GM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ai-winter commented 1 year ago

@noeperez Thanks for your answer.

I have changed the laser to gpu version but it doesn't work.

  <gazebo reference="base_scan">
    <material>Gazebo/FlatBlack</material>
    <sensor type="gpu_ray" name="lds_lfcd_sensor">
      <pose>0 0 0 0 0 0</pose>
      <visualize>$(arg laser_visual)</visualize>

      <update_rate>5</update_rate>
      <ray>
        <scan>
          <horizontal>
            <samples>360</samples>
            <resolution>1</resolution>
            <min_angle>0.0</min_angle>
            <max_angle>6.28319</max_angle>
          </horizontal>
        </scan>
        <range>
          <min>0.120</min>
          <max>3.5</max>
          <resolution>0.015</resolution>
        </range>
        <noise>
          <type>gaussian</type>
          <mean>0.0</mean>
          <stddev>0.01</stddev>
        </noise>
      </ray>
      <plugin name="gazebo_ros_lds_lfcd_controller" filename="libgazebo_ros_gpu_laser.so">
        <topicName>scan</topicName>
        <frameName>base_scan</frameName>
      </plugin>
    </sensor>
  </gazebo>

Is there anything wrong? Thanks for your help.

prat1kbhujbal commented 1 year ago

@ai-winter can't see any problem with the plugin, check if the laser works or if you can visualize scan data in Rviz for these changes with normal obstacles might be GPU not supported or a driver problem. Or else you can refer to this it works without GPU requirement- https://github.com/JiangweiNEU/actor_collisions

noeperez commented 1 year ago

Hi again,

as @prat1kbhujbal said. You need to be sure that Gazebo is using your GPU. The actor models do not have a collision model associated. So, they can be sensed using a graphical detection that can be done only by the GPU (gpu_ray).

ai-winter commented 1 year ago

Hello, @noeperez @prat1kbhujbal Thanks a lot for your help! The problem has been solved!

brilianputraa commented 10 months ago

@ai-winter Hi, could I ask you how you solved the problem? because I have the same problem as well, I changed the plugin type to GPU, but the laser scan in Rviz couldn't detect it

ai-winter commented 10 months ago

@brilianputraa

Please refer to the project ros_pedestrians_simulation