I have struggled several weeks to run Turtlebot3 SLAM simulations with ROS-Noetic on my M1 MacBook Pro, and here is the ultimate solution.
To the best of my knowledge and experience, connecting Remote Desktop to VMware-running Ubuntu was the only fully-successful option.
I've also tried other options including:
- Dual-booting to native Asahi-Ubuntu
- XQuartz-forwarding to Ubuntu Docker container
- Remote Desktop connecting to Ubuntu Docker container
But after all, these DID NOT successfully run Gazebo and other required applications.
Download Remote Desktop Client
Download VMware Fusion Player
You may need to sign up and register to get the free personal-use license.
Download Ubuntu Server for ARM 20.04 Focal
Download Ubuntu Server for ARM 22.04 Jammy
Create virtual Ubuntu machine from the downloaded image at Step 2.
Don't forget to customize your settings before starting the new virtual machine (disk size, processors, memories, etc.).
Just follow the instructions, create your user, and reboot.
cd && git clone https://github.com/hyeonbeenlee/ROS-SLAM-AppleSilicon.git
cd ROS-SLAM-AppleSilicon
Running the setup_<ROS_DISTRO>.sh
in the VM's Ubuntu terminal will do the following in sequence:
- Authorize the user
- Update the default apt mirrors to faster local(Korean) mirrors
- Setup SSH and XRDP connections
- Install Firefox and VSCode
- Install ROS and Turtlebot3-Gazebo simulation apps
- Clean and reboot
Before you run setup_<ROS_DISTRO>.sh
, there're few things to be personalized.
vi setup_<ROS_DISTRO>.sh
- Replace
hyeonbeen
to<YOUR_USERNAME>
. - Replace the Korean apt mirror
ftp.lanet.kr
to others, if necessary. - Replace the
noetic
to<YOUR_ROS_VERSION>
if necessary.
Then, run the setup_<ROS_DISTRO>.sh
. setup.sh
While your VM Ubuntu is running, you can connect to <VM_IP>:3389
and use Full-GUI experience with ROS and Gazebo.
<VM_IP>
is the local IP address of your VM, and can be obtained through
ifconfig
Test apps on your VM by running below codes:
roscore
roslaunch turtlebot3_gazebo turtlebot3_house.launch
roslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=gmapping
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
rosrun map_server map_saver -f ~/map
ROBOTIS Official Navigation Guide
roscore
roslaunch turtlebot3_gazebo turtlebot3_house.launch
roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=$HOME/map.yaml
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
If you cannot connect using the Remote Desktop,
Check if you're connecting to the right <VM_IP>
,
sudo systemctl restart xrdp
sudo service xrdp restart
and try reconnecting (or rebooting your MacBook).
I hope there are no more victims like me...
Please make an issue if there're any problems.