Ask Your Question

Custom (Real) Vehicle interface advice Python vs C++

asked 2020-07-22 18:05:53 -0600

JoloGermanAg gravatar image

Hey guys,

I wrote a custom node that subscribes to the accel, brake and steer commands outputted by autoware and routes it to a custom PCB (via USB) that we designed which has manual and remote emergency stops and converts the digital signals to analog signals for the installed drive by wire system (old aevit system). Most code in autoware is written in C++ but i used python as it was just easier for me to do.


Is there any real benefit by using C++ in this case? I am aware it may be better with time sensitive data but since linux is already not a real-time system does it matter?


edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2020-07-23 13:05:44 -0600

C++ is faster, certifiable (if you follow certification rules), and allows you to control memory allocations. Python is not suitable for a safety critical application that most robot / AV systems fall under, and without additional profiling could crash from a typo at runtime. If you’re working only in simulation you can do anything you’d like, but if it touches hardware, I highly recommend rewriting in C++

edit flag offensive delete link more


Thanks, that certainly makes sense. Since this is on a real vehicle I will switch to C++, probably will just use python for some initial debugging with the vehicle on jack stands since it's already up and running. Are there any resources that outline proper code procedure/flow for interface nodes in ROS/C++ ?

JoloGermanAg gravatar image JoloGermanAg  ( 2020-07-23 13:46:57 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-07-22 18:05:53 -0600

Seen: 86 times

Last updated: Jul 23 '20