{"id":20492338,"url":"https://github.com/husarnet/husarnet-dds","last_synced_at":"2025-06-10T21:39:05.581Z","repository":{"id":65836861,"uuid":"595734674","full_name":"husarnet/husarnet-dds","owner":"husarnet","description":"Automatically generate the ROS2 DDS configuration for Husarnet.","archived":false,"fork":false,"pushed_at":"2023-07-11T21:25:56.000Z","size":5948,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-16T05:54:32.843Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/husarnet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-31T17:48:07.000Z","updated_at":"2023-09-26T18:44:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"1ce96795-7fad-44a9-96d8-b322e54d1a01","html_url":"https://github.com/husarnet/husarnet-dds","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/husarnet%2Fhusarnet-dds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/husarnet%2Fhusarnet-dds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/husarnet%2Fhusarnet-dds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/husarnet%2Fhusarnet-dds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/husarnet","download_url":"https://codeload.github.com/husarnet/husarnet-dds/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242070445,"owners_count":20067267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T17:28:40.008Z","updated_at":"2025-03-05T17:31:39.658Z","avatar_url":"https://github.com/husarnet.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# husarnet-dds\n\n[![Firmware release](https://github.com/husarnet/husarnet-dds/actions/workflows/release.yaml/badge.svg)](https://github.com/husarnet/husarnet-dds/actions/workflows/release.yaml)\n\nAutomatically generate the DDS configuration for Husarnet.\n\n## Installing from releases\n\n### Linux/MacOS\n\nDownload the binary using `curl` or `wget`, which are available on most systems either preinstalled, or obtainable via package manager:\n\n```bash\nRELEASE=\"v1.3.6\"\nARCH=\"amd64\"\n\nsudo curl -L https://github.com/husarnet/husarnet-dds/releases/download/$RELEASE/husarnet-dds-linux-$ARCH -o /usr/local/bin/husarnet-dds\nsudo chmod +x /usr/local/bin/husarnet-dds\n```\n\n### Windows\n\nOn Windows, you can download the binary via GUI from [Releases page](https://github.com/husarnet/husarnet-dds/releases) and place in directory of your liking.\nTo do it right from PowerShell, use `wget` command which is an alias for `Invoke-WebRequest` cmdlet:\n\n```\nwget https://github.com/husarnet/husarnet-dds/releases/download/v1.3.4/husarnet-dds-windows-amd64.exe -OutFile husarnet-dds.exe\n```\n\nIn order to be able to run the binary from any directory, place it in the directory present in your %PATH% environment variable.\n\n## Building\n\n```\ngo build -o husarnet-dds\n```\n\n## Using\n\n\u003e **warning**\n\u003e\n\u003e Target file name specified in `FASTRTPS_DEFAULT_PROFILES_FILE` or `CYCLONEDDS_URI` paths should contain 'husarnet' substring. Otherwise, the config will be saved under a default location.\n\n### Fast DDS - simple discovery\n\nOn Linux/MacOS, using bash:\n\n```bash\nexport RMW_IMPLEMENTATION=rmw_fastrtps_cpp\nexport FASTRTPS_DEFAULT_PROFILES_FILE=./husarnet-fastdds-simple.xml\nhusarnet-dds singleshot\n```\n\nOn Windows, using PowerShell\n\n```powershell\n$env:RMW_IMPLEMENTATION = 'rmw_fastrtps_cpp'\n$env:FASTRTPS_DEFAULT_PROFILES_FILE = '.\\husarnet-fastdds-simple.xml'\n.\\husarnet-dds.exe singleshot\n```\n\n### Fast DDS - discovery server\n\n#### Device acting as a **SERVER**\n\nLet's assume that the Husarnet hostname of the device is `my-server`:\n\n```bash\nexport DISCOVERY_SERVER_PORT=11811\nhusarnet-dds singleshot\n```\n\nLaunching the discovery server:\n\n```\nfast-discovery-server -i 0 -x /var/tmp/husarnet-dds/fastdds-ds-server.xml\n```\n\n#### Device acting as a **CLIENT**\n\n```bash\nexport RMW_IMPLEMENTATION=rmw_fastrtps_cpp\nexport FASTRTPS_DEFAULT_PROFILES_FILE=./husarnet-fastdds-ds-client.xml\nexport ROS_DISCOVERY_SERVER=my-server:11811\nhusarnet-dds singleshot\n```\n\n### Cyclone DDS\n\n```bash\nexport RMW_IMPLEMENTATION=rmw_cyclonedds_cpp\nexport CYCLONEDDS_URI=file://./husarnet-cyclone.xml\nhusarnet-dds singleshot\n```\n\n## Launching `husarnet-dds` as a service\n\nYou can run `husarnet-dds` in a service mode. It will start automatically after system reboot, and every 5 seconds it will update the hosts in DDS `.xml` profile files.\n\n### Installing\n\nUnix-like systems, using bash:\n\n```bash\nexport RMW_IMPLEMENTATION=rmw_fastrtps_cpp\nexport FASTRTPS_DEFAULT_PROFILES_FILE=/var/tmp/husarnet-dds/husarnet-fastdds.xml\n\nsudo husarnet-dds install $USER \\\n-e RMW_IMPLEMENTATION=$RMW_IMPLEMENTATION \\\n-e FASTRTPS_DEFAULT_PROFILES_FILE=$FASTRTPS_DEFAULT_PROFILES_FILE\n```\n\nOn Windows, using PowerShell as Administrator:\n\n```powershell\n$env:RMW_IMPLEMENTATION = 'rmw_fastrtps_cpp'\n$env:FASTRTPS_DEFAULT_PROFILES_FILE = 'C:\\Users\\husarnetman\\Desktop\\dds\\husarnet-fastdds-simple.xml'\n\n.\\husarnet-dds.exe install LocalSystem -e RMW_IMPLEMENTATION=$env:RMW_IMPLEMENTATION `\n-e FASTRTPS_DEFAULT_PROFILES_FILE=$env:FASTRTPS_DEFAULT_PROFILES_FILE\n```\n\nBe sure to provide absolute path to the file which will be watched, as in the example.\n\nAvailable environment variables\n\n| key | default value | description |\n| - | - | - |\n| `FASTRTPS_DEFAULT_PROFILES_FILE` | `/var/tmp/husarnet-dds/fastdds.xml` | path to the output `.xml` file for `RMW_IMPLEMENTATION=rmw_fastrtps_cpp` |\n| `CYCLONEDDS_URI` | `file:///var/tmp/husarnet-dds/cyclonedds.xml` | path to the output `.xml` file for `RMW_IMPLEMENTATION=rmw_cyclonedds_cpp` |\n| `ROS_DISCOVERY_SERVER` | (unset) | set it ONLY for devices running in [Fast DDS Discovery Server](https://fast-dds.docs.eprosima.com/en/latest/fastdds/ros2/discovery_server/ros2_discovery_server.html) **\"Client mode\"**. The value of this env should have the following format: `\u003cHusarnet-hostname-of-discovery-server\u003e:\u003cPORT\u003e`, eg. `my-ds-server:11811` |\n| `DISCOVERY_SERVER_PORT` | `11811` | set it ONLY for devices running in [Fast DDS Discovery Server](https://fast-dds.docs.eprosima.com/en/latest/fastdds/ros2/discovery_server/ros2_discovery_server.html) **\"Server mode\"** |\n\n### Starting\n\n```bash\nsudo husarnet-dds start\n```\n\nNow you can check the status of the service on Linux and last logs like that:\n\n```bash\nsudo systemctl status husarnet-dds.service \n```\n\n```bash\nsudo journalctl --unit husarnet-dds.service -n 100 \n```\n\nOn Windows, see services.msc\n\n### Removing\n\n```\nsudo husarnet-dds stop\nsudo husarnet-dds uninstall\n```\n\n## Creating a new release\n\n```\ngit tag v1.0.0 main\ngit push origin v1.0.0 main\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhusarnet%2Fhusarnet-dds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhusarnet%2Fhusarnet-dds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhusarnet%2Fhusarnet-dds/lists"}