ros-sports/rqt_image_overlay

Can't see overlay with visualization_msgs::msg::Marker type

Closed this issue · 1 comments

I created a MarkerLayer and PointLayer following your example.
Inside overlay function, I am using the same draw painter as below.
(just draw some fix point in the image)
However, I can only see circle from PointLayer but nothing from MarkerLayer.
I didn't receive any log message from rqt_image_overlay either.

  painter.translate(350, 550);

  painter.save();
  QPen pen = painter.pen();
  pen.setCapStyle(Qt::RoundCap);
  pen.setWidth(20);
  painter.setPen(pen);
  painter.drawPoint(0, 0);
  painter.restore();
  painter.translate(-30, -20);
  QString str = "(%1, %2)";
  painter.drawText(0, 0, str.arg(350).arg(550));

The screen shows Marker type is subscribed as well as Point type.
Please help me!

Screenshot from 2023-09-15 14-07-18

ijnek commented

Hi @Keming-Ding,

I believe the point you are drawing (350, 550) is exceeding the height of the image. Could you try something like (350, 250)?