ros core问题

ROS XMLRPC 错误解析
本文记录了一次在ROS环境中遇到的XMLRPC错误处理问题,详细描述了错误的调用堆栈,从__find_specmb到XmlRpcDispatch::work的错误流程。通过更换libxmlrpcpp.so库文件,成功解决了问题,推测可能是ROS内部bug导致。

(gdb) bt
#0  0x00007ffff4cc3fea in __find_specmb (format=0x7ffff4601140 ").") at printf-parse.h:108
#1  __parse_one_specmb (format=format@entry=0x7ffff460113e "%d).", posn=posn@entry=0, spec=spec@entry=0x7fffd498d130, max_ref_arg=max_ref_arg@entry=0x7fffd498d100) at printf-parsemb.c:403
#2  0x00007ffff4c9ffa9 in printf_positional (s=s@entry=0x7fffd498df50, format=format@entry=0x7ffff4601110 "Error in XmlRpcDispatch::work: error in poll (%d).", readonly_format=readonly_format@entry=0, ap=ap@entry=0x7fffd498e0d8, 
    ap_savep=ap_savep@entry=0x7fffd498daf8, done=done@entry=46, nspecs_done=0, lead_str_end=0x7ffff460113e "%d).", work_buffer=0x7fffd498db20 "\340\345\230\324\377\177", save_errno=22, grouping=0x0, thousands_sep=0x7ffff4dfac79 "")
    at vfprintf.c:1771
#3  0x00007ffff4ca3cba in _IO_vfprintf_internal (s=s@entry=0x7fffd498df50, format=format@entry=0x7ffff4601110 "Error in XmlRpcDispatch::work: error in poll (%d).", ap=ap@entry=0x7fffd498e0d8) at vfprintf.c:1688
#4  0x00007ffff4d79169 in ___vsnprintf_chk (s=0x7fffd498e0f0 "Error in XmlRpcDispatch::work: error in poll (cDispatch::work: error in poll (-1).", maxlen=<optimized out>, flags=1, slen=<optimized out>, 
    format=0x7ffff4601110 "Error in XmlRpcDispatch::work: error in poll (%d).", args=0x7fffd498e0d8) at vsnprintf_chk.c:63
#5  0x00007ffff45fb015 in XmlRpc::XmlRpcUtil::error(char const*, ...) () from /opt/ros/melodic/lib/libxmlrpcpp.so
#6  0x00007ffff45f5124 in XmlRpc::XmlRpcDispatch::work(double) () from /opt/ros/melodic/lib/libxmlrpcpp.so
#7  0x00007ffff76942b8 in ros::XMLRPCManager::serverThreadFunc() () from /opt/ros/melodic/lib/libroscpp.so
#8  0x00007ffff3da4bcd in ?? () from /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1
#9  0x00007ffff6f846db in start_thread (arg=0x7fffd518c700) at pthread_create.c:463
#10 0x00007ffff4d6888f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

 

实在找不到哪儿错了,每次core的地方都惊人一致,也不像的越界的问题。

最后从其他的机器上拷贝了个libxmlrpcpp.so 替换,似乎没有再出现问题了,先这样吧,估计是ros自己的bug

### ROS Core Port 11311 Usage and Configuration In the context of Robot Operating System (ROS), port number `11311` is designated for the master node, which acts as a central hub that coordinates communications between different nodes within a ROS system[^1]. The role of this port includes facilitating discovery and communication among various components such as publishers, subscribers, services, and actions. The Master Node listens on TCP port `11311`. This allows it to manage topic registrations from publishers and subscriptions by subscribers while also handling service calls. When setting up multiple robots or working across several machines with ROS, ensuring connectivity through this port becomes crucial because all nodes must communicate effectively via the same ROS master instance running on one machine[^2]. For configuring environments where firewalls might block traffic destined for specific ports like `11311`, users should configure their firewall settings appropriately so that these necessary connections can be established without interference. Additionally, when launching remote nodes connected over networks outside local area network boundaries, consider using SSH tunneling techniques to securely forward required ports back into your development environment[^3]. When troubleshooting issues related to accessing resources hosted at `localhost:11311`, verify whether another application occupies this port unintentionally; alternatively, check if any security software blocks access attempts made towards said address. ```bash netstat -an | grep LISTEN | grep :11311 ``` This command helps identify processes listening specifically on port `11311`. --related questions-- 1. How does changing the default ROS master URI affect multi-machine setups? 2. What are common methods used to secure inter-node communications in distributed robotics applications built upon ROS frameworks? 3. Can you provide examples demonstrating how to set up an SSH tunnel for forwarding ROS-related ports safely? 4. Are there alternative ways besides modifying firewall rules to allow cross-network ROS operations involving port `11311`? 5. In what scenarios would someone need more than one ROS master running simultaneously within the same project?
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值