A cheap system for detecting curved lanes (OpenCV, Raspberry Pi 3 and Nvidia Jetson TX2)

A relatively inexpensive method with good results for a robot capable of detecting the lines and the curved lines of a road is described in this project. Kemal Ficici has used OpenCV for computer vision, a Raspberry Pi 3 and an NVIDIA Jetson TX2. If we add the video camera, wires, and other accessories, the project does not exceed the amount of 1000 Euros for the hardware parts. A small price for a system capable of detecting lines and curved lines.

Detecting curved lanes in camera space is not very easy. – says Kemal Ficici

The system uses the contrast between lane lines and road to detect the driving path.

Here’s the current image processing pipeline:

  • Distortion Correction
  • Perspective Warp
  • Sobel Filtering
  • Histogram Peak Detection
  • Sliding Window Search
  • Curve Fitting
  • Overlay Detected Lane
  • Apply to Video

The system also has weaknesses. It is affected by shadows, drastic changes in road texture, rain and snow.

How the system works:

New ToF Breakout Board with VL53L1X Distance Sensor and a Measurement Range Between 4 cm and 4 m

Breakout Board with VL53L1X Distance Sensor

Breakout Board with VL53L1X Distance Sensor

This new breakout board from Sparkfun has a 1-millimeter resolution and around +/-5mm accuracy – which is good if you want to use the sensor to detect objects or create maps.

The sensor emits a class 1 IR laser (940 nm) which theoretically is safe even for long-term intentionally viewing.

The I2C interface can be used with both a microcontroller (Arduino) or a single board computer (Raspberry Pi). If you use Arduino, you have the Sparkfun VL53L1X Arduino library (less work and more time for you).

What I do not like is the operating voltage which should be between 2.6V and 3.5V. If I want to power it directly from Arduino or Raspberry Pi is ok. Otherwise, I need a 3.3V power supply module or a 5V to 3.3V level shifter.

Theoretically, a ToF module can be used outside with the risk of lower performance. Unfortunately, Sparkfun says nothing about using this sensor outside.

Which Is The Best ROS Ready Robot Arms Under $1000?

I have this robotic arm with 6-axis and very cheap servo motors. When I bought it, I did not think I would use it to who knows what applications. I buy it because is cheap and I can control it with an Arduino Mega and ROS.

The problem is that I want to build a robotic arm capable to identify objects (like an apple or a pear), to pick the fruit from a tree, and put it in a basket near the robotic arm. For these operations, I need an arm with a relatively solid structure and some powerful servo motors. In conclusion, the kit I have is not helping me.

The second plan is to buy a ROS ready robotic arm with servo motors that can handle a weight around 200 grams. Because it is a personal project with a limited budget (maximum $ 1000), I searched for and found the following three robotic arms that would fit my project.

The first option is a PhantomX robotic arm with 4 degree-of-freedom and a gripper with a rated holding strength of up to 500g, while the wrist itself can lift up to 250g horizontally.

The second option is also a PhantomX arm that can handle the same weight as the first one. But it comes in addition with 5 degrees of freedom, a greater range of action and up to 300 degrees of motion.

The third option is the most expensive and I may have the surprise not to receive it in the next few months when I need it. It’s about Niryo One. For now, the arm can only be pre-ordered. The combination of Raspberry Pi, Arduino, ROS, parts that can be printed with a 3D printer – attracts me a lot.




YDLIDAR F4 and G4 are two LIDAR (Light Detection and Ranging) sensors for environmental scanning, SLAM application… in other words, the sensors are designed for use in robot navigation.

The price range is $259.00 for F4 and $419.00 for G4. Both sensors are in direct competition with RPLidar A1M8(~$219.00) or RPLIDAR A2M6 (~$600.00).

I scan a little bit the specifications to see what is good and bad with these sensors:
the good

  • 12m scanning range (F4) and 16m scanning range(G4) – enough for autonomous robots in agriculture or construction fields;
  • both sensors include a safe low power infrared transmitter conforms to the FDA safety standard of Class 1 laser. This means that is safe to work with these sensors, the human eye is not affected;
  • only F4 uses a USB connection with a computer;
  • only F4 has complete drivers, supporting Windows, Android, ROS, and Linux system;

the bad

  • I try to find more information about who is the manufacturer. Their site is not completed and some links don’t work. The link to the Contact page will redirect you to something that can be called “About us”, while “About ydlidar” redirect to a 404 page. This could be interpreted as small details, but one question came into my mind – how this manufacturer will provide support and documentation for these sensors if they can not solve their own site problems?

An ultrasonic sensor for dirty applications

5V Waterproof Ultrasonic Module

5V Waterproof Ultrasonic Module

Now I build a 4WD outdoor robot and I was still thinking how to mount the Maxbotix’s ultrasonic sensors so that I don’t have problems with the dust and any other dirty things. Luckily, I discovered this waterproof sensor.

But there are some negative aspects. The sensor is blind for the first 25 centimeters and in many cases I have to deal with obstacles that may appear right in front of the robot (the wind pushes the tree branch in front of the robot).

As a positive side, the sensor is Arduino compatible and is working with 5V. The maximum range of the sensor is 4.5m, but some users seem to have some issue with the maximum distance. For me, a range of maximum 2 meters is much more than I would need. So, I should not worry about the maxim range.

Other important specifications:

  • resolution: 0.5cm;
  • it detects an obstacle at an angle less than 50 degrees;
  • acoustic emission frequency: 40khz;
  • pins: + 5V, Trig (control side) RX, Echo (the receiver) TX,
    GND (negative);

Otherwise, the sensor price is $14.99 without the cost of shipping.

If you don’t have sensors …

use your smartphone to give your robot senses, so it can see where it’s going. Almost any smartphone – even a $30 device – is like a box with sensors. All these sensors can be used for a robot. A sensor like a camera to capture images, the accelerometer and gyro to drive the robot, and the pressure and proximity sensors for any other application.

Husarion, the company behind CORE2, has been developing an Android application that makes available the smartphone sensor readings through a ROS node.

The application is called hNode and creates a network between the smartphone, the robot, a laptop with ROS and the Husarion cloud.

I’m not sure, but to work in this way, most probably the robot should use the CORE2-ROS (running ROS) controller. More details here.

4WD car chassis kit for outdoor adventures

Red High Power 4WD Smart Car Chassis Kit

Red High Power 4WD Smart Car Chassis Kit

I’ll start the description of the chassis from the wheels because I know what I’m talking about. I bought four similar wheels with non-inflatable rubber tire from eBay and I mounted them on a DIY mobile robot. The robot has a weight of around 10Kg (yes, two 12V sealed acid batteries). The wheels behaved quite well on uneven concrete. I did not get to test them on the grass because one of my motor axes has been broken.

Well, in other words, if the weight of the robot will not exceed 5-6 Kg, these wheels work very well on uneven concrete and most probably on grass. If you exceed this weight, when you turn around your robot, the rubber tire gives signs that would get off the rim.

The DC 12V motors are powerful enough to push the platform on almost any terrain. Without electronics and batteries, the platform weight around 2,2Kg. It is a big weight, but it must be taken into account that the chassis is made of iron.


  • Power Supply Battery: 3.7v 18650*3 (NOT included)
  • Motor: 4pcs
  • Motor Voltage: DC 12V
  • Load current: 0.68A
  • Locked rotor current: 2.19A
  • Motor Speed: 300±10% (no-load) 245±10% (load)
  • Rated moment: 1.8kg.cm
  • Chassis Material: Iron
  • Color: Red
  • Motor size: 3.7*5.8cm/ 1.4*2.2inch
  • Output shaft size: 0.6*1.5cm
  • Wheel size: Dia :12.6cm/ 4.9inch width:5.9cm/2.3inch
  • Wheel Material: Rubber+plastic
  • Product Size: 27*27*12cm/ 10.6*10.6*4.7inch
  • Package Size: 38.5*29*6.5cm / 15.1*11.4*2.5inch
  • Gross Weight: 2255g/4.9 lb

The price of the chassis is $99.99 and not include the controller like Arduino or Raspberry Pi, the motor controller and the batteries.

If you don’t have plans to build an outdoor chassis from scratch, this metal chassis could be a solution for your project.

Orange Pi 4G-IOT worth some attention

Orange Pi 4G-IOT

Orange Pi 4G-IOT

This board is not designed with robotics in mind, but it could be helpful in some applications.

It has an ARM processor, Android OS, and Cellular connectivity. In other words, the board can run ROS and stay connected to the 4G Internet via nano-SIM. For most of us who build adventurous robots with an Internet connection, Orange Pi 4G-IOT can replace the Raspberry Pi board and a 4G USB dongle.

Also, the price is very attractive. On Aliexpress the board price is $45.00 – the price does not include the shipping costs.

I know that it’s about marketing, but about the fact that the board is open-source, I still do not understand how it would help me integrate it more easily into my projects or develop applications in another niche.

Regarding the features, the board supports sensors like accelerometer, fingerprint identification for security, IR control, camera, and touchscreen display.

Orange Pi 4G-IoT has a built-in Emmc memory with a capacity of 8GB. The memory space is enough to run the OS and some code, but it makes me nervous when I think that the board was designed for games and multimedia.

The full list of specifications:

Orange Pi 4G-IoT specifications:

  • SoC – Mediatek MT6737 quad-core Cortex A53 processor @ 1.1/1.3 GHz with Arm Mali-T720MP1 GPU
  • System Memory – 1GB DDR3
  • Storage – 8GB eMMC flash + micro SD slot
  • Video Output – HDMI, LCD display interface with touch panel support
  • Audio – 3.5mm earphone jack, built-in microphone
  • Cellular Connectivity

  • nano SIM card slot
  • “GSM” antenna + diversity antenna
  • 2G – GSM @ 850/900/1800/1900 MHz
  • WCDMA – B1/B2/B4/B5/B8
  • CDMA2000
  • LTE Cat 4
  • FDD-LTE – B1/B2/B3/B4/B7/B107/B20
  • TDD-LTE – B38/40/41B
  • Connectivity – WiFi, Bluetooth, FM, and GPS with antenna
  • Camera – 25-pin ZIF connector for 13MP camera
  • USB – 3x USB host ports, 1x micro USB port (only for flashing firmware)
  • Sensors – Accelerometer, fingerprint (how?)
  • Expansion – 40-pin header with 2x SPI, 3x I2C, 2x UART, 1.8V
  • Misc – IR receiver, power key, power and status LEDs
  • Power Supply – 5V/2A via power barrel jack; battery support through “weld plate”
  • Dimensions – 85 x 55 mm


LS01 Rotating 2D LIDAR – 360 ° with distance detection range of 8m or 16m

LS01 Rotating 2D LIDAR - 360 °, 8 m

LS01 Rotating 2D LIDAR – 360 °, 8 m

Leishen produces LIDAR sensors with a price range that exceed $5000, making these almost inaccessible to most of us. But their focus seems to be changed with a new series of LIDAR sensors – LS01.

LS01 comes in two versions – with 8 meters ($260.00) and 16 meters ($298.00) range.

The most important specifications – the below specs are available for both versions:

  • Performs a 360 degree laser scan;
  • Produces 2D point cloud data map for SLAM, obstacle avoidance, route planning, etc.;
  • Communication Interface: URAT (Customizable to I2C,SPI?RS-485,etc.);
  • Accuracy Within 1m <10mm;

Broadcom released ToF laser light sensor for measurements up to 10 meters (black surfaces)



This is the definition of the ToF principle:

Time-of-Flight principle (ToF) is a method for measuring the distance between a sensor and an object, based on the time difference between the emission of a signal and its return to the sensor, after being reflected by an object.

If you read the above principle, most probably you remember it from the ultrasonic sensors.

Back to the Broadcom’s sensor, it uses the ToF principle to measure the distance and motion of objects. If an ultrasonic sensor uses ultrasounds to measure the distance and detect the motion of an object, the AFBR-S50 sensor uses optics. The sensor uses up to 3000 frames per second with up to 16 illuminated pixels for detection and measurements.

According to the specifications, the sensor can be used outside. We know that the optical sensors don’t have a good return in strong sunlight. This one seems to have on white, black, colored and metallic reflective surfaces.

Other important specifications:

  • measure distances up to 10m for a black target. No data about other targets;
  • the accuracy of < 1 percent (I guess that this is only for the black target!?);
  • the voltage supply is 5V;
  • the data is transferred via a digital SPI interface;
  • the sensor supports up to 3000 frames per second;

The area of applications for the AFBR-S50 sensor is especially robotics and automation.