Apollo and ROS1 message passing system
It seems to me that Apollo is using ROS1 as underlying message passing system. I also see protobufs being used but it seems that only to replace xmlrpc?
In any case ROS community has long ago figured out that ROS1 is not real-time and deterministic and can give you no guarantees. Further ROS1's pub/sub system uses no quality of service. ROS1 also uses unbounded message types and uses blocking constructs such as mutexes, etc.
I could list many, many more shortcomings but to cut the story short, ROS1 can not run on a L4/L5 autonomous car. Which means that Apollo the way it is today also can not. Do you guys have a plan for it or do you just plan to stay in the research domain as pointed out in #3707 ?
The underlying ROS for Apollo is a modified version of "standard ROS1". More info about this can be found at https://github.com/ApolloAuto/apollo-platform.
Hi @ubercool2, thank you for your question. Yes, the protobuf is supported in parallel with original ROS message, which means better backward compatibility as mentioned in our design.
Also, for DDS used by ROS 2, it is supposed to comes with QoS and real-time in design. We are also aware of the limitations that comes with the open sourced version of its implementation compared to the commercial version for that purpose. If we chode the commercial version for Apollo, we would encountered the issue of not be able to open source it in an easy way.
However, it seems that your question is not about message passing. Please allow me to elaborate more about your comment. In order to build a production ready autonomous driving vehicle, from my personal perspective, any computing framework alone is not sufficient. We have to fulfill the requirement of functional safety which has been there for many years in the automotive industry. To achieve the production-ready safety goal, the error-proof software, e.g. like ROS or any other computing framework alone is not enough. It has to be supported with a hardware and software co-design. That's also the reason we formed partnerships with OEMs and Tier1s to collaborate on this particular area.
I invite you to continue following Apollo. Something more exciting and interesting will reveal soon in the coming months. Hope that answered your question.
@quning78 to be honest I am a very confused. You say:
Yes, the protobuf is supported in parallel with original ROS message, which means better backward compatibility as mentioned in our design.
and in this document you quote that ROS1 uses xmlrpc for message passing: https://github.com/ApolloAuto/apollo/blob/f3ed3c9f1453256d8f9906d73388e9703046867b/docs/howto/how_to_understand_architecture_and_workflow.md.
ROS1 uses xmlrpc only to register participants and their topics and services in the network graph. It does not send the messages over xmlrpc. See: https://bcharrow.wordpress.com/2013/06/17/subscribing-to-a-topic-in-roscpp/.
Thanks for the pointers to https://github.com/ApolloAuto/apollo-platform/blob/master/ros/docs/design. So do you have 3 message passing systems then (ROS1, protobuf and RTPS)? How do you switch between them?
and in this document you quote that ROS1 uses xmlrpc for message passing: https://github.com/ApolloAuto/apollo/blob/f3ed3c9f1453256d8f9906d73388e9703046867b/docs/howto/how_to_understand_architecture_and_workflow.md.
Sorry about the confusion in the doc. It was written by other developer who is not from our apollo-platform team, so the wording is not exactly right. I suppose he means ROS message instead of xmlrpc. I will fix the doc soon.
Thanks for the pointers to https://github.com/ApolloAuto/apollo-platform/blob/master/ros/docs/design. So do you have 3 message passing systems then (ROS1, protobuf and RTPS)? How do you switch between them?
For message format, we support both original ROS 1 message and protobuf format message. For message transportation, we replace the socket based solution with RTPS based solution, and on top of that, we added the shared memory to make the transportation more efficient.
Hope my answers address your concerns. And please let me know if you have any other questions for this thread.
Again, thanks for your interests in Apollo! :D
thx @quning78. One more follow-up Q.
For message transportation, we replace the socket based solution with RTPS based solution
Did you replace both, http://wiki.ros.org/ROS/UDPROS and http://wiki.ros.org/ROS/TCPROS? RTPS only runs over UDP/IP as far as I know.
Did you implement your own RTPS protocol or you use e.g. https://github.com/eProsima/Fast-RTPS? Did you do any performance profiling between your RTPS replacement and http://wiki.ros.org/ROS/UDPROS?
Further, I forgot to reply to your comment:
However, it seems that your question is not about message passing. Please allow me to elaborate more about your comment. In order to build a production ready autonomous driving vehicle, from my personal perspective, any computing framework alone is not sufficient. We have to fulfill the requirement of functional safety which has been there for many years in the automotive industry. To achieve the production-ready safety goal, the error-proof software, e.g. like ROS or any other computing framework alone is not enough. It has to be supported with a hardware and software co-design.
My question was exactly about the message passing because without a real time capable message passing system you can not have an entire system that is real time. For instance, with http://wiki.ros.org/ROS/UDPROS you can not set any Quality of Service parameters. I agree that you also need the right a) HW, right b) host OS (e.g. QNX, VxWorks) but you also need a c) real-time capable message passing system, d) real-time capable framework and a e) real-time application. If ANY of them is not real-time, your entire system can not be real-time.
Since you already mention:
We have to fulfill the requirement of functional safety which has been there for many years in the automotive industry
I suppose that you are talking about ISO 26262 (subset of ISO9000) standard? I do not see any traces to this standard in Apollo.
Sorry about not getting back to you on your question. Please let us know if you are still looking for the answer.
Closed. Reopen if you still have questions.