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

I have translated a design doc to Chinese , Can I pull a request for it #10

Closed
westeast opened this issue Aug 9, 2017 · 5 comments
Closed

Comments

@westeast
Copy link
Contributor

westeast commented Aug 9, 2017

https://github.com/ApolloAuto/apollo-platform/blob/master/ros/docs/design/shm_transport.md

how about I put it in '/apollo-platform/blob/master/ros/docs/design/shm_transport_cn.md' ?

设计文档: 基于共享内存的ROS消息高效通信机制

问题定义

Ros支持Node和Nodelet两种节点组织方式。对于 node节点, pub/sub服务是基于 socket通信的,因为每一个结点都是一个独立的进程。对于nodelet结点,pub/sub服务是基于共享内存的,不同的 nodelet是在同一进程内的不同的线程。

在自动驾驶领域,用 ROS的原生设计,我们遇到了如下的一系列问题:

  • 对于node类型节点,每一个pub/sub 都会在应用节点和内核结点之间来回copy同一个消息。而且当多个订阅者订阅同一个topic时,消息copy的数量就线性增长,这就导致资源利用和性能问题。
  • 对于线程模式的nodelet来说,虽然他们有更好的基于共享内存的通信机制,但各节点的独立性比 node差。

新特性描述

因此我们提出了共享内存的 ROS消息传递层, 这种方式可以降低node节点间的消息通信延迟和内存占用. 基于次我们支持下面的特性 :

  • 基于共享内存和socket的消息传递共存机制,而且发步器会根据当前的通信节点部署环境而选择正确的通信机制。
  • 基于共享内存的消息通信机制是默认的通信机制,如果条件满足的话会优先使用。

如何使用

查看 Example talker and listener来了解如何使用此特性。

FAQ

  1. 此特性对应用层透明吗?
    A: 是的,应用层使用方法各原生ros一样.

  2. 如果两个结点在不同的机器上会怎么?
    A: ROS会根据部署环境自动选择使用哪种消息通信机制。如果两个节点在不同的机器上,会自动选择基于socket的消息通信机制。

  3. 使用nodelet的会怎么样?
    A: Nodelet已经是在传递指针了, 它和这个特性是兼容的。

  4. Python节点是否支持?
    A: Python节点暂时还不支持这个特性. Python在节点间消息通信的时候仍然使用socket.

  5. 如何关闭基于内存的消息通信机制?
    A: 查看如下配置文件 config file. 也可以找到"etc/ros/transport_mode.yaml"这个路径来查看配置文件。

@westeast westeast changed the title have translate a design doc to Chinese , Can I pull a request for it I have translated a design doc to Chinese , Can I pull a request for it Aug 9, 2017
@bjtulynn
Copy link
Contributor

bjtulynn commented Aug 11, 2017

Would you please leave your mail address (or is it "f8cncn@gmail.com")? I will send the original drafted description in Chinese, maybe it will help you optimize the document to make it more reasonable, thank you!

@westeast
Copy link
Contributor Author

510578774@qq.com @bjtulynn (=;;;

@bjtulynn
Copy link
Contributor

Have send email to you, @westeast, thank you!

@quning18
Copy link
Contributor

quning18 commented Aug 17, 2017 via email

@quning18
Copy link
Contributor

Closed for inactive questions.

Please reopen it if you have any further questions. Thanks!

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

3 participants