Skip to content
プロジェクト

VedantC2307/ros2-mobile-sensor-bridge

GitHubで見る

概要

Mobile Sensor Bridge for ROS2 transforms your android smartphone into a plug‑and‑play sensor suite—streaming camera, spatial pose data, and bidirectional audio into ROS2 topics via rclnodejs. Whether you’re prototyping perception pipelines or building voice‑driven robots, the package lets you leverage your phone’s sensors without extra hardware.

デザイン・メディア

この数値の測り方

できること

  • Supports iOS and Android (iOS 13+, Android 8+)
  • JPEG camera streaming (configurable FPS/quality, front/back camera selection)
  • IMU (accelerometer + gyro)
  • GPS (longitude, latitude and altitude)

計測したスター増加

24時間
0
7日間
0
15日間
0
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

Mobile Sensor Bridge for ROS2 v2.0 🚀

Version License: MIT ROS2 Node.js

Rapid ROS 2 prototyping bridge: drop any iOS/Android phone or tablet into your ros2 stack and instantly stream camera (JPEG), IMU, GPS, WebXR pose, speech transcription and text-to-speech over a secure HTTPS/WebSocket pipeline powered by rclnodejs—no native app install, just a browser, a YAML config, and one launch. Built for quick perception/audio experiments, field demos, and early integration work with configurable parameters, standardized message types, and a minimal surface for extension.

What’s New in 2.0

  • iOS support
  • Added GPS (/mobile_sensor/gps)
  • Added IMU publisher (/mobile_sensor/imu)
  • Unified speech topic (/mobile_sensor/speech)
  • WAV + text TTS channels
  • Config-driven parameters (config/config.yaml)
  • Reorganized project layout for easier customization and extension

Features:

  • Supports iOS and Android (iOS 13+, Android 8+)
  • JPEG camera streaming (configurable FPS/quality, front/back camera selection)
  • IMU (accelerometer + gyro)
  • GPS (longitude, latitude and altitude)
  • Optional WebXR pose
  • Configurable Wake‑word microphone transcription → /mobile_sensor/speech
  • native Text‑to‑speech or .wav audio playback to device
  • YAML central configuration

Publishes:

  • /camera/image_raw/compressed (sensor_msgs/CompressedImage)
  • /mobile_sensor/imu (sensor_msgs/Imu)
  • /mobile_sensor/gps (sensor_msgs/NavSatFix)
  • /mobile_sensor/pose (geometry_msgs/Pose)
  • /mobile_sensor/speech (std_msgs/String)

Subscribes:

  • /mobile_sensor/tts (std_msgs/String) – plain text TTS

Prerequisites

Requirements

  • ROS 2 Humble [Tested]
  • Node.js 20+
  • OpenSSL (for certificate generation)
  • Shared Wi‑Fi network between device and ROS host

Installation

cd <ros2_ws>/src
git clone https://github.com/VedantC2307/ros2-mobile-sensor-bridge.git mobile_sensor
cd mobile_sensor
export ROS_DISTRO=humble # ensure ROS environment is detected by rclnodejs
npm install              # install node dependencies BEFORE colcon build
cd src
chmod +x generate_ssl_cert.sh
mkdir -p ssl            # create ssl directory if it doesn't exist
./generate_ssl_cert.sh  # create ssl/key.pem + cert.pem
cd ~/<ros2_ws>          # back to workspace root
colcon build --packages-select mobile_sensor
source install/setup.bash

Launch

ros2 launch mobile_sensor mobile_sensors.launch.py

Console prints the HTTPS URL (e.g. https://<host_ip>:4000).

Connect Device

  1. Open the printed URL in mobile browser (allow self‑signed cert).
  2. Grant permissions: camera, microphone, location, motion sensors.
  3. Select sensors and start streaming.

Usual Commands

Publish TTS text:

ros2 topic pub -1 /mobile_sensor/tts std_msgs/msg/String "{data: 'Hello from ROS'}"

Monitor:

ros2 topic hz /camera/image_raw/compressed
ros2 topic echo /mobile_sensor/imu
ros2 topic echo /mobile_sensor/gps

View camera:

ros2 run rqt_image_view rqt_image_view

Troubleshooting

Mobile Browser Shows ERR_EMPTY_RESPONSE

If the UI loads fine on your laptop but your mobile browser shows ERR_EMPTY_RESPONSE, this is usually a network visibility or firewall issue. Try the following steps:

  1. Confirm Both Devices Are on the Same Network:
    • Ensure your phone and computer are connected to the same Wi-Fi network.
  2. Disable the Firewall Temporarily:
    • On Ubuntu, run: sudo ufw disable
    • Try accessing the server again from your phone. If it works, the firewall was blocking the connection. Re-enable it using sudo ufw enableand add a rule to allow traffic on port 4000.

Let us know if these steps help or if you’re still having issues after trying them!

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


Made with ❤️ for the Robotics Community

🌟 Star this repo • 🐛 Report Bug • 💡 Request Feature

関連プロジェクトを探す

読み込み中…