Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

detect_3d_node.py: on_detections not being called! #27

Closed
amiryanj opened this issue Feb 23, 2024 · 4 comments
Closed

detect_3d_node.py: on_detections not being called! #27

amiryanj opened this issue Feb 23, 2024 · 4 comments

Comments

@amiryanj
Copy link

amiryanj commented Feb 23, 2024

Hello,

I am debugging the repo on my Jetson Orin (with ROS2 Foxy) and I can't get the 3d detections.
I debugged the nodes and it seems the callback on_detections() is not being called, even though the topics corresponding to all the 3 subscribers are being published (depth_image, depth_info, and detections).
What might be the reasons?

Here is the command I'm running:

ros2 launch yolov8_bringup yolov8_3d.launch.py input_image_topic:=/camera/color/image_raw input_depth_topic:=/camera/depth/image_rect_raw input_camera_info_topic:=/camera/color/camera_info input_depth_info_topic:=/camera/depth/camera_info model:=yolov8n-pose.pt threshold:=0.2

Many thanks.

@mgonzs13
Copy link
Owner

Hey @amiryanj, have you checked the QoS? By default, subscribers use best effort. You can also change them using launch params.

@amiryanj
Copy link
Author

amiryanj commented Feb 23, 2024

Hey @mgonzs13
Thanks for your quick feedback.
I am kinda new to ROS2. I just checked out the Reliability Policies, they sound to be matching.
There is only one policy that is not matched (the Durability of the publisher on /camera/depth/image_rect_raw.
Not sure if that can be the reason? and how to fix that possibly?

jetson@jetson-desktop:~$ ros2 topic info /camera/depth/image_rect_raw --verbose 
Type: sensor_msgs/msg/Image

Publisher count: 1

Node name: camera
Node namespace: /camera
Topic type: sensor_msgs/msg/Image
Endpoint type: PUBLISHER
GID: 01.0f.d9.91.6c.0d.35.52.01.00.00.00.00.00.14.03.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
  Lifespan: 2147483651294967295 nanoseconds
  Deadline: 2147483651294967295 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 2147483651294967295 nanoseconds

Subscription count: 1

Node name: detect_3d_node
Node namespace: /yolo
Topic type: sensor_msgs/msg/Image
Endpoint type: SUBSCRIPTION
GID: 01.0f.d9.91.07.2a.32.b4.01.00.00.00.00.00.14.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_VOLATILE
  Lifespan: 2147483651294967295 nanoseconds
  Deadline: 2147483651294967295 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 2147483651294967295 nanoseconds
jetson@jetson-desktop:~$ ros2 topic info /camera/depth/camera_info --verbose 
Type: sensor_msgs/msg/CameraInfo

Publisher count: 1

Node name: camera
Node namespace: /camera
Topic type: sensor_msgs/msg/CameraInfo
Endpoint type: PUBLISHER
GID: 01.0f.d9.91.6c.0d.35.52.01.00.00.00.00.00.15.03.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_VOLATILE
  Lifespan: 2147483651294967295 nanoseconds
  Deadline: 2147483651294967295 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 2147483651294967295 nanoseconds

Subscription count: 1

Node name: detect_3d_node
Node namespace: /yolo
Topic type: sensor_msgs/msg/CameraInfo
Endpoint type: SUBSCRIPTION
GID: 01.0f.d9.91.07.2a.32.b4.01.00.00.00.00.00.15.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_VOLATILE
  Lifespan: 2147483651294967295 nanoseconds
  Deadline: 2147483651294967295 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 2147483651294967295 nanoseconds

@mgonzs13
Copy link
Owner

Are you getting messages in the /yolo/detections topic? In the case of the 3D, you also have to set the target_frame to your base frame, for example, camera_link.

@mgonzs13
Copy link
Owner

Hey @amiryanj, how is this going?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants