shafer0228
Posts: 5
Joined: Thu Mar 26, 2020 3:05 pm

2D Indoor tracking for autonomous car

Thu Mar 26, 2020 3:15 pm

Hi,

I am building an autonomous car that utilizes 2 motors and an ultrasonic sensor to avoid obstacles but need to utilize some sort of indoor tracking method to create a map, perhaps, and have it follow a path I create. Below is the current layout and path I need it to follow (get from one office to another).





I've been self-teaching a little bit of UWB, IPS, RTK and GPS in my attempt to find a solution but I'm still relatively new to this.

How might I most simply have a car follow a path I create while avoiding obstacles? Is there a way to use a library like pygames to create the environment and path?

TIA.
Attachments
Pi Car - Drive path (2).PNG
Pi Car - Drive path (2).PNG (125.88 KiB) Viewed 187 times

il_diavolo
Posts: 146
Joined: Mon Dec 02, 2013 7:56 pm

Re: 2D Indoor tracking for autonomous car

Thu Mar 26, 2020 10:31 pm

I'm currently doing something similar with my robot. I am using a magnetometer to get compass bearings and rotary encoders on the wheels to measure distance. I have had good results by driving the robot along the required course and recording the distance and bearing at 25mm intervals. Then I place the robot back to the start position and control the motors using the recorded data. The fine tuning of this has been time consuming but I have managed to get reasonable accuracy over a distance of 5 metres with several turns of up to 90 degrees around furniture and through door openings.

The next stage, which I have only just started, is to be able to create the route data manually from a plan using a touch screen and to incorporate the ultrasonic sensors and cameras to correct the inevitable ongoing inaccuracies as the robot proceeds.

ElEscalador
Posts: 786
Joined: Tue Dec 15, 2015 4:55 pm
Location: Detroit, MI USA
Contact: Website

Re: 2D Indoor tracking for autonomous car

Thu Mar 26, 2020 11:46 pm

You'll have a very hard time getting gps to be useful indoors. Marvel mind sells something they call an "indoor gps" but it's a bit pricey for my wallet. ROS has tools for storing maps and serving them later. There is a bit of a learning curve to ROS, but given all the tools, support, and available tutorials it is overall a tremendous time-saver than trying to write every line of code yourself. I recommend a udemy course by Annis Koubaa (spelling?) for a great start. In a couple of months, I recommend my book Practical Robotics in C++ for a lot of details on mapping, path-planning, using various sensors, etc.
Robotics tips, hacks, book extras https://youtube.com/c/practicalrobotics

User avatar
Gavinmc42
Posts: 4341
Joined: Wed Aug 28, 2013 3:31 am

Re: 2D Indoor tracking for autonomous car

Fri Mar 27, 2020 6:14 am

I'm still waiting for Bluetooth 5.1 positioning base stations to come onto the market.
There are some 5.1 modules now but I have not seen the base stations with the require antennas.
It would be handy if they were built into Exit signs and other standard fittings.

A total surveillance state would have them in every street light.
Good for tracking CV19 carriers.

Elon is not a fan of lidar, Tesla is using vector space, building up a 3D image from cameras.
A simple edge detection system and optical flow vision should work.
A learning algorithm and mapping app is probably possible on Pi's.
Just thought of that, it should work for a lawn mower too if changing lighting conditions can be coped with.
Would be much easier inside, does it need to work in the dark?.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

shafer0228
Posts: 5
Joined: Thu Mar 26, 2020 3:05 pm

Re: 2D Indoor tracking for autonomous car

Fri Mar 27, 2020 1:03 pm

REPLY ALL:

It does not need to work in the dark, and I agree that GPS wouldn't be helpful.

Is there a way to simply draw a path, perhaps give it a length, and simply program the car to take the path given the velocity of the car?

shafer0228
Posts: 5
Joined: Thu Mar 26, 2020 3:05 pm

Re: 2D Indoor tracking for autonomous car

Fri Mar 27, 2020 1:05 pm

Or, draw a path and use some sort of relative position tracking to have the car follow it?

User avatar
Gavinmc42
Posts: 4341
Joined: Wed Aug 28, 2013 3:31 am

Re: 2D Indoor tracking for autonomous car

Sat Mar 28, 2020 2:47 am

People have used optical mouse parts to track movement.
That eliminates wheel slip and motor speed variations.

Stepper motors are good for straight travel, wheel slip is still an issue.
Super grippy wheels help, google Sumo bot wheels.
DC motors without encoders and speed control will give curved travel paths.
Single motor plus steering is hard to steer straight, human use optical feedback.

A Tesla has 12 ultrasonic sensor, 8 cameras and one radar.
Indoor one Lidar may work, these are a bit expensive.
Laser distance sensors on a scanner or servo will work.

Early bots just had bumper switches and ran into things to find them.
Some bot vacuum cleaners still use that method.

Tesla's vector space representation makes sense to me after I saw some videos.
Pillkellcam use h264 motion vectors to detect movement on the VC4 Pi's.
The Pi is stationary and it detects movement.
A moving bot can detect stationary objects.
Tesla uses that to build up a 3D picture of the world around it.

Lots of guys there have thought about this and that is the option they use.
It is worth trying it on Pi's.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “Advanced users”