2
$\begingroup$

I'm a newbie on ROS and I'm trying to figure out how ROS works so I'm installing ROS from source.

I've found that most of ROS packages contains two kinds of codes: C++ and Python. For example, here is the architecture of src of the ROS package actionlib:

src/
├── actionlib
│   ├── action_client.py
│   ├── action_server.py
│   ├── exceptions.py
│   ├── goal_id_generator.py
│   ├── handle_tracker_deleter.py
│   ├── __init__.py
│   ├── server_goal_handle.py
│   ├── simple_action_client.py
│   ├── simple_action_server.py
│   └── status_tracker.py
├── connection_monitor.cpp
└── goal_id_generator.cpp

I'm thinking if I can remove all of python scripts and only cmake && make the c++ files to use the ROS package actionlib?

$\endgroup$
  • $\begingroup$ You can use ROS and develop your code with either c++ or python, because ROS tutorials have the equivalent of c++ and python code till intermediate level, but some package are only in python and some packages are in C++. $\endgroup$ – Benyamin Jafari Jul 3 '18 at 10:05
-1
$\begingroup$

You can program in ROS using either ROS or Python. It just depends on your preferences. Actually, it is very common to mix both languages to create some programs that run C++ and others that run Python, since they can talk to each other using only the ROS environment (topics, services, messages...).

My advice is that you do not uninstall anything that comes with the default installation unless you are sure that you are not going to use it. For instance, you may have later the problem that you install a third party code that do uses Python.

If you are a newbie to ROS, I recommend you to start learning ROS with Python until you grasp how it works. Then you can move to ROS with C++. Also I recommend you our online academy where you learn ROS in an already setup environment with simulations of robots running. You only need a web browser. Here the link: http://robotignite.academy

$\endgroup$

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.