Obstacle Avoidance Controller for Robot | Webots Simulator | [Tutorial 8]

Поділитися
Вставка
  • Опубліковано 1 сер 2024
  • Curious to learn how to set up your own environment in a simulator like webots..!!? Then probably you are in the right place. This is a video from Soft_illusion Channel which aims to help the robotics community.
    The video begins with a ready custom robot with a distance sensor. Then we will learn how to make a controller. At the end we have a robot moving in a random direction by avoiding obstacles,
    #Obstacle_avoidance #Webots_tutorial #distance_sensor
    As an initial step before diving into Webots, it is important to understand it’s importance and what sets it apart from other simulators like Gazebo and NVIDIA Isaac. User-friendly, easy to learn, and implement on custom robots and applications are not the only pros. For those who understand the intricacy involved, this software is easy to integrate with ROS, multi-threading is possible and an amazing tool for multi-agent navigation.
    Wait, that’s not all..!! Good news for Reinforcement learning fans..!!! OpenAI Gym blends well with Webots.
    If the above information triggers any thought, please feel free to comment to initiate discussions not only on Gazebo or NVIDIA Isaac but also robotics in general.
    Robotics is not difficult..! It is inspiring and challenging..!! We are in the current era of the Robotics Revolution, where Disco will be the name of a pet robot, not a dog.
    This channel is driven with a motive to provide good robotics tools to aid everyone gains a good and simple understanding of this so-called complex robotics domain. Hopefully, this will build the bridge to turn the novel ideas of viewers into reality.
    Below are links to help you get started with any webots project.
    Download Webots:
    cyberbotics.com/
    Webots tutorial playlist:
    • Setting Up environment...
    The tutorials begin with the basic installation of the simulator and ranges to higher-level applications and actuator (linear/rotor) control.
    Tutorial Code link:
    cyberbotics.com/doc/guide/tut...
    Comment if you have any doubts about the above video.
    Also do make suggestions if you need a tutorial on any other project topics.
    Do share so that I can continue to make many more videos with the same boost. :)
    #obstacleavoidance #webots #controller
    Happy Coding. :)

КОМЕНТАРІ • 58

  • @anprabh1
    @anprabh1 3 роки тому +2

    Thank you very much! Not changing the anchor parameters caused the wheels to revolve instead of rotate.

  • @florikyoda1871
    @florikyoda1871 8 місяців тому +1

    For people who don't turn, check to see if the wheels are in the right order.
    The correct order of wheels in the code is left front (1), right front (2), left rear (3), right rear (4).
    Also if your wheels are not spinning but rolling, turn the robot in the direction where the wheels are spinning, also the red line is the direction of the wheels.

  • @christophkastner1357
    @christophkastner1357 3 роки тому +1

    nice

  • @emnaayari8238
    @emnaayari8238 3 роки тому +1

    hi, how can i get a navigation controller to a specific target without collision with obstacles, thanks a lot for help

  • @himansusekhardash5140
    @himansusekhardash5140 Рік тому

    can you make any video regarding the robot should reach the goal point after avoiding obstacles

  • @alaaskender2502
    @alaaskender2502 2 роки тому

    Thank you for great tutorial, when I run the simulation the robot does not move , it stays immobile!!

  • @kevantrade7649
    @kevantrade7649 4 роки тому +2

    hi,is it possible to do a video on lidar?

  • @marceltorne2985
    @marceltorne2985 3 роки тому +1

    Hi, could you share some info on how to create an OpenAI gym using Webots and then train the RL agent efficiently please? It would be awesome if you could, Thanks!

    • @coolrobotics
      @coolrobotics  3 роки тому

      This is a great application.
      I will suggest you to follow webots discord which link can be found in cyberbotics website
      You will get expert advise there .

  • @jingjing8081
    @jingjing8081 4 роки тому +1

    in the code about the distance sensor,i am wondering why 950 is used. The code like: “if (ds_values < 950.0) ”, if seting 1000, the car robot turn left wherever there are obstacles or not, and

    • @coolrobotics
      @coolrobotics  4 роки тому

      We can choose any value below 1000 because if there is no obstacle it gives the value of 1000. If we choose a very small value it will result in detecting obstacles when it reaches too close to the robot. So you can choose your value and see how the simulation works and make changes accordingly.

  • @bd9249
    @bd9249 4 роки тому +1

    How to mark one tile with some letter('P') or image to denote parking area so that the robot can park only there. Any easy way to find the exact co-oridinates of corners of a tile

    • @coolrobotics
      @coolrobotics  4 роки тому +1

      A very good question...
      You can use IMU and GPS readings.
      1. Keep robot on that tile. (Which you want to mark as P).
      2. Save the IMU and GPS data of that point.
      3. Compare robot co-ordinates with the tile values.
      4. If it is near the value trigger stop.

    • @bd9249
      @bd9249 4 роки тому

      @@coolrobotics Thank You very much for the response. You are really a motivator for a learner like me. I have GPS and IMU filtted in to the robot. Is it possible I can compare the (X,Z) of GPS between the co-ordinates of a tile so as to stop on the designated tile, rather than comparing exactly one GPS co-ordinates as the robot may not reach that 'saved' point exactly but could be nearer. 2) I should the get the distance covered by the robot by multiplying the position sensor value of 1 front wheel(for example) at any given time by the radius of the wheel. Also, how can I rotate the robot on Z Axis by 90 when a certain condition is met e.g. the robot has travelled 30 meter and I would like to make the robot stand upright. Can I apply 0(zero velocity) to both rear wheels to make that possible?

  • @jokercrazy3330
    @jokercrazy3330 3 роки тому +1

    For my 4-wheel robot, when I set the velocity for all four wheels to the same value then my robot can move forward as expected but if I would set the velocity for four wheels with different values, for example when I want it to move right or left, it doesn't work so my robot can only go straight forever. Can you guess where I might have gone wrong that resulted in this error?

    • @coolrobotics
      @coolrobotics  3 роки тому

      You can set both right wheels with same velocity and left wheel with the same(but can be different then right wheel) in order to steer

    • @jokercrazy3330
      @jokercrazy3330 3 роки тому +2

      @@coolrobotics yes, i have tried to do that but it doesn’t work. Is it because my design or friction or may be something else?

    • @coolrobotics
      @coolrobotics  3 роки тому

      @@jokercrazy3330 Have you made any changes in friction

    • @robotics9965
      @robotics9965 Рік тому

      Same my problem 🥲

  • @tutorstown973
    @tutorstown973 4 місяці тому

    My robot passes right through the walls i made from your earlier tutorials.

  • @bd9249
    @bd9249 4 роки тому +1

    What is the setting it tells that the robot would move in the direction of the sensor and not in opposite direction? Also, could you explain the logic of IF and FOR loop constructs.

    • @coolrobotics
      @coolrobotics  4 роки тому

      Direction of robot is defined with sign of velocity is set-velocity.
      Or if you are doing position controller then value of position you give in set-position.

    • @coolrobotics
      @coolrobotics  4 роки тому

      If loop is for making sure there is are no obstacles while we are going forward.
      And for loop is for checking obstacles through all the sensors.( In our case it is 2)

    • @bd9249
      @bd9249 4 роки тому

      @@coolrobotics What I mean as how to ensure that the direction of move of the Robot is aligned with the position of the distance sensor put on the front i.e. how does it know that the robot should move(assuming + velocity) in the direction the distance sensors are positioned(Front of.the robot)

  • @enbakomghebremichael5406
    @enbakomghebremichael5406 3 роки тому +1

    Could you show as Obstacle Avoidance controller with python

  • @tomf6920
    @tomf6920 4 роки тому +4

    Hi, nice tutorial, whenever i click play the whole robot sinks into the ground as if the ground is like water. Any ideas on how to fix it?

    • @coolrobotics
      @coolrobotics  4 роки тому

      Add bounding objects to your nodes

    • @tomf6920
      @tomf6920 4 роки тому

      @@coolrobotics hi, I have however it's still falling through the floor

    • @coolrobotics
      @coolrobotics  4 роки тому

      Did you add a bounding object of same size as node.

    • @tomf6920
      @tomf6920 4 роки тому

      @@coolrobotics I've just changed the physics to have mass of +1 as it was originally -1 and it's now working. However it is moving backwards not forwards aha

    • @tomf6920
      @tomf6920 4 роки тому

      @@coolrobotics okay I've moved the sensors to the other side but they dont stop the robot and turn it around it just keeps moving?

  • @teetanrobotics5363
    @teetanrobotics5363 4 роки тому +3

    Video 6,8,9 of the Webots playlist not loading above 360p. I have tried it on multiple computers and multiple networks. Could you please check it out once ?

    • @coolrobotics
      @coolrobotics  4 роки тому +3

      Omg, yes you are right. It had been loading in full HD all these days. Something has surprisingly gone wrong only on these 3 videos. I am looking into the issue, just contacted UA-cam. Thank You so much for letting us know.

    • @teetanrobotics5363
      @teetanrobotics5363 4 роки тому +1

      @@coolrobotics Hey I need help in adding lidar to the 4 this robot. Could you please tell me the exact steps or if possible make a short video on the same ?

    • @coolrobotics
      @coolrobotics  4 роки тому

      You can add lidar. Similar to GPS or IMU sensor.
      Just make a solid and make lidar as children of that solid

    • @teetanrobotics5363
      @teetanrobotics5363 4 роки тому

      @@coolrobotics I saw the code for the lidar on the website documentation. It is very short and I am not able to understand how to add it

    • @GiuseppeGiu96
      @GiuseppeGiu96 3 роки тому +1

      @@coolrobotics I was became mad ahhah, it isn t my proplem only

  • @yatishv8063
    @yatishv8063 3 роки тому +1

    When obstacles is detected then robot turns almost 360° and move but I wanted robot to just take either left or right and move in same direction which it was moving before detecting obstacle.
    I am not getting wat to change in program to do like that.
    Plz help me out as soon as possible, don't have much time.

    • @coolrobotics
      @coolrobotics  3 роки тому

      For that case you will need to implement navigation algorithms.
      You will need to know the map before hand and will need to use planners for achieving the goal.
      Shorter way can be if you see and obstacle make a 90 degree turn.
      Go straight for some distance again make a 90 degree turn so that you are back on your direction.
      If you see obstacles again repeat the loop

    • @coolrobotics
      @coolrobotics  3 роки тому

      You will need IMU for this application.

    • @yatishv8063
      @yatishv8063 3 роки тому +1

      @@coolrobotics Der is a video wch is tutorial 11 wch is about IMU.... I vl try that once.
      For navigation can I program in Aruduno itself in case of prototype model.

    • @coolrobotics
      @coolrobotics  3 роки тому

      If you are good at aurdino sure

    • @yatishv8063
      @yatishv8063 3 роки тому +1

      @@coolrobotics Thank you very much for clarification bro

  • @josephcampugan2439
    @josephcampugan2439 2 роки тому +2

    good day, do you have a python version of this tutorial?
    godbless and stay safe

  • @valeriasalas4700
    @valeriasalas4700 4 роки тому +2

    Is the code available for use?

    • @coolrobotics
      @coolrobotics  4 роки тому +1

      The code is available in the description of the video.

  • @shridhardodamani2728
    @shridhardodamani2728 4 роки тому +2

    can you please help me in creating proto file.

    • @coolrobotics
      @coolrobotics  4 роки тому

      cyberbotics.com/doc/guide/tutorial-7-your-first-proto
      You can refer this link.
      And let me know if any issue.

    • @shridhardodamani2728
      @shridhardodamani2728 4 роки тому

      @@coolrobotics Thank you , I have referred it. But unable to get proto file. But I have empty proto folder

  • @Ahmadtar-no6sz
    @Ahmadtar-no6sz 3 місяці тому

    please CAN YOU SHARE THE FILES OF THIS PROJECT