I have been using LXD for a while to run different versions of ROS [robot operating system] - and finally time has come to put my stack on a real robot, which uses a RPI4. What I would like to do is, to run some of the software actually on the robot, and some of it on my laptop, so I need connectivity between my laptop and the container inside the LXD host.
I understand that with MACVLAN, the guest can get its own IP, but on a wireless network this has not worked (I tried), and google searches confirm that this method wont work on a wifi. There is also bridging method, and I have not tried this one yet.
What I have done was to configure a proxy to the ros port 11311:
lxc config device add rosdev proxy11311 proxy connect=tcp:127.0.0.1:11311 listen=tcp:0.0.0.0:11311
and on the remote computer I make:
This works partially. I can get issue
rostopic list and get the topic names, but If I make a
rostopic echo /odom it will not work. I can issue commands from my laptop to the robot, but I can not get any data back from the robot.
I have investigated this problem and found out in order to use rostopic echo, I need to be able to connect an arbitrary port that is on the container like http://myrobot.local:[3XXXX]
So, I pretty much need that IP address of the container exposed to network so I can communicate with it. Considering that I am on wifi, on both the robot and the laptop, what options do I have?
Will the bridging method also not work?
Any ideas/recommendations/help greatly appreciated.