Extraction of MessageQueue full via variable Bug in msg getting duplicated.
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- networking, robotics
Hướng nghiên cứu
Start with ROSConnection and the outgoingQueue loop that calls OutgoingMessageSender.SendInternal, then reproduce the message drops and duplication described under Docker and Linux. Trace the Normal and QueueFullWarning states and compare the observed behavior with the reported queue-full flag workaround. Done means the queue condition and delivery behavior are understood and the issue's loss or duplication is resolved without requiring the workaround.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
Right now it seems that when messages are too large at some point messages get dropped however only a Debug msg ("Queue full! Messages are getting dropped!) gets displayed.
Additionally it seems that message get published then sometimes multiple times instead of just once even so the publish function was not called multiple times
This is a kinda critical bug as it will effect algorithms working with the data
Having a flag which can be check to then pause simulation/ publishing untill all message got delivered would be helpfulable.
I implemented that feature as show below.
I additionally have a subscriber on the rosside now to check that all message got delivered, then publishes a msg which gets received on unity side and only then let simulation continue,
as otherwise i always lost data at some point.
This issue seems to happen when i use it with a docker as the ros side, however under linux the issue of duplicating message also presist but i didnt observe message drops.
Describe the solution you'd like
I implement that feature in the following way i added to ROSConnection
[SerializeField]
static bool m_queuefull=false;
public bool queuefull { get => m_queuefull; set => m_queuefull = value; }
public bool Queue(){
return queuefull;
}
furthermore at the line
int count=0;
while (outgoingQueue.TryDequeue(out OutgoingMessageSender sendsOutgoingMessages))
{
OutgoingMessageSender.SendToState sendToState = sendsOutgoingMessages.SendInternal(messageSerializer, networkStream);
switch (sendToState)
{
case OutgoingMessageSender.SendToState.Normal:
//This is normal operation.
count=count+1;
//this must always be +1 one than your queue size otherwise the stuff gets stuck
//queue size should always be at least 1 larger than the amount of message you have in one go.
if(count >=4){
ROSConnection.m_queuefull=true;
}
Debug.Log("called"+count);
break;
case OutgoingMessageSender.SendToState.QueueFullWarning:
//Unable to send messages to ROS as fast as we're generating them.
//This could be caused by a TCP connection that is too slow.
Debug.LogWarning($"Queue full! Messages are getting dropped! " +
"Try check your connection speed is fast enough to handle the traffic."+count);
ROSConnection.m_queuefull=true;
break;
case OutgoingMessageSender.SendToState.NoMessageToSendError:
//This indicates
Debug.LogError(
"Logic Error! A 'SendsOutgoingMessages' was queued but did not have any messages to send.");
break;
}
token.ThrowIfCancellationRequested();
waitingSinceRealTime = s_RealTimeSinceStartup;
}
ROSConnection.m_queuefull=false;
By this we can read out if the msg queue is full in any program for example via:
ros = ROSConnection.GetOrCreateInstance();
bool rosqueuefull =ros.Queue();
Describe alternatives you've considered
Additional context
Add any other context or screenshots about the feature request here.
- Ngôn ngữ chính
- C#
- Star
- 2.6k
- Fork
- 473
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Unity-Technologies/Unity-Robotics-Hub
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
-
ROS2,ActionĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
-
Is the project deprecated?Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 20/100
-
Force/Torque sensorĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Unity-Technologies/Unity-Robotics-Hub#433 · 1 bình luận ·
Tất cả issue của Unity-Technologies/Unity-Robotics-Hub
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
umbraco/Umbraco.Automate#612 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
崩溃日志只按 CRLF 分行Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
PCL-Community/PCL-CE#3872 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
type:task ux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
elsa-workflows/elsa-foundation#5253 ·
Maintainer thường phản hồi trong vòng 1 ngày