VedantC2307/ros2-mobile-sensor-bridge
소개
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.
디자인 및 미디어What you can do
- 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)
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalMobile Sensor Bridge for ROS2 v2.0 🚀
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
- Open the printed URL in mobile browser (allow self‑signed cert).
- Grant permissions: camera, microphone, location, motion sensors.
- 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:
- Confirm Both Devices Are on the Same Network:
- Ensure your phone and computer are connected to the same Wi-Fi network.
- 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.
- On Ubuntu, run:
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
관련 프로젝트 살펴보기
불러오는 중…