Тёмный
Mouad Boumediene - Hobby Coding
Mouad Boumediene - Hobby Coding
Mouad Boumediene - Hobby Coding
Подписаться
Just having fun simulating the world :)
Bluetooth LED Dimmer | Arduino Project
13:48
2 года назад
DC Motors: A Practical Guide  | INTRO
1:45
2 года назад
Комментарии
@kenjifugimoto
@kenjifugimoto 13 часов назад
What software did you use for this?
@q-69sumukhms34
@q-69sumukhms34 День назад
Can you explain why you took sampling time as 0.5ms?
@MauricioHirano-f6r
@MauricioHirano-f6r 5 дней назад
Magnolia Cove
@thePavuk
@thePavuk 26 дней назад
Real Ultrasonics sensors has few additional parameters 1) typical sampling frequency is 50Hz so they won't update in real time. If robot moves with speed 1m/s toward wall, it moves 2cm before update. It's even more significant during rotation. 2) ultasonic sensors has high noise. Usually +/- 2cm for cheap one with 250cm range. 3) They can have issue... Same model of US usually works on same frequency = you has to trigger sensors one by one because they interfere with each other.
@stefano8936
@stefano8936 Месяц назад
7:20 F-Bomb dropped
@BELABEDAbdelkader-k7c
@BELABEDAbdelkader-k7c Месяц назад
Will we see future videos of ROS and Gazebo using deep reinforcement learning?
@user-iq1gz4hp9n
@user-iq1gz4hp9n Месяц назад
hi i really want to know how to i can create model 'h5'
@ChesterLotter-ik8mq
@ChesterLotter-ik8mq Месяц назад
Is there a place to play these
@hobby_coding
@hobby_coding Месяц назад
not yet, it's just an ai training using Deep Reinforcement Learning.
@hobby_coding
@hobby_coding Месяц назад
Enjoyed this content ?
@buseo5936
@buseo5936 Месяц назад
Hello. I implemented a state feedback control using the state-space model with the provided A, B, C, and D matrices in Simulink, but I noticed that the state variables are diverging. When I checked the poles using the eig function, I found that there is a positive real number included. Why does the regulator work correctly in the Simscape model, but when I create a separate state feedback model, it produces diverging values? Also, when designing a state feedback model in Simulink, should the initial value of the integrator be set to the same value as the step input in Simscape?
@raginigupta4857
@raginigupta4857 Месяц назад
ROBOT.py----> import pygame import math import numpy as np def distance(point1,point2): point1 = np.array(point1) point2 = np.array(point2) return np.linalg.norm(point1- point2) class Robot: def __init__(self, startpos,width): self.m2p= 3779.52 #from meters to pixels #robot dims self.w = width self.x= startpos[0] self.y = startpos[1] self.heading =0 self.vl = 0.01*self.m2p #meters/s self.vr = 0.01*self.m2p self.maxspeed = 0.02*self.m2p self.minspeed = 0.01*self.m2p self.min_obs_dist = 100 self.count_down = 5 #seconds def avoid_obstacle(self,point_cloud,dt): closest_obs = None dist = np.inf if len(point_cloud) > 1: for point in point_cloud: if dist > distance([self.x, self.y], point): dist = distance([self.x,self.y], point) closest_obs = (point,dist) if closest_obs[1] < self.min_obs_dist and self.count_down > 0: self.count_down -= dt self.move_backward() else: #reset count down self.count_down = 5 #move forward self.move_forward() def move_backward(self): self.vr = - self.minspeed self.vl = - self.minspeed/2 def move_forward(self): self.vr = self.minspeed self.vl = self.minspeed def kinematics(self, dt): self.x += ((self.vl+self.vr)/2) * math.cos(self.heading) * dt self.y -= ((self.vl+self.vr)/2) * math.sin(self.heading) * dt self.heading += (self.vr - self.vl) / self.w * dt if self.heading>2*math.pi or self.heading<-2*math.pi: self.heading = 0 self.vr = max(min(self.maxspeed, self.vr), self.minspeed) self.vl = max(min(self.maxspeed, self.vr), self.minspeed) class Graphics: def __init__(self, dimentions, robot_img_path, map_img_path): pygame.init() #COLORS self.black = (0, 0, 0) self.white =(255, 255, 255) self.green =(0, 255, 0) self.blue =(0, 0, 255) self.red = (255, 0, 0) self.yel = (255, 255, 0) #----MAP---- #load imgs self.robot = pygame.image.load(robot_img_path) self.map_img = pygame.image.load(map_img_path) #dimentions self.height, self.width = dimentions #window settings pygame.display.set_caption("Obstacle Avoidance") self.map = pygame.display.set_mode((self.width, self.height)) self.map.blit(self.map_img, (0,0)) def draw_robot(self,x,y, heading): rotated = pygame.transform.rotozoom(self.robot, math.degrees(heading), 1) rect = rotated.get_rect(center=(x, y)) self.map.blit(rotated, rect) def draw_sensor_data(self, point_cloud): for point in point_cloud: pygame.draw.circle(self.map, self.red, point, 3, 0) class Ultrasonic: def __init__(self, sensor_range, map): self.sensor_range = sensor_range self.map_width, self.map_height = pygame.display.get_surface().get_size() self.map = map def sense_obstacles(self, x, y, heading): obstacles = [] x1, y1 = x, y start_angle = heading - self.sensor_range[1] finish_angle = heading + self.sensor_range[1] for angle in np.linspace(start_angle, finish_angle , 10, False): x2 = x1 + self.sensor_range[0] * math.cos(angle) y2 = y1 - self.sensor_range[0] * math.sin(angle) for i in range(0, 100): u = i / 100 x= int(x2 * u + x1 * (1-u )) y= int(y2 * u + y1 * (1-u )) if 0 < x < self.map_width and 0 < y < self.map_height: color = self.map.get_at((x,y)) self.map.set_at((x,y), (0, 208,255)) if (color[0], color[1], color[2]) == (0,0,0): obstacles.append([x,y]) break return obstacles main.py --> import math import pygame from ROBOT import Graphics, Robot, Ultrasonic MAP_DIMENSIONS = (600, 1200) #the environment graphics gfx = Graphics(MAP_DIMENSIONS, 'D:\college\internship\INTERNSHIP TASK\obstacle detection\images\DDR.png', 'D:\college\internship\INTERNSHIP TASK\obstacle detection\images\Obstacle.png') #the robot start = (200, 200) robot = Robot(start, 0.01*3779.52) #the sensor sensor_range = 250, math.radians(40) ultra_sonic = Ultrasonic(sensor_range, gfx.map) dt=0 last_time = pygame.time.get_ticks() running = True #simulation loop while running: for event in pygame.event.get(): if event.type == pygame.QUIT: running = False dt= (pygame.time.get_ticks()-last_time)/1000 last_time = pygame.time.get_ticks() gfx.map.blit(gfx.map_img, (0,0)) robot.kinematics(dt) gfx.draw_robot(robot.x, robot.y, robot.heading) point_cloud = ultra_sonic.sense_obstacles(robot.x, robot.y, robot.heading) robot.avoid_obstacles(point_cloud, dt) gfx.draw_sensor_data(point_cloud) pygame.display.update THANK ME LATER😌
@munadarweesh6511
@munadarweesh6511 2 месяца назад
Thank you Sir for the video. I tried to run the code in the video install scipy version does not work
@antonwezels9403
@antonwezels9403 2 месяца назад
Hello, are your services still available on fiverr?
@hobby_coding
@hobby_coding 2 месяца назад
Unfortunately not, i did Fiverr to support myself during my PhD years. but now i have too much work on my hands. All i can do now is to answer your questions in the comments section.
@antonwezels9403
@antonwezels9403 2 месяца назад
@hobby_coding But thank you very much for your valuable content, it helps me a lot. Do you have any tip on how I can apply your simulation approach in a real environment by using RP Lidar and Rasphberry Pi as a device for mapping a space?
@hobby_coding
@hobby_coding 2 месяца назад
🔗Source Code: Rubik's Cube simulation: ko-fi.com/s/8558c6b0a0 Rubik's Cube simulation (machine learning solver) : Coming soon
@ossamadraoui9845
@ossamadraoui9845 2 месяца назад
That's cool bro but you mispositioned the colors of the Rubik cube
@hobby_coding
@hobby_coding 2 месяца назад
which faces ? i believe everything is correct.
@EdRlld98
@EdRlld98 2 месяца назад
@@hobby_coding Yes they are! Impressive Mouad! Happy to see that you're finally working on that project :)
@hobby_coding
@hobby_coding 2 месяца назад
@@EdRlld98 Thanks Edouard for introducing me to RayLib. It's really powerful and user-friendly.
@Astro_Jaw
@Astro_Jaw 2 месяца назад
That's a really nice project and your explanation was easy to follow keep up the good work 👍
@hobby_coding
@hobby_coding 2 месяца назад
Glad you liked it!
@syedsajjadali4220
@syedsajjadali4220 2 месяца назад
That's cool❤
@hobby_coding
@hobby_coding 2 месяца назад
Thanks !
@hobby_coding
@hobby_coding 2 месяца назад
How did you like this second part Rubik's Cube simulation: ko-fi.com/s/8558c6b0a0 Rubik's Cube simulation (machine learning solver) : Coming soon
@Noone-lw6ge
@Noone-lw6ge 2 месяца назад
I really liked this tutorial, I’m looking forward for part 2
@hobby_coding
@hobby_coding 2 месяца назад
Glad you liked it, i'm making part 2 right now.
@dnmsgogo
@dnmsgogo 2 месяца назад
que genio
@hobby_coding
@hobby_coding 2 месяца назад
very much apreciated. I'm glad you enjoyed it.
@Sebastian-y4z
@Sebastian-y4z 2 месяца назад
I just took a look into your older videos - you do have a good narrating voice, please use it instead of this annoying TTS/AI voice
@hobby_coding
@hobby_coding 2 месяца назад
Thanks for the suggestion, i'll surely consider doing that for the rest of the series.
@mohamedfarrag3869
@mohamedfarrag3869 2 месяца назад
Impressive as usual Thank you for sharing your work with us
@hobby_coding
@hobby_coding 2 месяца назад
My pleasure!
@hobby_coding
@hobby_coding 2 месяца назад
Hello i'm back 🔗Source Code: Rubik's Cube simulation: ko-fi.com/s/8558c6b0a0 Rubik's Cube simulation (machine learning solver) : Coming soon
@ankita5470
@ankita5470 2 месяца назад
the code executed fine and the output video file was generated. but when i played the video the lanes weren't marked with green color, or highlighted in anyway. It looked same as the input video. where could i be missed something ? i followed your code line by line . please help
@renzsuarez4027
@renzsuarez4027 2 месяца назад
can this be use in Lightbulbs?
@hobby_coding
@hobby_coding 2 месяца назад
you need a couple more components but, yes this will work on a light bulb.
@wfpnknw32
@wfpnknw32 2 месяца назад
interesting video although just doing a standard screen cast even if it's longer would be much more useful. I feel like i have to debug this tutorial. You add in blocks and components offscreen and use keyboard short cuts without explaining how to search for components. Also things like at 12:12 where you say it's really crucial to set a value and then cover the actual screen with a blown up screen shot of a properties window (but is it the one you're talking about, is it a bug and which one is it for), below the screenshot you can see the bottom of the actual window you're editing.. Great topic but honestly just a screen share of the whole process (sped up for bits if needed) would be much more useful. Nothing fancy just what you did is best.
@hobby_coding
@hobby_coding 2 месяца назад
thanks for the valuable remark.
@hassansakeef5838
@hassansakeef5838 3 месяца назад
Hello great video sir, i was wondering how do you suppose is it possible using the same model for the robot to make turns to reach a certain target rather than just move forward and backward? An idea or resource would be highly appreciated. Thank you.
@hobby_coding
@hobby_coding 3 месяца назад
you can use another 3D robotics simulation environment like gazebo + ros.
@renzsuarez4027
@renzsuarez4027 3 месяца назад
can i ask is this work in light bulb?
@hobby_coding
@hobby_coding 3 месяца назад
you can use a relay to easily turn the light bulb on and off using the project presented in this video. however if you wanted to dimm the light than you'll need an AC dimmer module and a dimmable light bulb.
@khemisakram
@khemisakram 3 месяца назад
i have a drim to be a youtuber like you keep going bro
@hobby_coding
@hobby_coding 3 месяца назад
Thanks for encouragement. my goal was not to be a youtube, it was always to be a scientists and an educator, and youtube provided a platform for me to deliver my content to people. just make a youtube channel and share the projects that create even if they are simple, there is always people who can find your ideas useful.
@muhammadmubashir4682
@muhammadmubashir4682 4 месяца назад
in this simulation you are just calculation vertical angle?
@hobby_coding
@hobby_coding 3 месяца назад
i'm calculating the tilt angle with respect to the vertical axis.
@haihuynh8337
@haihuynh8337 4 месяца назад
Is it more performant to find the intersection between (x1,y1),(x2,y2) and the four sides of the rectangle instead of splitting it to 100 points?
@hobby_coding
@hobby_coding 3 месяца назад
yes, it could be . but you are assuming that the obstacle is a rectangle. it might not be .
@maurya_1
@maurya_1 4 месяца назад
Great videos loving it please keep making these videos
@hobby_coding
@hobby_coding 3 месяца назад
Thank you! Will do!
@kadaliakshay6770
@kadaliakshay6770 5 месяцев назад
hey is there any way of doing this with camera but without a LIDAR? because I've done some research and it kinda looks like it's possible...
@hobby_coding
@hobby_coding 3 месяца назад
Yes, autonomous driving can be done with a camera. Tesla for example uses cameras, radar and ultrasonic sensors.
@kadaliakshay6770
@kadaliakshay6770 Месяц назад
@@hobby_coding thx
@hobby_coding
@hobby_coding 5 месяцев назад
📁 source code: ko-fi.com/s/b0f376134e
@amr.a-m8350
@amr.a-m8350 5 месяцев назад
Good video .How to convert signal position of revolute to voltage to be inserted to the pid to get a force acting on prismatic
@terrybates8407
@terrybates8407 5 месяцев назад
So one good collie 👍
@hobby_coding
@hobby_coding 5 месяцев назад
Thank you
@hobby_coding
@hobby_coding 5 месяцев назад
Python Sheep Herding Simulation 🗃️ source code: ko-fi.com/s/f5c64c0476
@ShaikMohinuddin
@ShaikMohinuddin 5 месяцев назад
Hello, can you upload a video of adding a PID controller to the robot you imported from onshape. Like a walking robot.. thank you
@hobby_coding
@hobby_coding 3 месяца назад
could be done, thanks for the idea.
@hamedshamsikhani3345
@hamedshamsikhani3345 5 месяцев назад
Thank you very much dear sir. You teach excellent but please describe more about something like 100 signals or sample time! I exactly make your model . My motor turns about 3200 rpm but the result is not acceptable.
@hobby_coding
@hobby_coding 5 месяцев назад
🗃️ source code : ko-fi.com/s/1a38e1563b
@Hanan-qz8ms
@Hanan-qz8ms 5 месяцев назад
I use rplidar c1.. when i run it apper a black window and the lidar doesn't connect or even work!😢 please help me
@hobby_coding
@hobby_coding 5 месяцев назад
🏷️ Download the files: ko-fi.com/s/716bba8384
@hobby_coding
@hobby_coding 5 месяцев назад
code: ko-fi.com/s/86d7053723
@alanperez7551
@alanperez7551 5 месяцев назад
If you did all right and still having and error try this: "File" -> "Invalidate Caches / Restart" -> "Invalidate and Restart". This restart the old cache and validates the added modules like: import pygame etc...
@user-vn1ix3ji3t
@user-vn1ix3ji3t 6 месяцев назад
Hello! I wrote all the code like yours, but it doesn't display, scan, or display an image.
@outer1269
@outer1269 6 месяцев назад
most part of the main.py code didnt show in the later part of the video
@antonwezels9403
@antonwezels9403 6 месяцев назад
Hey are you still on fiverr available?
@DANCEmaster7339
@DANCEmaster7339 6 месяцев назад
I still didn't understand the purpose of adding delay blocks. Z-1 and Z-100