0
$\begingroup$

Rosanswers logo

Hello,

I would like to visualize some 2d objects using lines or bounding boxes in a 2d image in RVIZ. So far I was not able to find a way. I am suspecting that this might not be supported by RVIZ. But since I only started using ROS it is also likely that I was just looking at the wrong place.

Here is what I found out so far:

  • I can visualize things in 3D using markers.
  • I can visualize an image using the display type Image.
  • I can also visualize an image using the display type camera, and I think if there is correct calibration information, the 3d markers get projected in that image.

But is there a way to directly draw something like the markers into a 2d image?


Originally posted by sietschie on ROS Answers with karma: 11 on 2018-07-26

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The easiest way to do this is to make your own node which subscribes to the image topic, draws the markers on top of the image and publishes it on a new topic. I do this for debugging vision algorithms on a regular basis.

The image transport package can be used to receive and publish openCV images, openCV's basic drawing functions are described here.


Originally posted by PeteBlackerThe3rd with karma: 9529 on 2018-07-26

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by LMerCy on 2021-11-11:
I really need this..The way draw by a node cannot solve if i have multiple boxes from different node, which will publish too much new images..Is there any way to solve as rviz plugin?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.