ROBOTIS-JAPAN-GIT / turtlebot3_slam_3d

Turtlebot3 3D-SLAM demo using RTAB-Map with Jetson TX2 and ZED Mini
170 stars 62 forks source link

I can’t publish the 3D coordinate of the detected objects using intel cameras #18

Open Yousef19986 opened 1 year ago

Yousef19986 commented 1 year ago

I’m trying to use intel realsense depth camera (d435) and a tracking camera (T265) in this project to detect objects and localize them in real-time along with Rtab mapping. I made my own launch file to run the cameras and the detection with darknet-ros then I added the part of publishing the TF of the detected object I took it from your launch file but it seems that does not work for me.

Screenshot from 2023-03-10 17-30-27

Screenshot from 2023-03-10 16-01-50

I tried to check the topic /cluster_decomposer/centroid_pose_array

But what I get is : `subscribed to [/cluster_decomposer/centroid_pose_array]

no new messages no new messages no new messages `

Knowing that I use my laptop to run this : CUDA 11.2 Ubuntu 20.4 Ros Noetic

Screenshot from 2023-03-10 16-10-35

Affonso-Gui commented 1 year ago

Hello,

Can you receive messages from darknet_ros/label_image and darknet_ros/cluster_points? If so, what is the frequency (Hertz) of each?

Yousef19986 commented 1 year ago

Hi, when I try the command rostopic hz on both topics this is what I get:

`yousef@yousef:~$ rostopic hz /darknet_ros/label_image

subscribed to [/darknet_ros/label_image] no new messages no new messages no new messages ^Cno new messages yousef@yousef:~$ rostopic hz /darknet_ros/cluster_points

subscribed to [/darknet_ros/cluster_points]

no new messages no new messages no new messages no new messages ^Cno new messages yousef@yousef:~$ `

btw this is while detecting an object, It is detecting but I don't know why it is not giving any massages

And this is the portion of my launch file that is in charge of localization and darknet-Ros detection for your reference.

Screenshot from 2023-03-10 20-51-29

Affonso-Gui commented 1 year ago

I am not sure which one (if any) is directly related to your problem, but I can notice the two following differences between your usage and our examples:

  1. The config file (ros_config).

    <!-- DETECTION -->
    <arg name="darknet_config"        default="$(find turtlebot3_slam_3d)/config/darknet_config.yaml"/>
    <param name="/darknet_ros/subscribers/camera_reading/topic"      value="$(arg input_image)"/>
    <param name="/darknet_ros/subscribers/camera_reading/queue_size" value="1"/>
    <include file="$(find darknet_ros)/launch/darknet_ros.launch">
    <arg name="ros_config" value="$(arg darknet_config)"/>
    </include>
  2. When I was developing this I had to make a few changes in both the darknet_ros and realsense repositories. The rosinstall file and the README instructions should give more info on how to set them up, or you can take a look on the diff and judge how to (if needed) apply the changes to your current branch. https://github.com/Affonso-Gui/darknet_ros https://github.com/Affonso-Gui/realsense/tree/without_tf_publish

Just in case, have you also made sure the input image topic is being received?

Yousef19986 commented 1 year ago

Hi, I installed the branch of Darknet-Ros you provided and edited my launch file at the detection part to be like yours but I noticed that when I add the argument <arg name="ros_config" value="$(arg darknet_config)"/>

and this is what i get

`[ WARN] [1678508212.271478819]: '/cluster_decomposer' subscribes topics only with child subscribers.

[ WARN] [1678508212.303791902]: '/label_mask' subscribes topics only with child subscribers.

Waiting for image. Waiting for image. Waiting for image. Waiting for image. `

Screenshot from 2023-03-11 12-27-12

as you can see darknet node refuses to connect to the topic /d400/color/image_raw as I even edited the ros.yaml file to connect to this topic as usual to receive the image data but when I remove that line it becomes working normally like before but still facing the same tf issue.