This is a work in progress. The code is not yet ready for use.
- π― Bayesian Optimization for camera exposure and lighting control
- π Feature-based utility metric to evaluate image utility
- π€ ROS2 Integration
- π§ Event-triggered recursive optimization pipeline
- π§ͺ Field-tested on a legged robot in culvert environments
NH/
βββ camera_control/ # Camera hardware drivers
β βββ auto_shutter.py
β βββ flir_control.py
β
βββ light_control/ # Illumination control logic
β βββ light_meter.py
β
βββ teensy_meter_driver/ # Firmware for Teensy-based light meter
β βββ teensy_meter_driver.ino
β
βββ nighthawk_ros/ # Main ROS package
β βββ config/
β β βββ params.yml
β βββ launch/
β β βββ nighthawk_ros_launch.py
β βββ nighthawk_ros/
β β βββ __init__.py
β β βββ image_writer.py
β β βββ light_control_ros.py
β β βββ nighthawk_ros.py
β β βββ nighthawk_score_node.py
β β βββ score.py
β βββ resource/
β βββ nighthawk_ros
β
βββ utils/ # Frontend/processing utilities
β βββ exposure-scaler.ts
β βββ state-process.ts
β βββ NightHawk.json
β
βββ setup.py, setup.cfg # Python package configuration
βββ package.xml # ROS package metadata
βββ .gitignore
βββ README.md
- ROS2 (Humble Recommended)
- Python 3.8+
- Teensyduino (for Teensy microcontroller)
- FLIR camera SDK (if applicable)
If using Python:
Coming soong!
If using ROS:
source /opt/ros/humble/setup.bash
colcon build --symlink-install
source install/setup.bash- Camera: Controlled via
camera_control/flir_control.py - Light Meter: Teensy driver in
teensy_meter_driver.ino - Lighting System: Managed via
light_control/light_meter.py
Ensure proper connection to the robotβs onboard hardware before launching the pipeline.
ros2 launch nighthawk_ros nighthawk_ros_launch.pyros2 run nighthawk_ros shared_memory_writer # Subscribes to image and writes to shared memory
ros2 run nighthawk_ros nighthawk_score_node # Subscribes to image and publishes Mfeat score (based on R2D2)
ros2 run nighthawk_ros light_control_ros # Runs LED light control node
ros2 run nighthawk_ros nighthawk_ros # Runs main nighthawk node for active illumination control
# Optional
ros2 run foxglove_bridge foxglove_bridge --ros-args -p topic_whitelist:='["/flir_camera/image_raw", "/flir_camera/meta", "/led_driver/value", "/light_control_ros/transition_event", "/nighthawk/optimal", "/nighthawk/score", "/nighthawk/state", "/parameter_events", "/rosout"]' # Foxglove visualization
MIT License
For inquiries or collaborations, please reach out to:
[Yash Turkar] β [yashturk@buffalo.edu]
