scan_time in laserscan msg

Typically: "How do I... ", "How can I... " questions
Post Reply
Posts: 18
Joined: 24 Jan 2014, 15:10

scan_time in laserscan msg

Post by Aklinger » 18 Mar 2014, 12:38

Hello all!
I try to send laserscan msgs from my robot via ros nodes. This works just fine, my only problem left is the frequency of publishing those msgs. At the moment I produce 1080 points which I want to send. (Two laserscanners and each produces 540 points) The frequency I get from this setup is around 5 scans per second. If I reduce the amount of points to one half I get 8/9 scans per second. Now the question:
1. Is there a way to speed up the whole process? I already let the child scripts run in parallel (viewtopic.php?f=9&t=1355 for more informations). Is there a way to parallelize the for loop where I get all the distances (r,dist,pt=simHandleProximitySensor(laserHandle) ?
2. If there is no direct way to parallelize this one I would love to adjust the scan_time of a laserscan. At the moment I cant controll (or at least I dont know where I can do that) the scan_time directly. It has a constant value of 0.025. But for my frequency it should be more like 0.2... What I do at the moment for building the string: Insert all the n scan points and at the end also the min angle, max angle and angle increment. Is it possible to add even more parameters to the end? Like the scan_time or time_increment.

The reason for this question is mapping. If the robot is moving during the laserscan, the laserscan itself is not bound to one position. But in the message created by vrep it is stated that the laserscan was made at one position (or almost at one position). Because of this violation my laserscan is deformed (for example if he is rotating). If the mapper would know that the laserscan isnt made in one position, he could deal with that (so it would be nice to have the real scan_time and time_increment).

Thank you!

Site Admin
Posts: 7691
Joined: 14 Dec 2012, 00:25

Re: scan_time in laserscan msg

Post by coppelia » 18 Mar 2014, 22:21

Hello Aklinger,

about your questions:

1) You could use vision sensors instead of proximity sensors (they operate usually faster). Demo model Models/components/actuators/Hokuyo URG 04LX UG01_Fast.ttm implements the faster version of the laser scanner, it however doesn't send the signal to ROS, you will have to modifiy the code yourself there.
Another option would be to reduce the range of the proximity sensor in the laser scanner model. This should increase the calculation speed. You could also exclude specific objects from detection (such as the robot that holds the laser scanner), this also should increase the detection speed.

2) With current simros_strmcmd_get_laser_scanner_data, you are right, the following values are fixed:
  • time_increment
  • scan_time
  • range_min
  • range_max
you could add a new ROS message (e.g. simros_strmcmd_get_laser_scanner_data2), and allow for 4 additional packed values at the end of the string argument. In that case, you will have to dedouble the routines in file ROS_server.cpp and allow for 4 additional values.


Post Reply