Skip to content
This repository has been archived by the owner on Jun 13, 2020. It is now read-only.

Latest commit

 

History

History
32 lines (25 loc) · 1 KB

README.md

File metadata and controls

32 lines (25 loc) · 1 KB

c++ ROS node wrapper for a set of hc-sr04 ultrasonic sonars.

hc-sr04

Publishes sensor_msgs::Range messages at 10Hz to /sonarN topics. Specifically populates range.

We include a node for a set of sonars, rather than a node per sonar, since we need to ensure only one sonar is measuring at a time (sonars can easily interfere with each other)

on rasp pi 2 uses ~2% cpu and <1% mem for 3 sonars (capping at a distance of 20cm)

REQUIRES running src/export_gpio_pins.sh to export pins otherwise need to run as root. (limitation of wiringPiSetupSys)

rostopic echo /sonar_0
---
header:
  seq: 525
  stamp:
    secs: 1462946345
    nsecs: 463606605
  frame_id: ''
radiation_type: 0
field_of_view: 0.0
min_range: 0.0
max_range: 20.0
range: 7.08620691299
---

TODOS

  • make hard coded pins in hc_sr04_node.cpp configurable
  • need some analysis on field_of_view