简体   繁体   中英

Running C++ executable from python script

we are currently working on robot Pepper, more specific we are trying to prepare Pepper as welcome manager. So when robot gets input from human to go to a certain location, he should start specific dialog for that location and moving to that location. We did the navigation part in ROS and human-interaction part in Python using Python and Naoqi SDK. Now we want to run C++ exe that starts navigation in Python script. What is the simplest way to do that?

Relaying MA's answer here:

subprocess , eg subprocess.run(["your_exe", "first_arg"]) . You can also do things like capture stdout/stderr from the subprocess, check return code, wait for subprocess to complete.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM