GithubHelp home page GithubHelp logo

husarion / heat-follower-robot Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 1.0 11.7 MB

ROSbot is following the warmest object using a rotating thermal camera

License: Apache License 2.0

Dockerfile 0.89% Python 17.31% Shell 0.17% C 5.48% C++ 76.15%
lidar microros ros2 thermal-camera

heat-follower-robot's Introduction

Heat Follower

3d model

Description

Heat Follower is a project based on the ROSbot Pro platform, that follows heat by using a 360 degree thermal camera. It utilizes a MLX90641 sensor which is a 16x12 pixels IR sensor array. With some custom hardware it is possible to rotate this sensor and get a surround infrared image.

Hardware

Hardware used in this project:

Software

Thermal Camera

Software for Thermal Camera is written in PlatformIO IDE to ensure compatibility with multiple platforms. MLX90641 API is used to ensure proper communication with the IR Sensor. It is slightly modified to support STM32's hardware. Micro-ROS libraries are mandatory to communicate with ROSbot.

ROS2 Python Node

A simple Python node was written to process the input thermal image with OpenCV and steer the robot. When a heat source is detected, this node sends rotational and linear velocities via /cmd_vel topic.

ROS Description

Topic Node Name Description
/thermal_image /thermal_camera Raw thermal image represented with grayscale image (temperature = pixel intensity/100).
/tc_image_devel /thermal_subscriber Normalized image with target object contours.
/tc_goal_angle /thermal_subscriber Arrow marker pointing at the target angle relative to the robot.

Additionally there are 3 parameters

Parameter Node Name Type Description
target_min_temp /thermal_subscriber int Minimum temperature of object
target_max_temp /thermal_subscriber int Maximum temperature of object
go_to_hottest_piont /thermal_subscriber bool If true, robot follows the hottest object. If false, robot follows object within target_min_temp and target_max_temp.

System schematic diagram:

diagram

The camera sends the main topic /thermal_image - a raw unprocessed image which is then transformed by /thermal_subscriber node. The transformed image published on /tc_image_devel containes a normalized image with a contour of an object selected by the algorithm. The angle of a selected object can also be visualized with /tc_goal_angle marker that publishes an arrow pointing from base_link to the direction of the object.

Building the project

Flashing MCU

Open the project with Visual Studio Code with PlatformIO plugin.

This project is optimized for STM32F4 MCU's - keep that in mind when flashing on your hardware!

After installing the PlatformIO extension to your VSCode, click its icon on the Activity Bar then from Project Tasks select General and Upload.

Running on ROSbot

Clone robot folder to your ROSbot, connect the Thermal Camera via USB and run

cd robot/
docker-compose -f docker-compose.yaml up

After downloading all the necessary docker images ROSbot should follow warm objects nearby.

Due to issues connected with micro-ros agent, user must unplug and plug the Thermal Camera to reset the connection before running the docker compose.

Running Rviz on PC

Clone pc folder to your PC and run:

cd pc/
xhost local:root
docker-compose -f compose.pc.yaml up

Rviz should now pop up showing ROSbots surroundings in deep infrared.

rviz

If images are not visible click Add -> By topic -> /thermal_image

Here's ROSbot facing a kettle:

rb kettle

rviz kettle

heat-follower-robot's People

Contributors

dominikn avatar hpienko avatar pawelirh avatar

Watchers

 avatar  avatar  avatar

Forkers

zbudujeroboty

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.