iralabdisco / ira_laser_tools

All laser type assemblers and manipulators.
BSD 3-Clause "New" or "Revised" License
201 stars 215 forks source link

The merge is so slow #28

Open 940222JESUS opened 4 years ago

940222JESUS commented 4 years ago

Hi Now I'm working with it but I have a issue, when I use it the result of the merge is so slow, the time delay is three or more seconds, it's normal? I'm using Ros Melodic and Gazebo for simulate the scanners, but when in the simulation I put an object the topic of the one of the scanners show the object immediately (in rviz) but the topic of the merge show the object later than three or more seconds, it work with this times or I have to change something?

Thanks

trigal commented 4 years ago

I've never heard of this kind of issues, and we're used to use the merger in our vehicle in "real-time" (as far as realtime can be in ROS). Have you changed something in the code? Maybe is something that has to do with the queues and timestamps, I don't really know, but I can say that it's not normal.

pietrocolombo commented 4 years ago

Is the frequency of the lasers you merge the same?

940222JESUS commented 4 years ago

Is the frequency of the lasers you merge the same?

You mean to the script of the scanners in Gazebo or the script of ira laser?

IMG_20200714_092712.jpg This is the launch file of ira laser

IMG_20200714_092641.jpg

This is the script of scanners (Gazebo plugin)

In this image only can see one of the scanners but the configuration is the same in the two scanners

940222JESUS commented 4 years ago

I've never heard of this kind of issues, and we're used to use the merger in our vehicle in "real-time" (as far as realtime can be in ROS). Have you changed something in the code? Maybe is something that has to do with the queues and timestamps, I don't really know, but I can say that it's not normal.

Ok, thank you. Then I suppose that there are something wrong.

940222JESUS commented 4 years ago

https://youtu.be/LalHqYyB2ic

In this video show the issue

trigal commented 4 years ago

no idea on this side.. maybe the TF tree is updated with delay on your configuration; check the timestamps of the laser messages and the TF messages too; @pietrocolombo was talking about the frequency of the simulated lidar, I think both are at 5Hz right? and please, please, please, paste text/code next time, not screenshots ;-)

940222JESUS commented 4 years ago

no idea on this side.. maybe the TF tree is updated with delay on your configuration; check the timestamps of the laser messages and the TF messages too; @pietrocolombo was talking about the frequency of the simulated lidar, I think both are at 5Hz right? and please, please, please, paste text/code next time, not screenshots ;-)

ok, this is the code

`

0 0 0 0 0 0 $(arg laser_visual) 5 270 1 2.35619 6.89405 0.070 16.0 0.015 gaussian 0.0 0.01 scan_izq base_scan_1

`

`

` And yes, both scanners are update at 5hz. And for my TF three i use the robot_state_publisher, this is the launch and the frecuency is 50 hz ` `
940222JESUS commented 4 years ago

no idea on this side.. maybe the TF tree is updated with delay on your configuration; check the timestamps of the laser messages and the TF messages too; @pietrocolombo was talking about the frequency of the simulated lidar, I think both are at 5Hz right? and please, please, please, paste text/code next time, not screenshots ;-)

ok, this is the code

<gazebo reference="base_scan_1"><!--base_scan_1--> <sensor type="ray" name="lds_lfcd_sensor_1"><!--name="lds_lfcd_sensor"--> <pose>0 0 0 0 0 0</pose><!--0 0 0 0 0 0--> <visualize>$(arg laser_visual)</visualize> <update_rate>5</update_rate><!--5--> <ray> <scan> <horizontal> <samples>270</samples><!--360 270--> <resolution>1</resolution> <min_angle>2.35619</min_angle><!--0.0 2.35619--> <max_angle>6.89405</max_angle><!--6.28319 6.89405--> </horizontal> </scan> <range> <min>0.070</min><!--0.120--> <max>16.0</max><!--3.5--> <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_1" filename="libgazebo_ros_laser.so"><!--name="gazebo_ros_lds_lfcd_controller"--> <topicName>scan_izq</topicName> <!--scan_izq--> <frameName>base_scan_1</frameName><!--base_scan_1--> </plugin> </sensor> </gazebo>

<launch> <node pkg="ira_laser_tools" name="laserscan_multi_merger" type="laserscan_multi_merger" output="screen"> <param name="destination_frame" value="base_footprint"/> <param name="cloud_destination_topic" value="/merged_cloud"/> <param name="scan_destination_topic" value="/scan_multi"/> <param name="laserscan_topics" value ="/scan_der /scan_izq " /> <!-- /scan_atras LIST OF THE LASER SCAN TOPICS TO SUBSCRIBE --> <param name="angle_min" value="-3.141592"/> <param name="angle_max" value="3.141592"/> <param name="angle_increment" value="0.0058"/> <param name="scan_time" value="0.0333333"/><!--0.0333333--> <param name="range_min" value="0.30"/> <param name="range_max" value="25.0"/> </node> </launch>

And yes, both scanners are update at 5hz. And for my TF three i use the robot_state_publisher, this is the launch and the frecuency is 50 hz

`

`

sorry but in the comment no appears the code, and i'm trying to put it but it doesn't appear. But the update is 50 hz

940222JESUS commented 4 years ago

sorry i unintentionally press the button that close this issue.

trigal commented 4 years ago

what is your system configuration? can you upload a picture of your TF tree? and please check the timestamps of the laser messages.

940222JESUS commented 4 years ago

what is your system configuration? can you upload a picture of your TF tree? and please check the timestamps of the laser messages.

What do you mean with system configuration?

This is the TF tree

Screenshot from 2020-07-15 10-08-35.png

This is the rate of topic of the merge

Screenshot from 2020-07-15 10-05-20.png

This is the rate of topic of the one scan, the frequency is 8hz

Screenshot from 2020-07-15 10-05-29.png