0
$\begingroup$

Rosanswers logo

Hello ROS community, I'm an hobbist, ROS enthusiast and this is my first question on this community.

I've successfully created a small lidar equipment(based on VL53L0X sensor + ESP8266 +stepper motor, without slipring ) and the relevant ROS node (kinetic) publishing sensor_msgs::LaserScan messages.

The motion is given by a stepping motor going alternatively CW and CCW (for a range of 270 deg limited by a couple of end-switches). Unfortunately VL53L0X acquisition time is around 23mSec, limiting scanning speed to less than 1 Hz (unless reducing scan_msg->ranges_length).

Currently,the scan/acquisition phase is limited to Countrclowise motion, but I'd like to increase scan cycle frequency (i.e. to reduce scan_msg->scan_time) , exploiting also the returning phase of motor, when it is moving clockwise.

My question is if is it possible to correctly send a scan message derived from an acquisition phase made when the motor is moving in clockwise direction.

It is not a problem to reverse the sensor data array (scan_msg->ranges[i]) , but what about time? (samples successive in time cannot be placed in the past). Is there any solution or CW sampling is definitively not allowed? Thank you in advance.


Originally posted by luke1962 on ROS Answers with karma: 3 on 2018-02-26

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Some thoughts of mine:

  • You could simply define your own custom message called LaserScanCW or something. If you only intend to use the data yourself then it is only up to your own code to interpret it correctly.
  • You could "pretend" there are two laser scanners. They both spin CCW and each have their own coordinate frame. The frame of one scanner would be upside-down compared to the other frame. So basically the CCW data is published using one frame and the CW data is published using another frame.

Just some thoughts off the top of my head, hope it helps!


Originally posted by IanCol with karma: 253 on 2018-02-26

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by gvdhoorn on 2018-02-27:
I would suggest using the second option, as that would allow you to reuse all the existing infrastructure. Using custom messages would make that impossible.

Comment by luke1962 on 2018-11-13:
Thank you (sorry for my late late reply) but at the end I gave up with this approach in favor of real LIDAR. However now I recognised that the problem could have been resolved as suggested, creating two messages, one of which has z axis frame upside-down.

$\endgroup$

Your Answer

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