Laser beam visualisation from shifts

asked 2023-02-13 07:29:44 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.


I'm currently working on a model of cartesian robot in Gazebo 11, using ROS2 with Foxy distro.

I built a cartesian robot (3-axis CNC like) from the Gazebo interface, I developed a plugin to control the speed on each axis and I use the laser beam plugin from the library to simulate optical sensors ; using the range mode to simulate limit switches. These optical sensors are basicaly composed of a rectangular cuboid and a 2 beam laser sensor. All sensors work well and are well addressed. I wrote a plugin to get ranges mesured by sensors and there isn't any trouble about this point. Actually, I have a problem related to the pose of my laser sensors with relation to their associated links when those links are mooving.

More precisely, I applied velocity control on each axis in the "absolute way" (neither PID or force), which is the first one discribed in the velodyn project. I observed that when the velocity is too high, the origin of the laser beam is shifted from its moving link. Of course, when the robot is static or moves at low speed such as 0.1 m.s-1, there is no problem at all.

For the use of my simulation, the velocity should not exceed 0.1 m.s-1 luckily, but I'm very curious about this issue for a higher velocity.

I didn't find any related post. Do you knwo the reason of this shift please ?

Here is a picture discribing the problem when my sensor is moving with a speed of 1 m.s-1 along X axis and the laser beam is oriented along Z axis. C:\fakepath\glitch optical sensor Gazebo.png

And here is the sdf code of the beginning of the link and its associated sensor (no need of the following code of the link):

<link name='link_Z1_MIN>
    <pose>0 0 0 0 -0 0</pose>
  <pose>0 3.025 2.11 -1.5707 1.5707 0.0000</pose>
  <sensor name='Z1_MIN' type='ray'>
    <pose>-0.005 0 0 1.5707 0 -3.14159</pose>
    <plugin name="Z1_MIN" filename="">
      <!-- when leaving away frame_name it defaults to base_footprint instead-->

As you can notice, the pose is described and should constraint the laser sensor, but doesn't in ... (more)

edit retag flag offensive close merge delete