Odometer_Arduino [closed]
Hi,
OKAY, I hate to admit it but I am a total NOOB. But I really work hard to learn this stuff. So, yeah...
I have made an odometer using Arduino and a couple of IR LEDs. Below is the sketch:
int counter;
int currReading;
int prevReading = 0;
int threashold = 600;
void setup()
{
Serial.begin(9600);
}
void loop()
{
currReading = analogRead (A0);
delay(1);
if(currReading > threashold && prevReading < threashold)
{
counter = ++counter;
}
prevReading = currReading;
Serial.println (counter);
}
By adjusting the delay time
delay(1);
I can get readings in different intervals:
when starting
0
0
0
0
...
when first turn
1
1
1
1
...
when second turn etc.
2
2
2
2
...
My question is how can I connect this to ROS in order to get the location of the base. (actually I need the location of the camera but I am assuming the camera is fixed on top)
I am actually working on finding answers to this question posted here. Basically, I need to get something like this:
<timestamp.sec>
<timestamp.usec>
<camera pose w.r.t. odom frame (x,y,z,qx,qy,qz,qw)>
I don't have any special hardware that supports current libraries. I am making my own stuff. I am literally lost, so any help is pretty much appreciated.
Millions of thanks in advance.
What is it that you were trying to achive ?
Using IR scans , all you get is the obstacles not the odometry .
Odometry can come from
https://github.com/hbrobotics/ros_ard...
https://github.com/agnunez/espros
This is a beautiful implementation of ROS on cheap NodeMCU boards .