Eric’s code is c++ with a lot of screw ups. I’m not a C programmer, I’m not writing the best of code, I’m just making Eric work. I’ll try and define code for:
- Logic and disision making
I will also list the data-sheets for the following sensors and control systems I am using on Eric, such as:
- Temprature sensor
- Voltage monitor
I’ve not done any compilation of the header files, Iknow that it will take less time to compile but I’m making so many changes there would have to be a lot of compilation every time I want to update Eric’s code.
Test area one – The Hall
From the upstairs landing is a hall extending East with a short L shaped turn to the North. Blocking this area off with a box makes a nice test area for collision detection.
Test area two – The Office
There are lots of obstacles in here, a chance for the sensors to do their job.
The Financial Constraints
I don’t have money to spend on this project so expensive parts are out of the question. Most of the sensors are from China, 99p($1.00), but it can take a month or two to get here.
Eric’s size is limited by his environment, if he is too big he will become an obstacle for the other life forms and as a result may sustain damage from collisions. Another factor is cost, bigger pieces cost more. On the other hand, if Eric is too small he could be accidentally crushed underfoot. The ideal size is the same footprint as a person standing, around a foot square.
“You know, a little nibble here and a little nibble there, Lister, and before you know it we’re flying *backwards*.”
Another design problem is the cat.
Bit about using Unity
I’ve messed with Unity3D a good bit and it is a nice set up so I decided to see what I could do linking Eric into the game engine. Adding a network interface to Eric was easy and just sent a string of all the variables to whoever connects to that port. All I had to do then was connect Unity to the port and read the string. Unity now had all the information that Eric has, and Eric’s actions could now be replicated, on screen, within Unity, in real time.
At this point I have yet to get my head around making internet connections, I’m talking on the kind of basic level. I have a lot more reading to do on the subject so for now I’ll use a piece of well quoted code. Quick and dirty to get things working and we can tidy up later.
Over the last year I have added quite a few extra components to Eric and had run out of places to plug in more I2C based sensors. Wiring had been cobbled together using what I had to hand and the wires to the sensors on the pan and tilt head her pulling against the servos and giving bad positions as the head was not where the robot thought it was.
My first mistake was to try working in degrees. It made sense when I started as I could see what was going on but as the mathematics get more complicated I need to be working in radians. Now is the time to ensure that all the internal variables are in radians and they only become degrees for display purposes. Read More
The main problem with IR sensors is their dislike of dark or non reflective surfaces, such as a waste paper bin or computer monitor. Using these sensors we can only work in a controlled environment with white surfaces for walls and floors. If Eric is to explore we can not be expected to run ahead of him painting the walls white. I’t time to get out the laser! Read More
Starting point for the SLAM software Read More
The battery monitor arrived just before Christmas after a long journey from China.