{"id":21741299,"url":"https://github.com/keplerc/fogros2-sky","last_synced_at":"2026-05-10T19:52:40.353Z","repository":{"id":196717421,"uuid":"614354333","full_name":"KeplerC/FogROS2-sky","owner":"KeplerC","description":"An Adaptive and Extensible Platform for Cloud and Fog Robotics Using ROS 2","archived":false,"fork":false,"pushed_at":"2024-03-02T22:46:16.000Z","size":4453,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"sky","last_synced_at":"2025-01-25T21:55:32.568Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://berkeleyautomation.github.io/FogROS2","language":"Python","has_issues":false,"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/KeplerC.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-15T12:22:58.000Z","updated_at":"2023-12-11T23:01:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"6952f902-f814-419d-99ad-8e4ae9a3aa5a","html_url":"https://github.com/KeplerC/FogROS2-sky","commit_stats":null,"previous_names":["keplerc/fogros2-sky"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeplerC%2FFogROS2-sky","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeplerC%2FFogROS2-sky/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeplerC%2FFogROS2-sky/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeplerC%2FFogROS2-sky/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KeplerC","download_url":"https://codeload.github.com/KeplerC/FogROS2-sky/tar.gz/refs/heads/sky","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244717341,"owners_count":20498284,"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-26T06:18:19.766Z","updated_at":"2026-05-10T19:52:35.320Z","avatar_url":"https://github.com/KeplerC.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FogROS2-Sky\n\nFogROS2-Sky is a cost-efficient open source robotics platform that offloads unmodified ROS2 [[1]](#1) applications to multiple cloud providers and enables fine-grained cost analysis for ROS2 applications’ communication with multiple cloud providers. As each provider offers different options for CPU, GPU, memory, and latency, it can be very difficult for users to decide which to choose. FogROS2-Sky includes an optimization algorithm, which either finds the best available hardware specification that fulfills the user’s latency and cost constraints or reports that such a specification does not exist. We use FogROS2-Sky to perform time-cost analysis on three robotics applications: visual SLAM, grasp planning. and motion planning. We are able to sample different hardware setups at nearly half the cost while still create cost and latency functions suitable for the optimizer. We also evaluate the optimizer’s efficacy for these applications with the Pareto frontier and show that the optimizer selects efficient hardware configurations to balance cost and latency. Videos and code are available [here](https://sites.google.com/view/fogros2-sky).\n\n- [FogROS2](#fogros2)\n  - [Sky Setup Instructions](#sky-setup-instructions)\n  - [Usage](#usage)\n  - [Installation](#installation)\n    - [Quickstart](#quickstart)\n    - [Docker (Recommended)](#docker-recommended)\n    - [Natively](#natively)\n  - [Launching ROS 2 Computational Graphs in the Cloud](#launching-ros-2-computational-graphs-in-the-cloud)\n    - [Docker (Recommended)](#docker-recommended-1)\n    - [Natively](#natively-1)\n  - [Running Your Own Robotics Applications](#running-your-own-robotics-applications)\n  - [Setting Up Automatic Image Transport](#setting-up-automatic-image-transport)\n  - [Command Line Interface](#command-line-interface)\n  - [Common Issues](#common-issues)\n  - [Running Examples](#running-examples)\n  - [References](#references)\n\n\n## Sky Setup Instructions\n\n1. Create `/sky_ws/src` and clone the repositories.\n\n```\nmkdir -p ~/sky_ws/src\ncd ~/sky_ws/src\ngit clone https://github.com/KeplerC/FogROS2-sky.git\ngit clone https://github.com/KeplerC/fogros2-sgc\n```\n\n2. Build the packages in the `sky_ws` directory.\n```\ncd ~/sky_ws\ncolcon build\n```\n\n3. Install `skypilot` and dependencies.\n```\npip install skypilot\npip3 install wgconfig boto3 paramiko scp\nsudo apt update\nsudo apt install wireguard-tools # TODO: remove dependency of VPN \n```\n\n4. Follow the installation instructions for SGC [here](https://github.com/KeplerC/fogros2-sgc).\n\n5. Configure AWS.\n```\naws configure\nsky check # to make sure AWS is enabled\n```\n\n## Usage\n1. To ensure Sky was set up successfully, try running the provided examples.\n```\nsource install/setup.bash\nros2 launch fogros2_examples talker.sky.launch.py \n```\n\n2. Check the status. \n```\nsky status \n```\n\n3. Turn off.\n```\nsky down sky-fogros\n```\n\n4. Build the benchmark. A normal benchmark does not need to run the entire FogROS pipeline. \n```\nsky bench launch benchmark.yaml -b BENCHMARK_NAME\n```\n\n5. Wait for a few minutes (10 minutes? it needs time to init dexnet) before showing the benchmark results. Note that this will stop logging the current benchmark (yes, I confirmed this with Sky team, their scenario is different from ours), so only do it if you are confident the numbers are generated. We should modify it and do it our way later. \n```\nsky bench show BENCHMARK_NAME\n``` \n\n7. To turn off everything, run:\n```\nsky bench down BENCHMARK_NAME\n```\nTODO: in the future, integrate this (and the algorithm) with the main FogROS pipeline. \n\n## Installation\n### Quickstart\n- If you are new to ROS and Ubuntu, and want to install FogROS 2 (and ROS 2) and its requisites from scratch, follow instructions [here](https://github.com/BerkeleyAutomation/FogROS2/blob/humble/QUICKSTART.md).\n\n### Docker (Recommended)\n- Alternatively, you can simplify reproduction using an OS virtualization environment with Docker. You can also watch our video tutorial [here](https://www.youtube.com/embed/oEnmZXojkcI?start=1\u0026end=800). \n```bash\ngit clone -b humble https://github.com/BerkeleyAutomation/FogROS2\ncd FogROS2\n\n# Install AWS CLI\nsudo apt install awscli\n\n# Configure AWS Basic Settings. To run the next command, you need to have your security credentials, an output format and AWS Region. See https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html\naws configure\n\n#Build Docker Image\ndocker build -t fogros2 .\n```\n- By default, this command will build a docker image for ROS Rolling and Ubuntu 22.04 (jammy). These defaults can be changed using the `--build-arg` flag (e.g., `docker build -t fogros2:focal-humble . --build-arg UBUNTU_DISTRO=focal --build-arg ROS_DISTRO=humble` will build a ROS Humble image with Ubuntu 20.04 (focal)).\n*Note: the Dockerfile is cooked for x86_64. If you're using a workstation with an Arm-based architecture (e.g. an M1), build the container with the `docker build --platform linux/amd64 -t fogros2 .`*.\n\n### Natively\n- `FogROS2` is actually a ROS meta-package, so you can just fetch it in your workspace, build it, source the workspace as an overlay and start using its capabilities. You can also watch our video tutorial [here](https://www.youtube.com/embed/JlV4DhArb8Q?start=1\u0026end=402). \n\n- Install ROS 2 dependencies.\n```\n# If using Ubuntu 22.04\nsudo apt install ros-rolling-rmw-cyclonedds-cpp\n```\n\n- Install FogROS 2 dependencies.\n```\nsudo apt install python3-pip wireguard unzip\nsudo pip3 install wgconfig boto3 paramiko scp\nsudo apt install awscli\n```\n\n- Configure AWS. To run the next command, you need to have your security credentials, an output format, and an AWS Region. See https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html\n```\naws configure\n```\n\n- Re-build the workspace.\n\n```bash\nsource /opt/ros/\u003cyour-ros2-distro\u003e/setup.bash\nmkdir -p ~/fog_ws/src\ncd ~/fog_ws/src\ngit clone -b humble https://github.com/BerkeleyAutomation/FogROS2\ncd ../\ncolcon build\nsource install/setup.bash\n```\n\n\n## Launching ROS 2 Computational Graphs in the Cloud\n\n### Docker (Recommended)\n- You can see this in our video tutorial [here](https://www.youtube.com/embed/oEnmZXojkcI?start=801).\n\n```bash\n# launch fogros2 container\ndocker run -it --rm --net=host -v $HOME/.aws:/root/.aws --cap-add=NET_ADMIN fogros2\n\n# launch talker node on the cloud\nros2 launch fogros2_examples talker.aws.launch.py\n```\n\n- *Note: the Dockerfile is cooked for x86_64. If you're using a workstation with an Arm-based architecture (e.g. an M1), run the container with the `docker run -it --platform linux/amd64 --rm --net=host --cap-add=NET_ADMIN fogros2`*).\n\n### Natively\n- These commands must be run from the root of your ROS workspace. You can see this in our video tutorial [here.](https://www.youtube.com/embed/JlV4DhArb8Q?start=403)\n```bash\nsource /opt/ros/\u003cyour-ros2-distro\u003e/setup.bash\nsource install/setup.bash\nexport RMW_IMPLEMENTATION=rmw_cyclonedds_cpp \nexport CYCLONEDDS_URI=file://$(pwd)/install/fogros2/share/fogros2/configs/cyclonedds.ubuntu.$(lsb_release -rs | sed 's/\\.//').xml\n\nros2 launch fogros2_examples talker.aws.launch.py\n```\n\n## Running Your Own Robotics Applications\nIf using, for example, Docker, take the following steps: \n\n1. Mount your robotics application to docker's folder. You can use the following example or  `git clone` your development repo to the docker container instead.\n```\ndocker run -it --rm \\\n    --net=host --cap-add=NET_ADMIN \\\n       ....\n    -v FOLDER_IN_YOUR_LOCAL_DIR:/home/root/fog_ws/src/YOUR_PKG_NAME \\\n       ...\n    keplerc/ros2:latest /bin/bash\n```\n\n2.  Write the FogROS2 launch file. Examples of launch files can be found in the talker*.launch.py [here](https://github.com/BerkeleyAutomation/FogROS2/tree/humble/fogros2_examples/launch).\n\n\n## Setting Up Automatic Image Transport\n1. Identify all topics that need to use a compressed transport.\n\n2. In a `fogros2.CloudNode`, add the parameter `stream_topics=[]`, where `stream_topics` is a list of tuples where each tuple is just a pair of `(TOPIC_NAME, TRANSPORT_TYPE)` values.\n    - `TOPIC_NAME` is the string that represents the name of the topic that publishes `sensor_msgs/Image`\n    - Valid `TRANSPORT_TYPE` values are `compressed`, `theora`, and `raw` if only `image-transport` and `image-transport-plugins` are installed on the system. \n    - `h264` is another valid `TRANSPORT_TYPE` if step 3 is followed.\n\n3. (Optional): If using H.264, please also clone the H.264 decoder found [here](https://github.com/clydemcqueen/h264_image_transport) into the workspace's src directory. The current repo only contains the encoder and the full image transport pipeline will not work without the decoder either. Example of `stream_topics` argument:\n    - `stream_topics=[('/camera/image_raw', 'h264'), ('/camera2/image_raw', 'compressed')]`\n    - Adding the above argument to a `fogros2.CloudNode` makes the topic `/camera/image_raw` publish using the `h264 image_transport`, and makes the topic `/camera2/image_raw` publish using the `compressed image_transport`.\n    - Please note that all cloud nodes that are expecting raw images will be remapped to `TOPIC_NAME/cloud` to remove any topic naming conflicts. (TODO: Automate remapping)\n\n## Command Line Interface\nWe currently support the following CLI commands for easier debugging and development.\n\n```bash\n# List existing FogROS instances\nros2 fog list\n\n# Connect via SSH to the corresponding instance (e.g., named \"ascent-corona\")\n# the instance name can be found by the list command above\nros2 fog connect ascent-corona\n\n# delete the existing FogROS instance (e.g. named \"ascent-corona\")\nros2 fog delete ascent-corona\n# or all of the existing instances\nros2 fog delete all\n```\n\n## Common Issues\n1. Warning: _2 packages has stderr outputs: fogros2 fogros2_examples_ after running colcon build. This warning occurs in Ubuntu 22.04 (jammy) builds, but does not affect functionality. See https://github.com/BerkeleyAutomation/FogROS2/issues/45. Your installation should still work.  \n2. _[WARN] [1652044293.921367226] [fogros2.scp]: [Errno None] Unable to connect to port 22 on xx.xx.xx.xxx, retrying..._ . This warning occurs when AWS has not yet started the instance. This message should eventually be replaced by _SCP Connected!_ once the instance is started.\n3. _WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behavior with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv_. This warning is often seen when installing packages on the cloud instance, but can be ignored.\n\n## Running Examples\nWe have used FogROS for 3 example use-cases (motion planning, grasp planning, and SLAM map building). Please see our [examples repo](https://github.com/BerkeleyAutomation/fogros2-examples) for these and how to run them.\n\n\n## References\n\u003ca id=\"1\"\u003e[1]\u003c/a\u003e \nMacenski Steven, Foote Tully, Gerkey Brian, Lalancette Chris, and Woodall William, \n“Robot Operating System 2: Design, architecture, and uses in the wild,” \nScience Robotics, vol. 7, no. 66, p. eabm6074, doi: 10.1126/scirobotics.abm6074.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeplerc%2Ffogros2-sky","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeplerc%2Ffogros2-sky","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeplerc%2Ffogros2-sky/lists"}