- Can ROS run smoothly on VM?
It can run very smoothly. However, if you know you are going to be doing a lot of complex work in simulation, then a virtual machine may not be for you. That said, a great deal of work can be done with a VM, and you can access many of the functions like mapping, navigation, computer vision and much more using a virtual machine.
- Also, what is the recommended system configuration for VM to run ROS smoothly since I am a ROS developer and will use ROS frequently (I would like to give all my computing resources to VM when I am using VM)?
Giving more resources is good, but you may want to hold some back so that other Windows apps don’t suffer when the virtual machine is running. For example, you could set:
Memory: 4GB
Processors: 3
Network Adapter: Bridged
The above would represent a good choice for a system with at least 8GB installed and 4 processors. If you've got more resources, by all means assign more to the VM, just keep a bit back for the host OS.
- Can the ROS on VM connect with a real robot? Will there any compatibility problems?
Yes the VM will connect to the real robot. When correctly configured, there are no compatibility issues. I have this configured with multiple versions of VM, Ubuntu (16.04, 18.04, etc.), ROS (Indigo, Melodic, Kinetic, etc.). Including different target robots (Raspberry Pi-based platforms, PC-based platforms, etc.). All different combinations work fine.
For greater detail, you could refer to: https://rhoeby.com/support/tutorials/...