ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Phyton vs c++

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

Hamid Didari 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 -0500

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 Didari gravatar image Hamid Didari  ( 2014-04-27 18:51:30 -0500 )edit

+1 Excellent summary.

SR gravatar image SR  ( 2014-07-24 14:01:43 -0500 )edit
0

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

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 Didari gravatar image Hamid Didari  ( 2014-04-27 18:51:26 -0500 )edit
1

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

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 Didari gravatar image Hamid Didari  ( 2014-04-27 18:51:36 -0500 )edit

Question Tools

1 follower

Stats

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

Seen: 727 times

Last updated: Apr 26 '14