Extraction of MessageQueue full via variable Bug in msg getting duplicated.
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 领域
- networking, robotics
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- C#
- 星标
- 2.6k
- 派生
- 473
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Unity-Technologies/Unity-Robotics-Hub 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
-
ROS2,Action未关闭
难度 4/5 3-5 天 新手友好度 25/100
-
难度 1/5 1 小时以内 新手友好度 20/100
-
难度 5/5 一周以上 新手友好度 15/100
-
难度 4/5 3-5 天 新手友好度 25/100
Unity-Technologies/Unity-Robotics-Hub#433 · 1 条评论 ·
查看 Unity-Technologies/Unity-Robotics-Hub 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 3 天内回复
-
bug python
难度 1/5 1 小时以内 新手友好度 88/100
ilia-sokolov/OfficeAgent.NET#89 ·
维护者通常 13 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 82/100
juandresrodca/AdminForge#66 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
umbraco/Umbraco.Automate#612 ·
维护者通常 1 天内回复