Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are both of C++ and Python necessary in ROS

Tags:

c++

python

ros

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?

like image 839
Yves Avatar asked Jan 19 '26 14:01

Yves


1 Answers

It depends on your use case. You can choose Python or C++.

In your case, actionlib: if you are not coding in Python, you don't need it. But in general, it's better to have both, because in several code examples, I've seen both Python and C++ being used, and you will not be able to run those.

like image 111
Mohammad Ali Avatar answered Jan 21 '26 04:01

Mohammad Ali



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!