Disclaimer: I am a beginner, both to this forum and to robotics.

I work in IT, and the guys in my department have decided we would like to build a robot for the office, as a sort of hobby/team-building exercise of sorts.

Our goal is to create a robot that is spherical, like BB8, but randomly navigates the room like a Roomba. I've seen examples of BB8-like robots online before, but all the ones I have found have used a remote to manually control their movements. This seems like a difficult first project, and personally I would like to try something more basic to begin with, but I figured I might as well look at feasibility of the project before I rain on their parade.

The way I see it, there's two possible ways we could go about this: 1. Use an iRobot Create 2 and somehow adapt it to a spherical body 2. Start from scratch on a BB8 robot, and write a program that mimics a Roomba's behavior. (I have seen several examples of this online using Arduino and Raspberry Pi)

My question is: how difficult is it to write a program mimicing the Roomba's behavior? If it is very difficult, then perhaps I should simply buy a Create 2 and go from there.

Sorry if this is a broad question. If it is not appropriate for this forum, please direct me to a more suitable forum for beginners in robotics who have stupid questions like mine :p

  • $\begingroup$ I think this question was already answered here $\endgroup$
    – galtor
    Apr 20, 2017 at 8:07
  • $\begingroup$ Great video. Full of very useful tips, dictated by his experience, that'll save you a lot of trial & error time. It is very impressive what can be done with a simple decision-making algorithm. It would be interesting to create an analogue of the Roomba 980, I think it would be a very hard work $\endgroup$ Dec 27, 2018 at 8:10

1 Answer 1


I'd imagine this would be pretty difficult for a beginner. I think you'd be better off making a differential-drive robot first, since the kinematics are much more straight-forward. Either way, you're in for a lot more math than you might realize.

The primary goal will be to abstract away the low-level motor mechanics from the high level behaviors. You'll want to be able to tell the robot to turn 180 degrees if it detects a wall, for instance, but without some abstraction, you won't know exactly what low-level motor commands are required to do this. This is achieved by closing the feedback loop between the output commands and what the robot's actually doing, which can be done through some sort of tilt sensor and perhaps an accelerometer.

Once you've closed the feedback loop, you can use PID controllers to apply commands based on some error between desired state and actual state. For instance, you'll be able to calculate the error between the actual robot's tilt and the desired tilt and tie that to some motor command that can directly control the error.

Once you've achieved balancing and movement, you can add on other behaviors, such as avoiding obstacles. I'd recommend using a Subsumption architecture to determine which behavior takes priority over another (i.e. go forward or avoid obstacle).

The obstacle avoidance behavior will require a distance sensor; you're probably constrained to an IR sensor if you're wanting to build a BB8 clone. There'll be a whole bunch of vector math necessary to calculate the appropriate angle to turn based on what the robot is reading from the distance sensors.

I recommend you watch this YouTube video by David Anderson, which is probably the best intro to mobile robotics that I've seen. I've watched the whole thing probably 5 times.

I hope this was helpful. Best of luck!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.