-
Notifications
You must be signed in to change notification settings - Fork 97
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
[PR1040] Azure Kinect で AprilTag を使おうとすると synchronize されていないというエラーが出て使用できない。 #1891
Comments
From posts below
This will happens when
And our Kinect azure runs on c3 which is different from c1. This issue may be caused from this reason. Below is subscribed rate for message and camera info from C1 applications@pr1040:~$ rostopic hz /k4a/rgb/camera_info
subscribed to [/k4a/rgb/camera_info]
no new messages
average rate: 29.960
min: 0.029s max: 0.039s std dev: 0.00255s window: 21
average rate: 29.969
min: 0.028s max: 0.039s std dev: 0.00249s window: 51
^Caverage rate: 30.035
min: 0.028s max: 0.039s std dev: 0.00243s window: 80
applications@pr1040:~$ rostopic hz /k4a/rgb/image_rect_color
subscribed to [/k4a/rgb/image_rect_color]
no new messages
no new messages
no new messages
average rate: 4.371
min: 0.229s max: 0.229s std dev: 0.00000s window: 2
average rate: 2.600
min: 0.221s max: 0.668s std dev: 0.18206s window: 5
average rate: 2.247
min: 0.221s max: 0.687s std dev: 0.20284s window: 6
^Caverage rate: 2.407
min: 0.215s max: 0.687s std dev: 0.17736s window: 9
|
解決方策案
|
CameraSubscriberのqueue_size = TimeSynchronizerのqueue_sizeのデフォルトが1なのが問題かも |
this is interesting, did you increase queue_size ?
https://github.com/AprilRobotics/apriltag_ros/blob/94b3b843324f6b64edc6ca59f9729e9021308406/apriltag_ros/src/continuous_detector.cpp#L55
( or other code)
--
◉ Kei Okada
2023年11月27日(月) 18:43 Koki Shinjo ***@***.***>:
… 解決方策案
1. c3でapriltag走らせる => 試した。同様のエラーが発生
2. rawではなくcompressedで ( AprilRobotics/apriltag_ros#108
<AprilRobotics/apriltag_ros#108> ) =>
C1で試したが同様のエラーが発生
3. throttled する
—
Reply to this email directly, view it on GitHub
<#1891 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADYNXGYVATHIE54BFTTJKTYGROCPAVCNFSM6AAAAAA73WVXI6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRXGQ4DAOJUGU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
(Pythonですが) TimeSynchronizerのqueue_sizeを変えるとsubscribeされるかどうかが変わりました。 #!/usr/bin/env python
import rospy
import argparse
import message_filters
from sensor_msgs.msg import Image, CameraInfo
def callback(image, camera_info):
print("=====================")
print(f"image.header: {image.header}")
print(f"camera_info.header: {camera_info.header}")
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("queue_size", type=int)
args = parser.parse_args()
rospy.init_node("test_synchronization")
image_sub = message_filters.Subscriber('/k4a/rgb/image_rect_color', Image)
info_sub = message_filters.Subscriber('/k4a/rgb/camera_info', CameraInfo)
ts = message_filters.TimeSynchronizer([image_sub, info_sub], args.queue_size)
ts.registerCallback(callback)
rospy.spin() queue_size=1 applications@pr1040:~/shinjo_ws/src/test_apriltag_ros$ python test_synchronization.py 1
<何も出力なし> queue_size=30 pplications@pr1040:~/shinjo_ws/src/test_apriltag_ros$ python test_synchronization.py 30
=====================
image.header: seq: 4929
stamp:
secs: 1701079093
nsecs: 439512209
frame_id: "rgb_camera_link"
camera_info.header: seq: 57731
stamp:
secs: 1701079093
nsecs: 439512209
frame_id: "rgb_camera_link"
=====================
image.header: seq: 4932
stamp:
secs: 1701079093
nsecs: 639967217
frame_id: "rgb_camera_link"
camera_info.header: seq: 57737
stamp:
secs: 1701079093
nsecs: 639967217
frame_id: "rgb_camera_link"
=====================
image.header: seq: 4939
stamp:
secs: 1701079094
nsecs: 172930532
frame_id: "rgb_camera_link"
camera_info.header: seq: 57753
stamp:
secs: 1701079094
nsecs: 172930532
frame_id: "rgb_camera_link" |
compressed + queue_size=300 設定でもエラーが出る。反映されているか不明 # Other parameters
publish_tf: true # default: false
transport_hint: "compressed"
queue_size: 300 NODES
/
apriltag_pose_detector (apriltag_ros/apriltag_ros_continuous_node)
ROS_MASTER_URI=http://pr1040:11311
process[apriltag_pose_detector-1]: started with pid [116216]
[ WARN] [1701079394.532434332] [/apriltag_pose_detector:ros.apriltag_ros]: No tag bundles specified
[ WARN] [1701079394.532691752] [/apriltag_pose_detector:ros.apriltag_ros]: remove_duplicates parameter not provided. Defaulting to true
[ WARN] [1701079404.649039892] [/apriltag_pose_detector:ros.image_transport.sync]: [image_transport] Topics '/k4a/rgb/image_rect_color/compressed' and '/k4a/rgb/camera_info' do not appear to be synchronized. In the last 10s:
Image messages received: 59
CameraInfo messages received: 212
Synchronized pairs: 0
[ WARN] [1701079414.660945642] [/apriltag_pose_detector:ros.image_transport.sync]: [image_transport] Topics '/k4a/rgb/image_rect_color/compressed' and '/k4a/rgb/camera_info' do not appear to be synchronized. In the last 10s:
Image messages received: 114
CameraInfo messages received: 296
Synchronized pairs: 0
[ WARN] [1701079424.648984749] [/apriltag_pose_detector:ros.image_transport.sync]: [image_transport] Topics '/k4a/rgb/image_rect_color/compressed' and '/k4a/rgb/camera_info' do not appear to be synchronized. In the last 10s:
Image messages received: 118
CameraInfo messages received: 298
Synchronized pairs: 0 |
queue_size オプション ( AprilRobotics/apriltag_ros@e4ad5f9 ) は 3.2.1 のリリースには含まれていないためのようです。 |
compressed + queue_size=300 設定 + master (> 3.2.1) でsynchronized_pairs > 0 と /tag_detections へのpublishを確認 applications@pr1040:~/shinjo_ws/src$ roslaunch test_apriltag_ros april_detection.launch
... logging to /home/applications/.ros/log/20231127-163840_fc1c78e0-8cf7-11ee-88e0-950136cc82ed/roslaunch-pr1040-120936.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
WARNING: disk usage in log directory [/home/applications/.ros/log] is over 1GB.
It's recommended that you use the 'rosclean' command.
started roslaunch server http://pr1040:37407/
SUMMARY
========
PARAMETERS
* /apriltag_pose_detector/max_hamming_dist: 2
* /apriltag_pose_detector/publish_tf: True
* /apriltag_pose_detector/queue_size: 300
* /apriltag_pose_detector/standalone_tags: [{'id': 0, 'size'...
* /apriltag_pose_detector/tag_blur: 0.0
* /apriltag_pose_detector/tag_debug: 0
* /apriltag_pose_detector/tag_decimate: 1.0
* /apriltag_pose_detector/tag_family: tagStandard41h12
* /apriltag_pose_detector/tag_refine_edges: 1
* /apriltag_pose_detector/tag_threads: 2
* /apriltag_pose_detector/transport_hint: compressed
* /rosdistro: noetic
* /rosversion: 1.15.15
NODES
/
apriltag_pose_detector (apriltag_ros/apriltag_ros_continuous_node)
ROS_MASTER_URI=http://pr1040:11311
process[apriltag_pose_detector-1]: started with pid [120956]
[ WARN] [1701079712.153282424] [/apriltag_pose_detector:ros.apriltag_ros]: No tag bundles specified
[ WARN] [1701079712.153539258] [/apriltag_pose_detector:ros.apriltag_ros]: remove_duplicates parameter not provided. Defaulting to true
[ WARN] [1701079725.989215532] [/apriltag_pose_detector:ros.image_transport.sync]: [image_transport] Topics '/k4a/rgb/image_rect_color/compressed' and '/k4a/rgb/camera_info' do not appear to be synchronized. In the last 10s:
Image messages received: 68
CameraInfo messages received: 216
Synchronized pairs: 68
[ WARN] [1701079755.582701613] [/apriltag_pose_detector:ros.image_transport.sync]: [image_transport] Topics '/k4a/rgb/image_rect_color/compressed' and '/k4a/rgb/camera_info' do not appear to be synchronized. In the last 10s:
Image messages received: 124
CameraInfo messages received: 297
Synchronized pairs: 91 |
@HiroIshida
で解決するはずです。 起きていた現象のまとめですが、 apriltag_ros が画像とCameraInfoの取得(サブスクライブ)に使用している、 |
今回はsubscribeする側でどうにかしていましたが、一般的にはpublishする側のthrottleを落としてあげた方が扱いやすそう。synchonizationを保ったまま throttle する方法はある? |
https://github.com/jsk-ros-pkg/jsk_common/blob/master/jsk_topic_tools/src/synchronized_throttle_nodelet.cpp |
PR1040のAzure KinectでAprilTagを使用しようとすると、以下のようなエラーが表示されて使用できなくなります
CC: @HiroIshida
エラー
Full log
実行環境
launch
settings.yaml
tags.yaml
インストールされているapriltag-rosのバージョン
インストールされているimage_transportのバージョン
The text was updated successfully, but these errors were encountered: