Ask Your Question
0

Phyton vs c++

asked 2014-04-26 19:57:09 -0600

hamid gravatar image

Hi guys

which language is better for using in ros for programming in slam or navigation or ...

Thanks Hamid

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
5

answered 2014-04-26 23:35:29 -0600

This is a very broad question and for a general discussion you'll probably find thousands of discussions (and flamewars :) ) on the internet. As a rule of thumb, if one is proficient in both languages, Python allows to get things done faster, while a implementation in C++ likely takes longer to implement but might be faster during runtime. In practice, this rule of thumb can also turn out to be very wrong for numerous reasons (availability of fast library implementations, implementation errors etc.).

The vast majority of SLAM and navigation code for ROS is implemented in C++ currently, so most implementers apparently felt that this was the better choice.

IMHO, the pragmatic answer looking at a short to medium time frame is that you should use what you know to use best. A expert Python programmer but C++ novice will have a hard time using C++ and vice versa. Still, I'd recommend learning both languages over time, as they have complimentary strength and weaknesses.

edit flag offensive delete link more

Comments

Thanks :)

hamid gravatar imagehamid ( 2014-04-27 18:51:30 -0600 )edit

+1 Excellent summary.

SR gravatar imageSR ( 2014-07-24 14:01:43 -0600 )edit
1

answered 2014-04-26 21:16:34 -0600

adreno gravatar image

C++ also has better support in terms of the tutorials posted on ROS wiki

edit flag offensive delete link more

Comments

Thanks :)

hamid gravatar imagehamid ( 2014-04-27 18:51:36 -0600 )edit
0

answered 2014-04-26 20:48:03 -0600

sai gravatar image

C++ it is. Not just for ROS, but if you want to use other librairies, then C++ becomes handy.

edit flag offensive delete link more

Comments

Thanks :)

hamid gravatar imagehamid ( 2014-04-27 18:51:26 -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

Stats

Asked: 2014-04-26 19:57:09 -0600

Seen: 505 times

Last updated: Apr 26 '14