Advice on setting up OpenCV and ROS for object detection.

asked 2020-09-24 22:34:57 -0500

ajpaezm gravatar image

Hello, I'll try to make a summary of the project I want to develop and my goal:

Purpose and setup:

I have a ToF camera that successfully works on my Ubuntu 20.04 with ROS Noetic Raspberry Pi image (provided by the manufacturer, with a pre-installed catkin workspace). I want to use this camera for object detection. I can run the nodes they tell me, which are these 2:

ROS nodes and characteristics:

With a GUI:

roslaunch espros_tof_cam635 camera.launch

Without a GUI:

rosrun espros_tof_cam635 tof_cam635_node

The GUI-less option has these 3 topics: 1) camera/image_raw1 (grayscale image through sensor_msgs) 2) camera/image_raw2 (distance image through sensor_msgs as well) 3) camera/imageHeader (header, through std_msg)

The CMakeLists.txt has these dependencies:


find_package(catkin REQUIRED COMPONENTS

## System dependencies are found with CMake's conventions
find_package(Boost REQUIRED COMPONENTS system)
find_package(OpenCV REQUIRED)

What I'm stuck at:

I'm not exactly sure if I should do 1 of these 2 options:

1) Create a new python node (the first two nodes I described are .cpp), using the materials from cv_bridge. Would that be possible? If so, do I need to add cv_bridge to my list of dependencies to the already created Catkin workspace?

2) Use any of the 3 topics described by the second node and stream that using OpenCV. Is that something possible? How? Can you point out to a tutorial I can follow on this topic that you would suggest?

Sorry for so many questions but I'm a bit lost here. Thanks in advance!

edit retag flag offensive close merge delete