Help with using proximity sensors stop youBot when an obstacle is in range

Typically: "How do I... ", "How can I... " questions
Post Reply
K0nvict
Posts: 2
Joined: 03 Jan 2021, 19:44

Help with using proximity sensors stop youBot when an obstacle is in range

Post by K0nvict »

Hi,

I want to make my Robot stop moving when an object detects it. I'm using the Kuku YouBot. I want to put Proximity sensors on every side of the bot and I want to make it stop in it's tracks until the obstacle moves

coppelia
Site Admin
Posts: 10375
Joined: 14 Dec 2012, 00:25

Re: Help with using proximity sensors stop youBot when an obstacle is in range

Post by coppelia »

Hello,

can you explain a bit more where the difficulty lies in what you experience? Is it related to how to read a proximity sensor? Is it related to how you control the youBot?

Reading a proximity sensor, if not operating in explicit handling mode (default) can be done with sim.readProximitySensor. Are you objects detected?

Cheers

K0nvict
Posts: 2
Joined: 03 Jan 2021, 19:44

Re: Help with using proximity sensors stop youBot when an obstacle is in range

Post by K0nvict »

It's basically what code I would need to use to stop my robot when an object is detected by the proximity sensors. I'm unsure how I would control the motors of it or get the input from the sensors

Post Reply