ASR ANDROID · ILLUSTRATED MANUAL

Your phone is now
a robot sensor.

A step-by-step guide for people new to ROS 2. You don't need to know ROS 2 yet, and you'll see live sensor data from your phone by the end of chapter 4.

CHAPTER 1

What ASR does

Robots need sensors: cameras, motion sensors, GPS. Your phone already has them. ASR Android sends that data to a computer in the format robots use, called ROS 2.

PHONECAMERA IMUGPS BATTERY COMPUTERROS 2 NODESFOXGLOVE RVIZ WI-FI / USBROS 2 TOPICSLIVE

Nothing goes to an ASR server. Data only goes to machines on your own network or cable. ASR Studio is a separate desktop app for checking sensors, and it isn't needed for ROS 2.

CHAPTER 2

Five ROS 2 words you need

Everything else builds on these. Think of ROS 2 as a group chat for robot parts.

NODEA program taking part. Your phone is one node, such as asr_android_222.
TOPICA named channel for one kind of data, such as /asr_android_222/imu.
MESSAGEOne piece of data on a topic, such as one camera image.
DOMAINA number that groups machines. Only the same ROS_DOMAIN_ID can talk. The default is 0.
DISCOVERYHow nodes find each other on the network automatically.
CHAPTER 3

What you need

CHAPTER 4

Your first connection

  1. On the phone: open ASR Android and press START. Allow the permissions for the sensors you want.
  2. Choose how to connect: turn on WI-FI DDS. To use a cable instead, turn on Android's USB tethering and USB DDS.
  3. On the computer: open a terminal where ROS 2 is set up and ask which nodes exist. Your phone's number will differ.
    ros2 node list

    You should see something like /asr_android_222/asr_android_222. If the list is empty, run it once more. If it's still empty, see chapter 10.

  4. See the topics:
    ros2 topic list
  5. Watch live data: move the phone and the numbers change. Press Ctrl+C to stop.
    ros2 topic echo /asr_android_222/imu
That's it. Your phone is a ROS 2 node. The phone's screen changes to NODES DISCOVERED once it sees your computer. NO OTHER NODES only means nothing else is running yet, and your phone can still be found.
CHAPTER 5

A tour of the main screen

ASR Android main screen with numbered callouts1234567
  1. Runtime status. Shows RUNNING and how many sensors are on. Tap to choose sensors.
  2. START, STOP, RESTART. Turns the phone’s sensors on and off.
  3. Node name. This phone’s name in ROS 2. Your topics begin with it.
  4. WI-FI DDS. Sends ROS 2 data over Wi-Fi.
  5. USB DDS. Sends ROS 2 data over a USB cable. Needs USB tethering on, and the app shows a button to open that setting.
  6. Battery warning. On a robot, turn off battery optimization so Android doesn’t stop the app. The warning disappears when it’s off.
  7. ADVANCED. Tap to open the settings in the next chapter.
CHAPTER 6

Advanced settings

You can skip these at first. Settings stay locked until you press EDIT, so a stray tap can't change anything.

ASR Android advanced settings with numbered callouts123456
  1. ROS_DOMAIN_ID. Must match your computer. Change it to keep several robots apart.
  2. NODE NAME and ROS_STATIC_PEERS. Peers fix networks that block discovery. Enter your computer’s IP here (chapter 10).
  3. EDIT. Unlocks the fields, then choose APPLY or CANCEL. Applying restarts the node.
  4. REMOTE CONFIG. Lets computers change settings and control the flashlight and speaker. Off by default.
  5. START ON BOOT. Starts the app after a restart. This varies by phone maker.
  6. ROS_SECURITY_ENABLE. Encrypts traffic with SROS2. Needs keys, and is off by default. The README explains setup.
CHAPTER 7

Change the camera from your computer

This is handy when the phone is mounted on a robot. First turn on REMOTE CONFIG on the phone.

See the current settings

ros2 topic echo --qos-durability transient_local /asr_android_222/config/state

Switch camera or size

ros2 topic pub --once /asr_android_222/config/set std_msgs/msg/String "{data: camera.id=1}"
ros2 topic pub --once /asr_android_222/config/set std_msgs/msg/String "{data: camera.resolution=1280x720}"

Sizes are 320x240, 640x480 (recommended), 1280x960, 640x360 and 1280x720. A phone may pick its closest size: one tested phone gave 960x544 for 640x360. config/state always shows the real size and live FPS.

Two cameras at once? Both tested phones refused to open front and back together. Use one camera at a time, or two phones, each as its own node.
CHAPTER 8

See it visually with Foxglove

Foxglove shows camera images and sensor graphs in a window, instead of numbers in a terminal.

  1. Start the bridge on your computer:
    ros2 launch foxglove_bridge foxglove_bridge_launch.xml
  2. In Foxglove, choose Open connection → Foxglove WebSocket and enter ws://localhost:8765.
  3. Pick a topic such as camera/image/compressed in an Image panel.
CHAPTER 9

Mounting on a robot

CHAPTER 10

Troubleshooting

What you seeLikely causeWhat to do
ros2 node list is emptyA different domain, or runtime or DDS is offPress START, turn on a DDS switch, and match ROS_DOMAIN_ID on both sides.
Ping works, but no node appears over Wi-FiA firewall on the computer, or a router that blocks multicastOn the phone, set ROS_STATIC_PEERS to your computer's IP. On the computer, run export ROS_STATIC_PEERS=<phone IP>. Also check that your firewall allows ROS 2.
Node appears, but a topic shows no dataThat sensor is off or the phone lacks itTap the runtime status and check the sensor. Some phones lack some sensors.
rejected: turn on REMOTE CONFIGRemote control is offTurn on REMOTE CONFIG on the phone.
Camera is slow or choppyWeak Wi-FiUse USB or a smaller size. Late frames are dropped so you always get a recent one.
Timestamps look wrongPhone and computer clocks differSet both to automatic time. One tested phone's clock was 690 ms behind.
Can't see the phone with SROS2 onThe computer has no keys, or its RMW lacks securitySee the SROS2 section of the README.

Ready for more detail? See the connection guide.