Ask Your Question
0

Turtlebot3 blob recognition [closed]

asked 2019-11-13 08:33:50 -0600

oovidiustr gravatar image

Hello everyone! Is something here who knows a site where can I learn about blob recognition for turtlebot3? Or for robots which uses Compressed images data type? I search on internet but I couldn't find any.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by oovidiustr
close date 2019-11-19 03:03:37.531877

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-11-14 08:22:46 -0600

Choco93 gravatar image

You first need to decompress your image, you can do so by adding following to your launch file

<node name="republish" type="republish" pkg="image_transport" output="screen" args="compressed in:=/compressed_image out:=/raw_image" />

Here is one post I found for blob detection using opencv for both python and c++. You will also need cv_bridge to convert your subscribed raw_image to opencv format.

edit flag offensive delete link more

Comments

Hi! Thanks for reply! Do you have some example of code in python of how to decompress the image? I am really noob at this point so I need something concrete. Thanks!

oovidiustr gravatar imageoovidiustr ( 2019-11-15 02:42:46 -0600 )edit

you don't need code, you just add this node to your launch file and it will decompress images for you

Choco93 gravatar imageChoco93 ( 2019-11-18 02:00:15 -0600 )edit

Ok... but in my main program I will use "Compressed" msg type or "Image" ?

oovidiustr gravatar imageoovidiustr ( 2019-11-19 02:21:36 -0600 )edit

I will explain it once more. Adding this node to your launch file (with correct topic) will decompress your compressed images. Then you need to subscribe to decompressed image topic of type sensor_msgs/Image. Now your goal is work with on image using opencv but the image you subscribed to is ros_image. So you use cv_bridge to convert it to opencv format and then you can use blob detection on it.

Choco93 gravatar imageChoco93 ( 2019-11-19 02:42:46 -0600 )edit

Thank you!! Now I understand :D

oovidiustr gravatar imageoovidiustr ( 2019-11-19 03:02:45 -0600 )edit

How can I see if there is something publishing? I tried to echo the /raw_image topic but nothing comes out.

oovidiustr gravatar imageoovidiustr ( 2019-11-19 04:18:46 -0600 )edit

rosnode list to list all the nodes, rosnode info /node_name to see info of a node. In info you can see all the topics that are subscribed and are being published by node, also services

Choco93 gravatar imageChoco93 ( 2019-11-19 05:31:19 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-11-13 08:33:50 -0600

Seen: 19 times

Last updated: Nov 14 '19