0
$\begingroup$

Gazebo Answers logo

After i run command "X4_SENSOR_CONFIG_4=1 roslaunch subt_example team.launch", the range of the laserscan in only coming less than than 1 as also shown by below screenshot: image description This was happening for the X2 robot also when i used command: "X2_SENSOR_CONFIG_3=1 roslaunch subt_example team.launch": image description But after i replaced the sensor part of the planar_lidar.urdf.xacro file with below code the range is coming fine for X2 robot:

<sensor type="ray" name="${name}">
  <pose>0 0 0 0 0 0</pose>
  <visualize>false</visualize>
  <update_rate>40</update_rate>
  <ray>
    <scan>
      <horizontal>
        <samples>720</samples>
        <resolution>1</resolution>
        <min_angle>-1.570796</min_angle>
        <max_angle>1.570796</max_angle>
      </horizontal>
    </scan>
    <range>
      <min>0.10</min>
      <max>30.0</max>
      <resolution>0.01</resolution>
    </range>
    <noise>
      <type>gaussian</type>
      <mean>0.0</mean>
      <stddev>0.01</stddev>
    </noise>
  </ray>
   <plugin name="gazebo_ros_planar_lidar" filename="libgazebo_ros_laser.so">
      <topicName>${topic}</topicName>
      <frameName>${name}</frameName>
      <robotNamespace>${robot_namespace}</robotNamespace>
    </plugin>
</sensor> 

But still the range of X4 laser scan is under 1. I am running system with 8 gb ram, 300 gb free HD, ubuntu 18.04, and ros melodic with gazebo 9 as described in catkin install tutorial of this subt repository. But im not using any dedicated nvidia gpu, i'm using i5 3rd gen intel cpu.


Originally posted by hari1234 on Gazebo Answers with karma: 56 on 2018-11-20

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

Looks like the Laser detects a part of the robots collision (thus you can not see the object but the scanner does) I think there are two ways to fix it:

  1. Change <min>0.10</min> to maybe 0.2 or 0.3 or greater so it will start outside of the collision

(1.1 or make the collision-Element of your robot smaller by changing the sdf/urdf)

  1. Change your sensor to gpu_ray <sensor type="gpu_ray" name="${name}"> and it will only detect visual elements in the simulation

If you have an graphic card i recommend the 2. way, it will increase the performance of the simulation a bit.


Originally posted by wentz with karma: 350 on 2018-11-20

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by hari1234 on 2018-11-20:
Ok thanks, as you mentioned, the cpu based lase sensor was detecting the collision element also, so after i changed the minimum range to 1 it is working.

Comment by wentz on 2018-11-21:
Your welcome :), keep in mind that your laser will not detect objects within 1m.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.