Skip to content

droneslab/NH

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NightHawk : Active Illumination Control [ISER 25']

This is a work in progress. The code is not yet ready for use.

NightHawk

Features

  • 🎯 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

Directory Structure

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

Installation

Prerequisites

  • ROS2 (Humble Recommended)
  • Python 3.8+
  • Teensyduino (for Teensy microcontroller)
  • FLIR camera SDK (if applicable)

Install Dependencies

If using Python:

Coming soong!

If using ROS:

source /opt/ros/humble/setup.bash
colcon build --symlink-install
source install/setup.bash

Hardware Integration

  • 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.


Usage

Launch NightHawk

ros2 launch nighthawk_ros nighthawk_ros_launch.py

Run Individual Nodes

ros2 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

License

MIT License


Contact

For inquiries or collaborations, please reach out to:
[Yash Turkar] – [yashturk@buffalo.edu]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published