|||

Ubuntu and ROS Setup on M1 MacBook Air

In this post, I will introduce the setup procedure of Ubuntu and ROS on the platform based on Apple Silicon M1 chip. There are two ways you can use ROS and ubuntu on Apple M1 chip: Virtual Machines and Docker. Both methods run blazingly fast on my 2020 M1 MacBook Air without noise and obvious heat. Overall, I am satisfied with this solution, and I have already integrate my MacBook Air into my daily work pipeline.

If you are intested in the general experience of M1 MacBook Air, there are a lot of YouTube videos you can checkout out. I put some links below for your reference.

Here, I would like to talk about my experience with M1 MacBook AIr. I bought 2020 MacBook Air in early 2021 since I was waiting for the catch-up of the software adaptation to the M1 chip. Once I heard docker has support M1 chip natively, I order the MacBook Air immediately. To be honest, this is my first Mac laptop. I hesitated for quite a long time since my major working platform is Ubuntu (on ThinkPad X1 Extreme 2nd), and I worried about the software compatibility of M1 platform a lot. But now, it turns out that I am very confident to work on the M1 MacBook Air!

To run the Ubuntu on the M1 MacBook Air, I tried several different virtual machines. The QEMU barely works, and I got the same result as this reddit post, which I do not recommend you to do that. UTM also works, you can refer to UTM on M1 MacBook Air for reference. The best virtual machine platform I found is Parallels. This virtual machine can support Ubuntu and Windows very well on the new Apple M1 chip. I installed a Windows 10 and a Ubuntu 20.04. They all work pretty well. I tried to change the network from shared network’ to wifi’ in order to get a consistent ip address under the router, but sometimes it does not work as I expected. For the most cases, shared network’ should work for you. You can even open app in Ubuntu with Alfred under macos, which is pretty convenient for my workflow.

Another solution is Docker. I followed the ROS_on_M1_Mac_Docker to install a ROS melodic and a Ubuntu 18.04 docker image on my M1 MacBook Air, they work super well except the xrdp which supports the GUI display through Parallels client. mac-ros supprts ROS Melodic and Ubuntu 18.04 as well as the previous one, but it can use VNC to support GUI display of rviz.

You can also check Kliment Mamykin’s blog to build ROS2 on macOS Big Sur M1. I encountered extra issues except the ones listed in the original blog, but you can use similar tricks included in the blog. I tried to build ros1 on M1 mac, however, the building of the rviz is troublesome. I will update this blog if I found a way to build ros1 on M1 mac later.

In conclusion, using Prallels as the virtual machine to run Ubuntu 20.04 and ROS noetic works best for me. If you are looking for a light-weight solution, I recommend you to take a look at ROS_on_M1_Mac_Docker.

Up next Extrinsic Calibration Algorithm between a Stereo Visual System and a 3D LiDAR Autonomous Drone Inspection with Deep Reinforcement Learning
Latest posts PENet: A Joint Panoptic Edge Detection Network Multi-robot Collaborative Perception with Graph Neural Networks Autonomous Drone Inspection with Deep Reinforcement Learning Ubuntu and ROS Setup on M1 MacBook Air Extrinsic Calibration Algorithm between a Stereo Visual System and a 3D LiDAR FENet: Fast Real-time Semantic Edge Detection Network