Programming Elegoo Smart Robot Car v4.0 | Part 3

Поделиться
HTML-код
  • Опубликовано: 25 дек 2022
  • In the 3rd episode of my bots4all series, I am going to describe how to program the Elegoo Smart Robot Car V4.0 in Python to track a ball. I will show how I solved the problems of detecting the ball in the image, translating its coordinates in the image to the coordinates on the floor, and estimating the car's trajectory to reach the ball.
    The code is in
    github.com/bots4a11/ElegooRob...

Комментарии • 25

  • @ezrakoper
    @ezrakoper 2 месяца назад

    Please make more then 3 videos. You are on the right track

  • @fredboekhorst5817
    @fredboekhorst5817 Год назад +1

    Excellent video's!

  • @kyoumahououin2858
    @kyoumahououin2858 Год назад +1

    Congrats! Good work!!!

  • @simonchantack23
    @simonchantack23 3 месяца назад +1

    LOVE IT!! THAT'S AWESOME!!

  • @dougjo4863
    @dougjo4863 6 месяцев назад +1

    This is amazing

  • @fabian2973
    @fabian2973 Год назад +2

    Insane!

  • @abdenurmohammed2472
    @abdenurmohammed2472 8 месяцев назад

    incredible

  • @felipoofelipo
    @felipoofelipo 6 месяцев назад

    amazing!!!

  • @thomas2004ch
    @thomas2004ch Год назад

    great!

  • @talhafaizan1196
    @talhafaizan1196 7 месяцев назад

    hi, brother i recently bought this car and the obstacle avoidance mode dosen't to work properly everytime i put it on obstacle avoidance mode it just move the servo motor come back and rotate 360 and does the same again and again can you help me.

  • @yavuzakyuz7248
    @yavuzakyuz7248 Год назад

    Can we use Java for programming this robot or can it be programmed with python only?

    • @bots4all
      @bots4all  Год назад +1

      I assume you can use Java or even C++. I used only standard features of Python such as opening a WiFi socket and sending / receiving data through that socket. Access to the car's camera is through url. All these features are available in Java. I used OpenCV for image processing, and it seems to be available in Java and C++. So, most likely the answer is yes.

    • @huitikho
      @huitikho Год назад

      @@bots4all Can we have the PPT for the Mathematical Model and Formula shown in the vidoe ??

    • @giorgioguglielmone
      @giorgioguglielmone Год назад

      Yes, java, c++, etc.

  • @mrcooldubes117
    @mrcooldubes117 5 месяцев назад

    is it possible to make it where it follows you

    • @bots4all
      @bots4all  4 месяца назад +2

      It is possible, but I will be much harder than following a ball. Even following a ball had many challenges. The biggest one was isolating the ball from the background. You can do it by either the shape or the color. Detecting the ball by its shape didn't work well because under different lighting conditions the ball often didn't have a round shape. There were too many other things in the background being mistaken for a ball. Doing it by color worked much better, but the ball color had to be chosen very carefully so that it stood out against the background. I first chose a red ball, but with the brown floor and furniture, there were too many false detections. The green color worked well. If you want the car to follow you, you need to write a code of recognizing a human figure or a face in the camera images. Neural networks can do that, but I haven't learned them yet.

    • @mrcooldubes117
      @mrcooldubes117 4 месяца назад

      @@bots4all can you not make it follow a Bluetooth signal instead of a color ?

    • @martianvenusian6894
      @martianvenusian6894 4 месяца назад

      Yes, it is. And I almost have finished this task myself. I used an object detection machine learning model to detect a desired object.

    • @mrcooldubes117
      @mrcooldubes117 4 месяца назад

      @@martianvenusian6894may I have the code?

  • @giorgioguglielmone6528
    @giorgioguglielmone6528 Год назад +2

    Great tutorial, you did very well. Hope you continue with more videos about this robot car. I bought it too and I would like to use C++ to remotely control it from my pc (Windows 10) using WiFi. If you are interested, there is the ASIO library for TCP/IP communication in C++ for Windows/Linux/Mac platforms. I followed the tutorial at the following link: ruclips.net/video/nkCP95zLvSQ/видео.html
    Here we used the old robot model that used bluetooth instead of WiFi.
    Could you make a video explaining how to pilot the robot from a pc, using the camera ?
    It would be very interesting if we did the same series using C++ this time ;-)

    • @bots4all
      @bots4all  Год назад

      Thank you for the kind words. I haven't learned C++ yet. The part 2 of this series talks about how to get the camera images into Python running on a PC. I am not sure what you meant by "piloting". Is it a manual control on a PC similar to the phone app from Elegoo? When I get to it, my next episode will be about using the motion sensor data from this robot car to get a position estimate.

    • @giorgioguglielmone6528
      @giorgioguglielmone6528 Год назад

      @@bots4all Yes, I would like to create a C++ program that works like Elegoo's "EleRobot" app, so as to command the robot.
      I also tried to use the robot without using the IP 192.168.4.1 (hotspot) but the IP of my home network 192.168.1.81 still as a webserver. However, I encountered problems using your python program as after connecting to the IP 192.168.1.81 (the robot) successfully, after the first command the connection drops. I wonder if you can help me...

    • @bots4all
      @bots4all  Год назад

      @@giorgioguglielmone6528 The drop in connection to the Elegoo car could be due to "heartbeats" that the car's WiFi expects to verify an active connection. I had to disable the heartbeats in ESP32_CameraServer_AP_20220120.ino. I explained it in part 1 of this series. The code is also here: github.com/bots4a11/ElegooRobotCarV4/blob/main/ESP32_CameraServer_AP_20220120/ESP32_CameraServer_AP_20220120.ino
      My goal for part 4 is to create a position tracking code for the Elegoo car inspired by this project: x-io.co.uk/rolling-ball-tracking-with-gyro/

    • @giorgioguglielmone6528
      @giorgioguglielmone6528 Год назад

      @@bots4all To better understand how to write communication with the robot in C++, I decided to better understand your python code. I'm not an expert in this scripting language, so I ask you, if you explain the steps you followed in writing your program. In particular, I'm interested in knowing how you established communication with the robot, what messages you expect to receive from the robot-server in order to open communication with it from the python-client. Also I would like to understand the use of Jason in forming the message to be sent via tcp ip to the server-robot.

    • @bots4all
      @bots4all  Год назад

      @@giorgioguglielmone6528 It's been a while since I wrote that communication code. I remember having a lot of trouble communicating with the car's WiFi at the beginning, with a lot of trial and error. I used TCP sockets. The car's WiFI was used as a client, and the computer's WiFi was used as a server. The link was established by using the connect method to the car's client socket, and then send / recv data. I tried to use the car's WiFi as a server with the bind method of connecting as some users do, but I never could make it work. What under the hood of the socket.socket and socket.connect declarations is beyond my knowledge.