All rapyuta.io docs are open source. See something that's wrong or unclear? Submit a pull request.Make a contribution
Turtlesim is a tool made for teaching ROS and ROS packages. This tutorial will show you how to set up and run a variation of the ROS Turtlesim on the cloud using rapyuta.io.
To attain a deeper understanding of rapyuta.io, it is highly recommended that the developer refer to the following sections in the documentation
The tutorial will show you how to deploy a basic Turtlesim ROS package on the cloud. The steps mentioned here would help you
The tutorial will also have a few optional and exploratory steps covering
15 - 30 minutes
rapyuta.io offers seamless communication between different ROS nodes running on the cloud or a device. This automatic communication reduces the need to manage shared ROS masters and allows you to focus on building your robotics solution.
Let’s begin by creating a melodic-cloud-rnet routed network.
melodic-cloud-rnetas the name of the routed network.
Small: 1cpu core, 4Gib memory.
Your new network would now be provisioned in a few minutes.
💡 Understand: Routed Networks
For people familiar with ROS1, discovery & communication between nodes and their advertised topics, services and actions are facilitated via a ROS Master. This communication pattern works well on a single machine, or in a local area network [LAN].
A key limitation of the ROS1 communication mechanism comes from the fragility of a single ROS Master shared between nodes both on the same device or on the same LAN. This makes the system especially susceptible to network fluctuations and ROS Master failures.
ROS Routed networks are a key component in this seamless communication scheme. For more information about routed network, click here
Software is distributed on rapyuta.io’s cloud platform using Packages.
We will begin with importing the TurtleSim packages into your account.
If you want to create your own packages, refer to the how to guide and deep dives on Packages.
💡 Understand : Packages
Packages are a way of defining components that need to be deployed together.
The two packages imported above help to simulate a simple flat 2D world where multiple turtles can be spawned and moved.
Turtle-World provides the simulated world with simple rectangular walls. It also provides services to add and move one or more turtles. By default, a single turtle is added to the world on startup. Along with running the ROS components for the turtle world’s rudimentary simulation, the package also comes with a Web application to visualize the turtle world and a few developer-friendly additions like a notebook server and desktop UI access over WebVNC.
More turtles can be added by deploying the Turtle Melodic package.
It has a simple ROS node, no GUI environment, and communicates with Turtle-World using ROS topics, services, and actions over a Routed Network
First, examine Turtle-World in detail.
Turtle-World has a component that runs on the cloud.
In package specification terminology, this is referred to as a component with a cloud runtime.
This component runs a simple Docker image on the cloud.
In package specification terminology, this is referred to as an executable with a docker image reference
💡 Did you find the docker image used in the package? Look for the docker image name under the executable section
Cloud Endpoints allow for TCP/HTTP-based services in your component to be accessible on the public internet or to other deployments.
In the world package we have added a few note-worthy endpoints.
- HTTP endpoint for a simple web-UI to visualize turtles and their world
- TCP endpoint for WebSocket connections to
- HTTP endpoint exposing a notebook server for you to play with the turtle example and explore the ROS workspace
- VNC endpoint to access the desktop remotely.
💡 Did you notice the fifth endpoint exposed by the package?
- We expose the ssh service as an endpoint. but it is not recommended to expose SSH in production environments.
- For accessing your running deployment’s shell rapyuta.io offers Remote SSH access from any running deployment’s detail page.
- We have defined the default user
rapyuta’s password using configuration parameters of the package.
💡 Did you find the default password set by the package?
Deployments are instances of running packages. Begin by deploying the Turtle-World package.
rosbag-alland select All Topics to record.
The deployment should now start running in the cloud. This usually takes a few minutes. You would be taken to the detail page of the deployment where the progress of the provisioning can be seen.
When the deployment is running its status should show up as Succeeded with a green dot next to it.
Congratulations! You have your first deployment running on rapyuta.io.
Open the TURTLESIM_WEB endpoint to access turtlesim world web UI in a new browser tab.
Additionally, you can also,
💡 Endpoints can be found on the Deployment Detail Page. They are of the format http://inst-xxxxxxxx:80 , https://inst-xxxxxxx:443
rapyuta.io allows you to access running deployment over a web SSH terminal right from your browser.
Remote SSH helps you in debugging deployments that are running on the platform but don’t come bundled with remote-debugging tools like webVNC or notebook servers.
rapyuta.io captures and stores terminal output for your running deployments. You can access both the live-logs of a running deployment as well as the historical logs of a deployment that is running or has been stopped recently. Historical logs of deployment are retained for 7 days or more as per your subscription plan.
To access logs for turtlesim-cloud
Read more about logs here
rapyuta.io can record rosbags on your running deployments.
Recording jobs added at the time of deployment creation start and stop with the deployment. You can additionally start new ROS bag jobs on any running deployment. You can also stop any ROS bag job manually while a deployment is still running.
Ros bag jobs upload the recorded bags to Cloud storage and these bags are available for easy access and archiving even after your deployment stops running.
To access ROS bags recorded on our deployment
Read more about Rosbags on rapyuta.io here
We will now add another turtle into the sim world.
To do this, import and deploy the Turtle Melodic package over the same routed network as Turtle-World
Turtle Melodicpacakge into your account
melodic-cloud-rnetfrom the network drop-down menu.
The second turtle should now show up in the Web-UI.
You can deploy more Turtles if you want. You can now command two turtles simultaneously.
💡 Deployments consume cloud resources that are chargeable beyond your free-tier usage limit. It is advised to deprovision deployments when not in use.
To deprovision (stop) a running deployment, follow the steps: