As I have mentioned in a few postings, both here as well as Robotis Forum and Trossen Forum, before I let my turtlebot 3 roam, I want to make sure it does not fall down the stairs. So I have been playing around with distance sensors as well as the OpenCR board. Also from these conversations, I know that Robotis is working on adding support for cliff sensors, which is great. However as a learning exercise, I have been experimenting with some different solutions.
However with projects like this, I often get distracted, and keep trying out different things, which can both be good or bad.
My first approach has been to use some VL6180 sensors connected up to I2C. I tried first with just one sensor, and I modified the Arduino code base to read this sensor, and publish a new topic, which I had working. I discussed this in the thread:
Currently I am experimenting with maybe using up to 4 of these. One near the front of the two wheels, plus one probably centered near front and maybe fourth centered near rear, in case you decide to backup from danger only to fall of behind you… As I mentioned up on Trossen, I have a simple Arduino App, that allows me to have the OpenCR board read three (easy to add 4th). Again more details up in the thread:
Note: There is an Arduino created ZIP file with test app, including my version of VL6180 library code, that allows me to do reads Asynch…
But, I am now trying to decide if I want to mount these sensors, or go with Analog sensors as it has been mentioned that the up coming Cliff sensors will be probably IR and using Analog… So to prepare for this, I have purchased, 4 each of:
Your DMS-80 sensors - Issue here is I think these will have to be mounted probably higher than top deck. Not sure yet how to mount, I have now 3d printed a 3x5 12mm like plate, which I think I can use Rivets to attach.
Your IR Sensor IRSS-10 sensors - Look like they work OK for this. Not sure what to use to mount these. Hopefully some simple thing to 3d print.
Sharp GP2Y0A51SK0F Analog Distance Sensor 2-15cm from Pololu - May have issue that these want input voltage of 4.5-5.5v. Will see how well they work at 3.3v. Could probably make cables to run 5v to them, but then analog would be out of range… Also would need to setup 3d printout for them.
I should have all of these sensors within the next week. So lots to experiment with.
Once I settle on one (or more of these), next up will be again to do integration into Arduino sketch and ROS.
a) Should I/we create a new topic or topics where the user can get RAW data from these sensors, and/or integrate into Sensors message.
b) Assume use data to fill in cliff value in the sensors messages.
c) Parameters for this. Do I hard code limits into Arduino code? Or should I use ROS Parameters. If Ros Parameters what to do when ROS is not running? Use defaults? Or maybe some how when we get a new ROS parameter we store it in EEPROM to read as default? …
d) Who processes the data? Should the Arduino code base sometimes subscribe to the generated data and if you are driving the Turtle without ROS, maybe Stop and/or make Noise… But by default I am assuming that there will be some ROS node/nodes who will process the generated topic data and do simple things like stop forward motion if it finds a cliff…
Again I am using this as a learning exercise, so who knows where it will end up. All suggestions are welcome, including maybe best to wait until you are done. But hopefully maybe some of the things I learn along the way might be useful.
And the main point is, I am having fun!
Edit: Thought I would show a prototype 3d printed bracket to hold the VL6180 sensor. Hopefully setup to use your standard rivets as shown. I am printing a new one naw that has a slightly larger gap from where the 6mm mounting holes are to where the sensor mounts (it was a little tight)
Also it will use 2nd of the two part rivets, Currently waiting for shipment, which hopefully has the right ones.