Show markers in rviz above laserscan

asked 2020-04-02 12:58:26 -0500

cheesee61 gravatar image

Hello guys,

I have a task and don't know if I am on the right track, here is first of all my setup/preparation:

I am using the Intel Realsense D435 depth camera and get aligned (i.e. same coordinate system for both lenses) RGB and depth data. I converted the depth image with the depthimage_to_laserscan package to a laser scan (and can display it in rviz, everything fine). Furthermore, I run the dnn_detect package for object detection and can read/extract the bounding boxes from the RGB image.

What I want to do is:

In rviz, display markers above my laserscan which corresponds to the detected objects.

Simple example:

I detected a person in pixels x (100-300) and a cat in pixels x (400-500) in my RGB image. Above every laserscan ray (lets say 2 meters above) which has the x coordinate 100-300, I wanna place green markers (for person), above every laserscan ray which has the x coordinate 400-500, I wanna place blue markers (for cat). In that case, I can visualize the distances through the laserscan and somehow display the detected objects through the colored markers above the scan.

But I stuck at the implementation. Should I write a single node, where I subscribe to the laserscan topic (to get the coordinates of the rays) and to the dnn_objects topic (to get the x coordinates of the detected objects) and publish a MarkerArray message? Or should I separate all and write 3 single nodes? If the former, how can I guarantee the correct timing? Or is it maybe way easier than I think to accomplish my problem?

I would be thankful for every advice.

Ubuntu 16.04 LTS with ROS kinetic and rospy

edit retag flag offensive close merge delete

Comments

No one can help me?

cheesee61 gravatar image cheesee61  ( 2020-04-08 05:10:09 -0500 )edit