I’m having some issue with my robot ecosystem and the remote connection.
The ecosystem is composed by:
A rover where is running ROS 2 foxy connected to a router
The router where is enabled a connection to a Zerotier VPN net
A ROS 2 foxy remote host connected to the same VPN net of the router
Based on these info, the rover is not directly connected to the VPN, the router will bridge remote connection from host connected to the same VPN net of the router.
In this VPN net the router and the remote host have, for ex, an ip class like this 10.10.10.x, instead the rover in the router net has an ip class like this 192.168.1.X
For ROS 1 the thing was easy having the ROS_MASTER on the rover.
The thing on ROS 2 is not working, even if i set the ROS_DOMAIN_ID to the same number on both, rover and remote host, i can’t list nodes, echo topics created on the rover and other stuff to manage it.
Of course I can ping and ssh connect to the rover from the remote host without problems
To ssh i use
ssh rover@192.168.1.X
If from the host i run a simple publisher
ros2 run my_py_package publisher_class_py_node
and on the rover if i run
tcpdump -i ztzlgp434l -n udp
where ztzlgp434l is the rover net interface for the zerotier, i can clearly see the packet arriving and it stops when i kill the node on the host
I also tried to export
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp export
FASTRTPS_DEFAULT_PROFILES_FILE=$HOME/custom_profile.xml
with a custom profile like this
<?xml version="1.0" encoding="UTF-8" ?> udpv4_transport UDPv4 <participant profile_name="vpn_profile" is_default_profile="true">
<rtps>
<userTransports>
<transport_id>udpv4_transport</transport_id>
</userTransports>
<useBuiltinTransports>false</useBuiltinTransports>
<defaultUnicastLocatorList>
<!-- Specify the VPN IP of the local machine -->
<locator>
<kind>UDPv4</kind>
<address>ROBOT_IP</address> <!-- For the robot machine -->
<port>7400</port> <!-- Default discovery port -->
</locator>
</defaultUnicastLocatorList>
<builtin>
<initialPeersList>
<!-- Specify the VPN IP of the other machine -->
<locator>
<kind>UDPv4</kind>
<address>HOST_IP</address> <!-- For the host machine -->
<port>7400</port> <!-- Default discovery port -->
</locator>
</initialPeersList>
<metatrafficUnicastLocatorList>
<!-- Specify the VPN IP of the local machine -->
<locator>
<kind>UDPv4</kind>
<address>ROBOT_IP</address> <!-- For the robot machine -->
<port>7400</port> <!-- Default discovery port -->
</locator>
</metatrafficUnicastLocatorList>
</builtin>
</rtps>
</participant>
</profiles>
but it gives me parse errors.
What I’m sure about is that the rover receives the packet through UDP, but there’s something wrong to recognize them.
Do you have any advise/suggestion to make it work?
I’m not doing anything special on the rover, I just launch a couple of ROS 2 packages for PCL and lidar managing, nothing more