You start by analysing the problem you want it to solve, then decompose the problem until you have small enough problems that you can write code for. After that it’s typically an interative process of deveoping a solution and testing it, either in simulation or on the robot itself, and repeating this until it works well in a range of situations.
There isn’t a predefined way of programming a robot as yet. The discipline is too new to have a universally accepted methodology and it also depends on what exactly you need to program. Controlling the motors of the robot require a different work than indicating the robot where to go.
The first one might require a quite mathematically intensive derivation to indicate where the robot motors should go in order for the robot to be at a given position respecting some constraints (e.g. not crashing on the person, maintaining some equilibrium etc.). The second approach is more open-ended as you could use some machine learning (AI algorithms) to process or generate data of possible directions the robot can take given some conditions. This category of programming works pretty much like any other AI algorithm: collect/generate data which describe the problem meaningfully, interpolate or learn some function which produces the result you want, test your results on new data.
The main thing to keep in mind about robot is that, unlike conventional AI, advanced behaviors can exist only if at least a basic way of controlling the robot is well assessed. E.g. if a whelled robot cannot steer left or right it is no point to have an algorithm that produces optimal routes to collect papers from printers in an office.
Comments
Diana commented on :
hard work
BUT, sadly, various political and commercial organisations find it commercially well worthwhile
need to learn how to recognize stuff form bots
https://www.symantec.com/blogs/election-security/spot-twitter-bot
https://www.technologyreview.com/s/611655/how-to-tell-if-youre-talking-to-a-bot/