ddeuster
USA
Asked
— Edited
I am trying to add ultrasonic sensors to my roaming bot for collision detection. I am using a sabertooth driver with a kangaroo for motion control. I have a custom Movement Panel and a custom STOP script to command the kangaroo. How can I use the ultrasonic feedback to run my STOP script when too close to an object? I would like this to be monitored at all times when connected, as my bot sometimes moves when it hears a random command. (major crash the other day) Also are there any methods to minimize the number of ports needed for multiple ultrasonic sensors? I do not need to differentiate the sensors at this point.
When using the ultrasonic sensor, its a matter of picking a distance for it to react to and entering that into your script ( you may have already tried this too?)
Use the manual to find controls organized by categories. Here’s the distance collision in the ultrasonic control category: https://synthiam.com/Tutorials/Help.aspx?id=52
Just to add some clarity to the previous responses. The Ultrasonic control, and all script commands and controls that impact movement commands (forward, back, right, left, stop) work on all movement panels, regardless of type, so the fact that you have a custom Movement Panel running a Sabertooth is immaterial to your question. If you were doing all of your movement purely by scripting and not using a movement panel, the story would be quite different.
Alan
Thank You, My hope is that I can monitor the ultrasonic sensor feedback, (ie the Distance Collision variable) at all times when connected, and if below a threshold, then run a script to stop the movement. By the way, how do I identify the Ultrasonic Collision variable?
I look forward to sharing more on this forum. I have made a lot of progress with Sabertooth and kangaroo control and speed ramping. I have the next 5 months with no work, so I am excited to make a lot of progress with DudeBot, and share what I learn. Here is a crude video from last year of him autonomously fetching his first beer.
Sorry its so long
The most useful robot I have ever seen.....
You don't really need to run a script. The collision monitor will issue a stop to the Movement Panel automatically when the distance threshold is met. See the tutorial that DJ posted.
If you want it to do something other than just stop is when you need scripting. It is quite old now, and probably needs some updates, but the user @Rich created a script that would let a robot randomly wander around and when it got too close to an object, it would back up a little, turn a little and try to keep going, adjusting every time it encountered an obstacle. https://synthiam.com/Community/Questions/3449
Alan
Hahaha can I have one of those robots please?!
:D That is the coolest robot ever,get a beer get a beer get.....perfect for the Saturday man-cave! Me likey alot!
I remember the dude bot.I love how you built an entire lift mechanism just so he can reach the door handle on the fridge versus sticking a handle lower on the door. True commitment to the art.
Thank You for the kind and fun comments. Dude's beer fetching skills will surely improve this winter. 2 arms = 2 beers. He will need to deliver throughout the house also. Really looking forward to the EZ Robot Lidar navigation unit.
I am now able to stop the bot using the Collision Monitor, However i would prefer to also pause the script currently running, and have the bot say "something is in my way". Then resume the script when the object is removed.
I am pretty sure there are a few variables created by the object. Certainly a distance one, and possibly one when it takes an action. I am at work so no access to my robots right now, but if you add a "variable watcher" object, and then run the robot, you will see what variables are being created by objects and what their values are.
Alan