Activating ROS 2 via Husarnet on Windows 11 with DDS Implementation

System: Windows 11
ROS 2: Humble

Hello,

I have successfully installed Husarnet and joined the same Husarnet network as other Linux devices. Communication via Husarnet is working correctly. My goal is to activate ROS 2 via Husarnet.

I have downloaded husarnet-dds-windows-amd64.exe (11.2 MB, dated July 11, 2023) from the Github link provided in the Husarnet documentation.

On Linux, the following commands are used to set up the environment:
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
export FASTRTPS_DEFAULT_PROFILES_FILE=/var/tmp/husarnet-fastdds-simple.xml
husarnet-dds singleshot

However, when I try to set these environment variables manually in Windows, especially RMW_IMPLEMENTATION, ROS 2 stops working completely.

Could you please advise on the best way to activate ROS 2 via Husarnet on Windows 11 so I can communicate normally with other machines?

Thank you

Here are the steps I executed ( P.S. I am a little rusty so please correct me if something does not work )

  1. Inside a Command Prompt terminal ( initialized as Administrator ), run the following commands
 setx /m RMW_IMPLEMENTATION rmw_fastrtps_cpp
 setx /m FASTRTPS_DEFAULT_PROFILES_FILE  C:\<folder where you installed husarnet>\husarnet-fastdds-simple.xml

  1. Go to the folder where you installed husarnet and run the following command from that administrative cmd terminal again.
 .\husarnet-dds.exe singleshot

  1. You should see a statement saying
 DDS config saved here: "C:\<path to husarnet folder>\husarnet-fastdds-simple.xml"

Side Tip
Make sure you source the local_setup.ps1 in your powershell before running ROS2 (if not automatically sourced).