I am new to ROS2, so maybe the question makes no sense…
I am going to design a robot, and all initial testing will be virtual: in Gasebo, instead of the real world.
Robot is Raspberry Pi 3 or 4 based.
Now, in the real world, one or few such robots will run in parallel, and there will be a central PC for compute-intensive tasks like image processing (plus overall control).
It will run on ROS2.
Now: do I have to develop it all on Ubuntu and then port to Raspberry Pi, or can I somehow make the emulated Rasp. Pi run on Ubuntu, so when I am done, the code could be copied to a "real" Rasp. Pi, without re-testing?
I don’t mind installing Ubuntu on Rasp. Pi, instead of Rasp. native OS, but then the question is: can I count on the code that was tested in Ubuntu PC to run smoothly on PI?
I am not sure if this is the right approach, so if there is an alternative, please let me know (as same applise to running Arduinos and so on…)
Thank you.
P.S. Or, tu put it differently, can I (and do I need) to run multiple nodes of ROS2 on a single "test" Ubuntu PC, while some of these nodes are contained in some kind of Raspberry PI emulator?
2
Answers
From the research I did, looks like it is not really necessary: if the code is properly written, nodes tested on Ubuntu should work on Pi with min. re-testing.
It makes a big difference if you use Pi 3 or 4.
If you can use a 4 one as you could run ros there in some ubuntu. You will have a lot pain on a pi 3.
ros is basically a pub/subscriber based thing. So you could just have a node controlling the robot motors on the pi and the havy stuff on your laptop. That’s where most people start.
However you will understand all that much better if you really start with the simulation. It has it’s own pains as you have to model your robot first.
but maybe start with the ros2 tutorials…
Hope it helps.