So far I managed to establish SSH session via PyCharm, but I ran into a problem that I need to open another debug window on my host, so this soultion does not work for me.
Right now I’m browsing through the Net and trying to figure something out but I get really confused with all those addresses, ports and connections because I’m super unfamiliar with this and I honestly could use some help.
Thank you in advance.
Please describe how networking is configured for the VM (i.e. NAT, Bridged, Host-only, etc).
Just in case, here’s a description of networking in VirtualBox, in particular the networking modes.
So far I managed to establish SSH session via PyCharm
In addition, please show what SSH command you’re using in this case.
Right now networking for the VM is set for NAT with 2 port forwarding rules: with ports that are 2222 for host and 22 for guest and 14550 ports for both.
SSH I set with PyCharm integrated manager i.e. via deployment.
I’ll attach a screenshot of my settings here:
One thing, if not a typo, port is different from what you’ve forwarded in VBox (14540 vs 14550)
In addition, you assign a default value to connection_string but it could be changed if command line argument --connect is used.
Are you overriding such default value?
If so, what’s the command line command you’re using?
I did paste from my actual script, but I forgot I changed the port afterwards. I do apologize.
The problem is simple: I cannot connect to VM with running gazebo and QGC with this script from my host machine. Although I can run this script from exact VM and from my host but only if I deplot the script to the VM which does not work for me at the moment since I’ve been quested with another task that should be running only on my host.
Well I figured everything by myself. Thank for trying to help me though.
In case you are interested - I managed to change default target address in mavlink_main.cpp file to my VM address (192.168.56.1) and that solved my problem.
However, it looks like your current scenario VM address (192.168.56.1) (which is a typical Host-only NIC address in VBox) is a bit different from the initial description (NAT mode for networking).
In addition, having to change mavlink_main.cpp and re-build if the underlying network configuration changes doesn’t seem versatile (I’d expect to use a config file instead).