Running App
  • 2 Minutes to read

Running App

Article Summary

Run your app

During & after the development of your app, you will need to run the application to test it and verify that it works in an appropriate way. You have two options to run your app: run it using a real robot or run it using our emulator.

We extremely encourage you to test the application on a real device before releasing it to your uses through the release platform.

This article will guide you through the necessary steps to run your app.

1. Open & activate the simulator (you can skip this step when testing on a real robot)

rayasdk simulator

After running the command, The simulator should be open and you should see an output like this in your terminal:

[bringup-1] Scanning DDS domain 1...
[bringup-1] Serving on http://localhost:8789
[bringup-1] Serving on
[bringup-1] Serving on
[bringup-1] Serving on
[bringup-1] Acquired DDS domain 1

This output means that the simulator environment is ready and a "virtual" robot was created and can be detected.

2.Scan + Connect to the device (robot/simulator)

In order to be able to run the application, we need first to connect it to the target device (even if it's a real robot or the simulator in your local machine).

Important notes!      
- You need to perform all the following steps inside the folder of your application.
- Scan/Connect commands will find only devices connected to the same network as your machine.
  • Scan for devices. In order to be able to connect to a device, we first need to scan and find it in your network.
rayasdk scan

  •  Copy the robot_id from the terminal, and run:
rayasdk connect --robot-id={robot_id}



Finally, you can run your app!

rayasdk run

4. Troubleshooting

Robot 'SIM-ofir' with serial 'SIM-ofir' is not available, run 'rayasdk connect' again

Execute  "rayasdk simulator" to run the simulator, then "rayasdk scan" to find the new details of the SIM-robot and finally "rayasdk connect".

Notice that every time we close\open the simulator we need to execute "rayasdk scan" and "rayasdk connect" before "rayasdk run"

ofir@ofir:~/tmp/hellowrold$ rayasdk scan
Scanning local network for robots (press Ctrl+C to stop)...
Finish scanning
No robots found.

Execute "rayasdk simulator" and then "rayasdk scan"

ERROR: Could not open "exec_settings.json" file, no project initialized in this folder.

cd to the app folder and execute "rayasdk" commands from there. it is the folder that you executed "rayasdk init" command.

(raya2_dev) ofir@ofir:~/tmp/hellowrold$ rayasdk run
(CRITICAL)<RayaApp.EntryPoint> Could not create Raya application: Couldn't connect to Raya Bridge.

Go to the simulator and press "start" to initiate the scene you want to test your app in. 

ofir@ofir:~/tmp/hellowrold$ rayasdk init --app-id app --app-name bestAppEver
ERROR: Current directory is not empty.

"rayasdk init" command must be executed in an empty directory.

Was this article helpful?