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. :)
Thank you very much! Not changing the anchor parameters caused the wheels to revolve instead of rotate.
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.
nice
Thank you
hi, how can i get a navigation controller to a specific target without collision with obstacles, thanks a lot for help
can you make any video regarding the robot should reach the goal point after avoiding obstacles
Thank you for great tutorial, when I run the simulation the robot does not move , it stays immobile!!
hi,is it possible to do a video on lidar?
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!
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 .
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
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.
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
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.
@@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?
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?
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
@@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?
@@jokercrazy3330 Have you made any changes in friction
Same my problem 🥲
My robot passes right through the walls i made from your earlier tutorials.
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.
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.
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)
@@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)
Could you show as Obstacle Avoidance controller with python
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?
Add bounding objects to your nodes
@@coolrobotics hi, I have however it's still falling through the floor
Did you add a bounding object of same size as node.
@@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
@@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?
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 ?
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.
@@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 ?
You can add lidar. Similar to GPS or IMU sensor.
Just make a solid and make lidar as children of that solid
@@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
@@coolrobotics I was became mad ahhah, it isn t my proplem only
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.
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
You will need IMU for this application.
@@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.
If you are good at aurdino sure
@@coolrobotics Thank you very much for clarification bro
good day, do you have a python version of this tutorial?
godbless and stay safe
Sorry for that but nope
@@coolrobotics okay sir, thank you
Is the code available for use?
The code is available in the description of the video.
can you please help me in creating proto file.
cyberbotics.com/doc/guide/tutorial-7-your-first-proto
You can refer this link.
And let me know if any issue.
@@coolrobotics Thank you , I have referred it. But unable to get proto file. But I have empty proto folder
please CAN YOU SHARE THE FILES OF THIS PROJECT