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] – [[email protected]]
