Icosagon
Posts: 26
Joined: Sat Apr 13, 2019 12:32 pm

Make a real robot

Mon Apr 29, 2019 1:14 pm

Hello Guys,

I don't know whether this is the right forum or subject. But I'm stuck on a project and I don't know anyone who could help me with this.

I'll try to explain this,

Hardware
I made a simple robot (or rover) (It looks like Kuri https://www.heykuri.com/explore-kuri/) which has two motors and one caster wheel. Its just a acrylic sheet stacked on each other with some long screws and nuts. The robot have 3 ultrasonics in the front and one in the back and I have a camera(rpi) which i can add into the robot. The motor controller is connected to raspberry and other sensors are connected to an arduino uno.

Software
I plan to add different environment sensors like - temperature sensor, humidity sensor, air quality etc..
I can currently control it using wifi(ssh) and the camera visuals are streamed into a website hosted(by apache in rpi) via mjpeg streamer.

The robot works on python code. It uses curses(a library) to make a GUI like interface in the console so I can control it via ssh and a serial library to get sensor values from arduino.

The Real Question
My question is very wide but i'm sad that no one could answer my questions.

In short : I want to make the robot AI(like Jarvis) :D :D :D (Seriously)

1. How to make the robot AI(I want the robot to navigate my house or any building autonomously, currently it works on a bad python code which will never ever work :cry: )
2. I want it to control it using a super cool flashy gui (not needed really) like Iron Man :lol:
3. But first I want to know whether ssh is a good way to control real robots
4. Could anyone suggest a starting point for a quest ?

I have basic almost in every language, I am a programmer and game developer (kind of a noob) I like c++ but i prefer python for simplicity. In movies there are cool programmers and robots but in the real world there are many programming languages and libraries. I tried QT (PyQt) for making a gui (For windows ) but its very complicated and I can't figure out how to use paramiko (python ssh library) with it. I am really confused and frustrated. I had this idea in my head for about 2 years and it been a few months since i have actually made the basic robot.

I should run around millions of forums to answer my doubt because this will not fit in a specific section or because its too wide.

I have no problem in flagging the question but at least suggest me a starting.

Icosagon

pcmanbob
Posts: 7060
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Make a real robot

Tue Apr 30, 2019 10:20 am

Probably because there is no simple answer to your question, building a robot AI is no simple task there are university's that have advanced programming teams that have been working on it for years not to mention the money the military has spent on it.

So I would suggest you start small using your existing hardware, may be getting it to move around in its environment without bumping in to things using IR or ultrasonic sensors, then add the other things you want as you progress.

SSH may not be the best option for the interface you might want to consider having your robot host a web page and use that as your interface between human and robot, or you could use one of the python GUI's and then connect using VNC.

As a starting point may be you should search the web for raspberry pin robot projects and see how others have tackled the building a robot using a pi, also look at the pi mag that has several robot projects in it.

If you want a fully autonomous robot with the option of human intervention via a GUI then is is not going to be a quick weekend build, and you are going to have to learn a lot along the way.

what ever you decide good luck with your project.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Andyroo

Re: Make a real robot

Tue Apr 30, 2019 10:25 am

How about using Google AIY or Amazon Alexa skills?

They have spent an absolute bomb on research so piggyback onto that spend as a starting point and you also end up with marketable skills yourself :lol:

Icosagon
Posts: 26
Joined: Sat Apr 13, 2019 12:32 pm

Re: Make a real robot

Tue Apr 30, 2019 2:29 pm

Thanks Guys,
I expected the same answer . I am really confused how to start and there is no one to help me. I'll try ask another forum.

PiGraham
Posts: 3663
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Make a real robot

Tue Apr 30, 2019 2:42 pm

Icosagon wrote:
Tue Apr 30, 2019 2:29 pm
Thanks Guys,
I expected the same answer . I am really confused how to start and there is no one to help me. I'll try ask another forum.
Break it down into parts. Try AIY or Alexa for voice recognition. You could also look up Jarvis which was an Alexa like project on Pi. Get it controlling simple things with voice commands. There are totorials and example code for that.

Once you know how to turn things on and off with voice commands

Here's a voice controlled robot arm using AIY voice. Slow response but it works.

https://www.youtube.com/watch?v=b-enH1ml4e4

You should be able to do similar with your rover, telling it to move, go to specific locations etc.

Icosagon
Posts: 26
Joined: Sat Apr 13, 2019 12:32 pm

Re: Make a real robot

Tue Apr 30, 2019 2:47 pm

Thanks PiGraham

I'll look into into. But I'm not trying to control it using voice. I want to control it from another computer. Not with VNC, With a dedicated program using ssh. The AI is very confusing.

Andyroo

Re: Make a real robot

Tue Apr 30, 2019 3:08 pm

Icosagon wrote:
Tue Apr 30, 2019 2:29 pm
Thanks Guys,
I expected the same answer . I am really confused how to start and there is no one to help me. I'll try ask another forum.
If you are after a 'wondering' robot then you have two areas to look at:

1) Room mapping
This needs to cover items such as walls / doors (these should be static) and things that move such as people, pets and furniture
2) Location in the room
Main issue here is the classic GPS does not work well indoors - you have dead reckoning from a known start point (the home), recognition (possibly markers on the skirting board / bluetooth) or using walls / doors to identify the room.

I would look at ways of recording the room maps first - you could get the robot to make the map if your positioning is accurate (wheels can creep) and a hunt for maze solving robots will help a great deal with this.

Icosagon
Posts: 26
Joined: Sat Apr 13, 2019 12:32 pm

Re: Make a real robot

Tue Apr 30, 2019 3:16 pm

Yes Andyroo

I'm after a wondering robot which wanders here and there in a building. I didn't find any good resources or libraries to start learning how to make this. I'm planning to use accelerometer and gyroscope for navigation and i can't buy gps (because they are not cheap and not accurate).

There are few robots like what i want - Curiosity Rover, Kuri etc.. But that are made by large companies and they are private. I guess I'll have to stick with manual control. And if i made a good AI it may pose a threat to humanity :D

Andyroo

Re: Make a real robot

Tue Apr 30, 2019 3:49 pm

For accurate movement you can do worse than start with https://piwars.org/getting-started-with-robotics/

Have a look ta https://www.laurentluce.com/posts/solvi ... -a-search/ for 'solving' mazes - its a simple way to map and coded maze and run through it. I hope you like recursion though ;)

And as for AI taking over the world - just ask it to tell you the value of PI - that will stop it dead in its tracks :lol:

PiGraham
Posts: 3663
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Make a real robot

Tue Apr 30, 2019 3:52 pm

Andyroo wrote:
Tue Apr 30, 2019 3:49 pm
For accurate movement you can do worse than start with https://piwars.org/getting-started-with-robotics/

Have a look ta https://www.laurentluce.com/posts/solvi ... -a-search/ for 'solving' mazes - its a simple way to map and coded maze and run through it. I hope you like recursion though ;)

And as for AI taking over the world - just ask it to tell you the value of PI - that will stop it dead in its tracks :lol:
That (or any well known constants) is something I would expect to get an answer to. Google assistant gets it.

ankith26
Posts: 103
Joined: Mon Mar 25, 2019 11:08 am
Location: Earth
Contact: Website

Re: Make a real robot

Tue Apr 30, 2019 4:12 pm

Even if we did somehow make an AI, Raspberry pi does not have enough power to run an AI as good as JARVIS..
You have to stick onto the robot that you are building(without AI) as it is completely possible
My website is at https://pratt.ml
Hope it runs (which it wont)

Andyroo

Re: Make a real robot

Tue Apr 30, 2019 4:32 pm

PiGraham wrote:
Tue Apr 30, 2019 3:52 pm
Andyroo wrote:
Tue Apr 30, 2019 3:49 pm
For accurate movement you can do worse than start with https://piwars.org/getting-started-with-robotics/

Have a look ta https://www.laurentluce.com/posts/solvi ... -a-search/ for 'solving' mazes - its a simple way to map and coded maze and run through it. I hope you like recursion though ;)

And as for AI taking over the world - just ask it to tell you the value of PI - that will stop it dead in its tracks :lol:
That (or any well known constants) is something I would expect to get an answer to. Google assistant gets it.
Darn - in that case can I be first to welcome our robot overloads :lol: :D :lol:

(OK it was the only Pi / robot joke I could come up with)...

Icosagon
Posts: 26
Joined: Sat Apr 13, 2019 12:32 pm

Re: Make a real robot

Thu May 02, 2019 4:43 am

Ok Thanks Guys

But is there a way to two way talk between raspberry and computer. I only found ssh but implementing client side is difficult. Any other ways of controlling the robot other than web browser :D ?

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

Re: Make a real robot

Thu May 02, 2019 7:31 am

Anyone active ?
Does starting last night count?
https://ultibo.org/forum/viewtopic.php?f=9&t=1316

General Purpose AI is just too hard, so I'm doing simple stuff.
Really dumb pet type robots, but a bit smarter than line followers.
Mobile bots are a pain, so I'm starting with static Human interaction ones.

Just found out my favorite CAD program now does G-Code.
https://www.freecadweb.org/
There is also a big library for it that has some of the robot motors, steppers and servos etc.
https://github.com/FreeCAD/FreeCAD-library

These are bots I have been thinking about for a long time but the software side needed to pass a certain threshold before it clicked for me.
Now I have to get the designs in my head CADed and made into real parts ;)
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Icosagon
Posts: 26
Joined: Sat Apr 13, 2019 12:32 pm

Re: Make a real robot

Thu May 02, 2019 3:23 pm

Anyway Thanks Guys

I found sockets in python which allow me to do this. I'll try to stick with sharp develop python for the client side. and for the AI I will try to use OpenCV and any if else statements for navigation. I make it AI one day 8-) . I let you guys know when I have done the project :) .

Thanks for helping out

User avatar
Joel_Mckay
Posts: 289
Joined: Mon Nov 12, 2012 10:22 pm
Contact: Website

Re: Make a real robot

Thu May 02, 2019 5:09 pm

In general, one must make several choices when designing a platform, and define the task you are trying to solve. Like any software specification, having a clearly defined finish line will constrain the complexity of your project.

ROS ( https://wiki.ros.org/melodic ) is the current standard of several dozen mobile, and multi-axis platforms.
OpenCV 3.4.5 was the last Machine Vision lib version where all the books were still consistent ( version 4 is a pain as it drops several areas of the api)
Tensorflow ( http://wiki.ros.org/tensorflow_ros_cpp ) is already integrated in ROS

There are a few books/tutorials/online-courses for ROS, and some include inexpensive hardware platform recommendations. These can create several types of platforms, and in some cases most of the common tasks people want are already included. There are some Pi OS images with ROS pre-built, and this install method is highly recommended given the versioning nightmare we had getting it to compile on Stretch. While its possible to install most packages on ARM platforms, it will feel like a fugly porting process.... we are still discussing whether to include this build on our own club image given the download size.

On a pi3B+ one must have realistic expectations of what can be done locally on a platform, but I think most would be surprised at its performance.
(the photo is showing 12 fps for a lidar mapping sim)

Cheers,
J
Attachments
5axis.png
arm
5axis.png (168.65 KiB) Viewed 1620 times
slam.png
SLAM
slam.png (127.39 KiB) Viewed 1620 times

Icosagon
Posts: 26
Joined: Sat Apr 13, 2019 12:32 pm

Re: Make a real robot

Fri May 03, 2019 5:09 am

Hello Joel

Is ROS necessary for making the robot. And i think ROS doesn't support raspbian :) . I could download opencv and tensorflow and still use it right :?:

User avatar
Joel_Mckay
Posts: 289
Joined: Mon Nov 12, 2012 10:22 pm
Contact: Website

Re: Make a real robot

Fri May 03, 2019 6:43 am

Icosagon wrote:
Fri May 03, 2019 5:09 am
Is ROS necessary for making the robot.
Not always, but it will train you how to re-use a standard popular platform, and a minimal remote sensor/driver API. Both these concepts are important for understanding more complex platforms... yet you can start with just the turtle-bot sim demos.
Icosagon wrote:
Fri May 03, 2019 5:09 am
And i think ROS doesn't support raspbian :)
Even when using the official Ubuntu versions, parts that use gazebo libs or a ROS simulation package are best avoided on a pi.
The photos are of the raspbian stretch with MATE desktop we use, but our ROS scaffold built version now almost fills the 32GB card image... not fun ... we are attempting to clean it up for our clubs 8-axis Arduino based custom board, and are still evaluating how useful the platform is for our intended application. ;-)
Icosagon wrote:
Fri May 03, 2019 5:09 am
I could download opencv and tensorflow and still use it right :?:
MRPT can do a lot if you wanted a custom design, but doing the opencv costly-operations on a more powerful remote host is recommended. Likewise, in machine learning the training part is usually the most costly operation, and remote APIs can offer resources far beyond what a local pi machine could manage alone.

Best of luck,
J

Icosagon
Posts: 26
Joined: Sat Apr 13, 2019 12:32 pm

Re: Make a real robot

Tue May 28, 2019 4:07 am

Hey Guys

I figured how to control the robot via computer.

I used python sockets to send messages between pc and pi. And for the GUI i used Kivy (GTK might be better) to get sensor values and to control it.
To display the MJPEG camera stream in the GUI , I used OpenCV capture to do that. There's latency of maybe 1-2 secs, but that's enough.

Now I just need to implement the autonomous navigation and AI :D

Thanks Guys

Return to “Automation, sensing and robotics”