More information on the Medium page: https://medium.com/robotics-weekends/ros-node-for-vl53l0x-range-sensor-56edbe5d9172
Sensor measurement data is converted into simple binary protocol and is sent to the ROS node via USB connection.
The wiring diagram is very simple - just connect the sensor to the Arduino’s I2C bus:
The firmware for Arduino can be found in arduino/vl53l0x_ros directory. The firmware requires Adafruit_VL53L0X library.
Every message, sent from Arduino, starts with 0xAD byte, followed by message type byte, and ends with \r\n (0x0D, 0x0A) sequence. There are 4 message types:
- 0xEF — initialization failed;
- 0xE0 — initialization was successful, no errors;
- 0x1D — range message, followed by two bytes of measured range;
- 0xEA — out of range.
vl53l0x_node ROS node publishes sensor_msgs::Range message into range_data topic. Node has several optional configuration parameters:
- port - which usb port to use. Default: /dev/ttyUSB0
- baud_rate - transmission speed between sensor and node. Default: 57600
- frame_id - tf frame ID of the sensor. Default: ir_range
- firmware_version - reserved. Not used as for now.
- More information on the Medium page - https://medium.com/robotics-weekends/ros-node-for-vl53l0x-range-sensor-56edbe5d9172
- Case 3D STL files — https://www.thingiverse.com/thing:4324054
- VL53L0X datasheet — https://www.st.com/resource/en/datasheet/vl53l0x.pdf
- Range message documentation — https://docs.ros.org/melodic/api/sensor_msgs/html/msg/Range.html