stulp / dmpbbo

Python/C++ library for Dynamical Movement Primitives and Black-Box Optimization
GNU Lesser General Public License v2.1
224 stars 90 forks source link

About Code Running #78

Closed wangziyang123456 closed 1 year ago

wangziyang123456 commented 1 year ago

Hello. "../../bin/robotExecuteDmp results/training/dmp_trained_10_for_cpp.json tmp_cost_vars.txt" I cannot execute the instructions in C++. The environment has been configured for a long time. The json in C++has no j.get() function. Is there a corresponding python execution code? Thank you~

stulp commented 1 year ago

In the below, I will assume you are using v2.0 of dmpbbo.

I cannot execute the instructions in C++.

Have you compiled and installed the binaries?

The environment has been configured for a long time.

Sorry, I do not understand what that means. If it means you've been working with dmpbbo for a long time, then please roll back to v1.0.

The json in C++has no j.get() function.

It does, i.e. it is implemented in nlohmann::json (perhaps I do not understand)

Is there a corresponding python execution code?

If you need only Python, have a look at dmpbbo/demos/python. This has all the functionality that the C++ code has (except for not being real-time; if you do not need realtime code, no need for the C++ code)