stulp / dmpbbo Goto Github PK
View Code? Open in Web Editor NEWPython/C++ library for Dynamical Movement Primitives and Black-Box Optimization
License: GNU Lesser General Public License v2.1
Python/C++ library for Dynamical Movement Primitives and Black-Box Optimization
License: GNU Lesser General Public License v2.1
just a small typo
python3 step1_defineTask.py results/
should be
python3 step2_defineTask.py results/
Summary of the results in our Paladyn paper.
Hello, anyone can help to explain the principle of the function "diffnc" in /python/dmp/Trajectory.py? I guess that it is used to calculate the difference derivative, but I cannot understand how it works. Do there have any related expansion or link? Thank you๐
It would be nice to add some instructions on how to call the demos. This is mentioned for demoDynamicalSystems in the tutorial, however the corresponding plotDynamicalSystem.py does not seem to exist.
(splitting #31 into several separate issues)
The problem that I see in your task is that you are not using an impedance controller. Therefore, I am not sure how the gains can play a role, for example, in the cost function. We can check that the exploration takes place but not the optimization. The alternative is to integrate the gains in the rollout function.
Line 64 in 9cf0e5e
Line 126 in 9cf0e5e
Since the following commit, dmpbbo no longer compiles on travis (it does on Ubuntu 18.04 using boost 1.65 though)
d2fe4cb
The commit only involves documentation, so the broken build must be due to a change in the boost libraries, perhaps similar to this issue:
freeorion/freeorion#445
I need to read this:
https://freeorion.org/forum/viewtopic.php?t=10671
Or perhaps one of these:
esa/pagmo#174
esa/pagmo#69
esa/pagmo#68
It's very easy to find people that have strange linking issues with boost serialization...
There is obvious code redunancy due to the parallel Python and C++ implementations. This is because there are two different purposes.
The modules bbo
and dmp_bbo
need not be real-time, and therefore the C++ implementation is not really necessary.
Further steps along the way:
Hi, I noticed your library has 2 different license files (LGPL and GPL) checked in -- under what license is this library licensed?
Thank you!
In the document, I find this repo still not provide the function for scaling towards new goals.
Is it possible to use the traditional method for scaling towards novel goals like the following equation?
Did not see in the install doc: Which versions of Python are supported?
When I install DMPBBO in a new PC using the release build:
mkdir -p build_dir; cd build_dir; cmake .. -DCMAKE_BUILD_TYPE=Release; make; make Docs
sudo make install
It does not copy the serialization.hpp
headers into /usr/local/include/..
directories. So it gives fatal error: dmp/serialization.hpp: No such file or directory
at compilation.
It works fine when doing the debug build:
mkdir -p build_dir; cd build_dir; cmake .. -DCMAKE_BUILD_TYPE=Release; make; make Docs
sudo make install
It would be helpful if there could be a one liner be added about the use of the demo_one_update
and demo_perform_rollouts
be added in the readme on what the input directory is expected to contain. I didn't see anything in the referenced section of the docs about use of those files specifically.
runOptimizationTask()
seems to be broken.The help for demoDynamicalSystems is quite nice, for the dmp demos I'd suggest changing it to the same format (with a complete example of a call)
(splitting #31 into several separate issues)
I got compilation error when building on Ubuntu 18.04
In file included from /home/yuriy/Documents/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.hpp:114:0,
from /home/yuriy/Documents/dmpbbo/src/dynamicalsystems/DynamicalSystem.hpp:33,
from /home/yuriy/Documents/dmpbbo/src/dynamicalsystems/DynamicalSystem.cpp:24:
/home/yuriy/Documents/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.tpp: In function โvoid boost::serialization::load(Archive&, Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>&, unsigned int)โ:
/home/yuriy/Documents/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.tpp:100:12: error: โcerrโ is not a member of โstdโ
std::cerr << __FILE__ << ":" << __LINE__ << ":";
^~~~
/home/yuriy/Documents/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.tpp:100:12: note: suggested alternative: โerrcโ
std::cerr << __FILE__ << ":" << __LINE__ << ":";
^~~~
errc
/home/yuriy/Documents/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.tpp:101:12: error: โcerrโ is not a member of โstdโ
std::cerr << "WARNING: Unexpected character '" << c << "' when deserializing Eigen::Matrix." << std::endl;
^~~~
/home/yuriy/Documents/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.tpp:101:12: note: suggested alternative: โerrcโ
std::cerr << "WARNING: Unexpected character '" << c << "' when deserializing Eigen::Matrix." << std::endl;
^~~~
errc
/home/yuriy/Documents/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.tpp:131:18: error: โcerrโ is not a member of โstdโ
std::cerr << __FILE__ << ":" << __LINE__ << ":";
^~~~
/home/yuriy/Documents/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.tpp:131:18: note: suggested alternative: โerrcโ
std::cerr << __FILE__ << ":" << __LINE__ << ":";
^~~~
errc
/home/yuriy/Documents/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.tpp:132:18: error: โcerrโ is not a member of โstdโ
std::cerr << "WARNING: Unexpected character '" << c << "' when deserializing Eigen::Matrix." << std::endl;
^~~~
/home/yuriy/Documents/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.tpp:132:18: note: suggested alternative: โerrcโ
std::cerr << "WARNING: Unexpected character '" << c << "' when deserializing Eigen::Matrix." << std::endl;
^~~~
errc
src/dynamicalsystems/CMakeFiles/dynamicalsystems.dir/build.make:62: recipe for target 'src/dynamicalsystems/CMakeFiles/dynamicalsystems.dir/DynamicalSystem.cpp.o' failed
make[2]: *** [src/dynamicalsystems/CMakeFiles/dynamicalsystems.dir/DynamicalSystem.cpp.o] Error 1
CMakeFiles/Makefile2:223: recipe for target 'src/dynamicalsystems/CMakeFiles/dynamicalsystems.dir/all' failed
make[1]: *** [src/dynamicalsystems/CMakeFiles/dynamicalsystems.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Adding #include <iostream>
before
I am curious if your work regarding policy improvement for sequences of movement primitives is in the scope of this repository, for example the methods described in "Reinforcement Learning with Sequences of Motion Primitives for Robust Manipulation".
Due to the use of the "mask", the Parameterizable implementation is complex and inefficient (the main design decision behind it was to keep the implementations in its subclasses simple; now I see it makes Parameterizable itself too complex).
It should be refactored so that:
That should make the code easier to debug. The current complexity is the bottleneck for allowing DmpWithGainSchedules to inherit from Parameterizable (see #61)
The Python Wrappers are nice, but it is also not 100% clear how to call them. You need to "make install" and then call them from the original source directory, which I didn't find very intuitive.
(splitting #31 into several separate issues)
Some of the demos cause a core dump if they don't find the correct file rather than existing nicely
I found demoDmpTrainFromTrajFile
(splitting #31 into several separate issues)
I accidentally typo'd on a call to demoDynamicalSystem and found out that it runs with any text after the call, e.g. python demoDynamicalSystem.py a b
. I don't think there needs to be testing for valid user entry but it might be helpful if the demo printed out which test was being run when an invalid entry was made.
It would be nice to add some instructions on how to call the demos. This is mentioned for demoDynamicalSystems in the tutorial, however the corresponding plotDynamicalSystem.py does not seem to exist.
The Python Wrappers are nice, but it is also not 100% clear how to call them. You need to "make install" and then call them from the original source directory, which I didn't find very intuitive.
The help for semoDynamicalSystems is quite nice, for the dmp demos I'd suggest changing it to the same format (with a complete example of a call)
If you call demoDmpChangeGoal or similar with a relative path for the output, the python files don't work if called from a different location then from which they were generated. E.g.
./demoDmpChangeGoal output/ and then going to the directory where the Python script resides and trying to call is there
Some of the demos cause a core dump if they don't find the correct file rather than existing nicely
I found demoDmpTrainFromTrajFile and demoOptimizationDmp
related note demoFunctionApproxTrainingWrapper.py crashes if lwpr is not installed while the C++ handles that correctly
I also got core dumps for
functionapproximator/tests/testTrainingCompareCppPython
and
dmp_bbo/tests/testTaskViapoint
#when I run the "/dmp_bbo/demoImitationAndOptimization.cpp", there is an error. After printing out the "breakpoint", I find the return of the function "Trajectory::getRangePerDim()" wrong. Indeed, the return should be transposed so that it is a vector. I change the code like this:
And it works well.
I found that this library does not consider constraints such as acceleration, velocity or position limits. I did find the forcing term scaling here:
https://github.com/stulp/dmpbbo/blob/master/src/dmp/Dmp.cpp#L629
But it doesn't seem to prevent the system from breaching its limits. I'm currently unsure whether the feature is not implemented yet or whether I just didn't find it.
I think that such a (optional) feature can be easily implemented by introducing a limits_
member in DynamicalSystem
and performing an element-wise std::max
in integrateStep
. Do you think that's something we should implement? If so I will create a PR for this.
Make install doesn't install eigen_realtime header. Building a code that includes Dmpbbo fails with fatal error: eigen_realtime/eigen_realtime_check.hpp no such file or directory .
Copying the header into /usr/local/include manually solves the problem:
mkdir /usr/local/include/eigen_realtime
cp path-to-dmpbbo/src/eigen_realtime/eigen_realtime_check.hpp /usr/local/include/eigen_realtime/
System: Ubuntu 16.04
I installed/compiled dmpbbo on a VirtualBox of fresh Ubuntu 16.04 (desktop) install.
Eigen3 is still required but went missing after a recent commit (Ubuntu now contains a high enough version, so custom install is not required) but should be added to apt-get list, i.e., libeigen3-dev
For the Python part tkinter (python3-tk) was not included by default when installing python3 via apt-get but also required.
In general it would be nice to mention which versions of Debian/Ubuntu this has been tested with.
There is a memory leak in FunctionApproximatorLWR.cpp because the constructor clones meta_params
and model_params
. I fixed it applying the following changes:
@@ -67,15 +68,21 @@ FunctionApproximator* FunctionApproximatorLWR::clone(void) const {
if (getModelParameters()!=NULL)
model_params = dynamic_cast<ModelParametersLWR*>(getModelParameters()->clone());
+ FunctionApproximatorLWR* falwr;
if (meta_params==NULL)
- return new FunctionApproximatorLWR(model_params);
- else
- return new FunctionApproximatorLWR(meta_params,model_params);
+ falwr = new FunctionApproximatorLWR(model_params);
+ else {
+ falwr = new FunctionApproximatorLWR(meta_params,model_params);
+ delete meta_params;
+ }
+ delete model_params;
+
+ return falwr;
};
I did not check other approximators, but if the code is similar, the problem might be more widespread.
#include <vector>
is missing on branch master in functionapproximators.dir/Parameterizable.hpp
. It generates an error when compiled with clang on OS X 10.9.
Could current implement of DMPs train multiple trajectories with different init and attractor?
These questions are specifically about utilizing discrete DMPs (implemented in this repository) for the reaching task, especially in the context of this paper (https://onlinelibrary.wiley.com/doi/abs/10.1111/desc.12638).
Any help or pointers on this will be highly appreciated!
I also got core dumps for dmp_bbo/tests/testTaskViapoint
(splitting #31 into several separate issues)
Hello Freek,
I encountered the following problem after the first rollouts :
python3 david_one_update.py optimization/
File "david_one_update.py", line 148, in <module>
oneUpdate(args.directory,args.plot)
File "david_one_update.py", line 72, in oneUpdate
i_update = runOptimizationTaskOneUpdate(directory, task, initial_distribution, updater, n_samples_per_update)
File "/home/beng_wi/git_repo_david_optimization/dmpbbo/python/dmp_bbo/run_one_update.py", line 130, in runOptimizationTaskOneUpdate
saveUpdateRollouts(directory, i_update, distribution, rollout_eval, rollouts, weights, distribution_new)
File "/home/beng_wi/git_repo_david_optimization/dmpbbo/python/dmp_bbo/dmp_bbo_plotting.py", line 187, in saveUpdateRollouts
if rollouts[0].total_cost():
File "/home/beng_wi/git_repo_david_optimization/dmpbbo/python/dmp_bbo/Rollout.py", line 39, in total_cost
if self.cost:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
I am using Python 3.6.4
If you call demoDmpChangeGoal or similar with a relative path for the output, the python files don't work if called from a different location then from which they were generated. E.g.
./demoDmpChangeGoal output/ and then going to the directory where the Python script resides and trying to call is there
(splitting #31 into several separate issues)
The parallel optimization is no longer needed if the covariance matrix updates updates the matrix in submatrices. The simple solution to this would be to have a function UpdaterCovarAdaptation::setSubMatrices(VectorXi)
, in which the sizes of the submatrices are set, rather than derived from the array of distributions:
dmpbbo/src/bbo/runOptimization.cpp
Line 112 in ca900e3
The following functions can then be deleted:
dmpbbo/src/dmp_bbo/runOptimizationTask.cpp
Line 227 in ca900e3
dmpbbo/src/bbo/runOptimization.cpp
Line 65 in ca900e3
I am using the DmpWithGainSchedules class to optimize the gains of a DMP. However, the impedance gains are not modified during the rollouts. In line 171 of DmpWithGainSchedules.hpp, there is a TODO left to do. Its description is to override the Parameterizable interface. Thus, the function approximators for gains can not yet be parametrized. This TODO is probably causing the bug of the optimization of the gains. I would appreciate any hint or help on how to tackle the task.
Thanks,
something like
# Plot start / end markers on trajectory
ax_rollout.plot(h[0].get_xdata()[0], h[0].get_ydata()[0], 'rx', mew=3, label='start')
ax_rollout.plot(h[0].get_xdata()[-1], h[0].get_ydata()[-1], 'bx', mew=3, label='end')
plt.legend()
after line 107 in runOptimizationTask.py
just adds a start and end marker to the demo. Just a suggestion to make it a little easier to parse on first glance:
At the moment there are a few comparisons to None and when running I just get:
FutureWarning: comparison to None
will result in an elementwise object comparison in the future.
if samples==None:
But in the latest numpy version it is treated as an error.
ValueError: the truth value of an array with more than one element is ambiguous.
Use a.any() or a.all()
related note demoFunctionApproxTrainingWrapper.py crashes if lwpr is not installed while the C++ handles that correctly
(splitting #31 into several separate issues)
Many researchers do not run the DMP in the real-time control loop, but rather use dmpbbo to generate trajectories off-line, and then execute those trajectories on the robot. See for instance #61.
For these users, it would be much better to have a robot_demo_traj
implementation, where everything is done in Python. This is related to #60, but can be done independently of #60 (which is a massive refactoring of the entire code base)
Hey bro! Something went wrong when I compiled the code.
The compilation process is as follows๏ผ
scu@pisoso:~/workspace/ws_lhj/opensource/dmpbbo$ mkdir -p build_dir; cd build_dir; cmake .. -DCMAKE_BUILD_TYPE=Release; make -j16 CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake. Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions. -- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") -- Could NOT find LWPR (missing: LWPR_LIBRARY LWPR_INCLUDE_DIR) -- Found Boost: /usr/local/lib/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.34") found components: filesystem system serialization -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) CMake Warning at CMakeLists.txt:83 (message): Doxygen is needed to build the documentation. Please install it correctly -- Configuring done -- Generating done -- Build files have been written to: /home/scu/workspace/ws_lhj/opensource/dmpbbo/build_dir [ 5%] Building CXX object src/dynamicalsystems/CMakeFiles/dynamicalsystems.dir/DynamicalSystem.cpp.o [ 5%] Building CXX object src/dmp/CMakeFiles/dmp.dir/DmpContextual.cpp.o [ 5%] Building CXX object src/eigen/CMakeFiles/eigen.dir/eigen_json.cpp.o [ 5%] Building CXX object src/dynamicalsystems/CMakeFiles/dynamicalsystems.dir/DynamicalSystemFactory.cpp.o [ 5%] Building CXX object src/dmp/CMakeFiles/dmp.dir/Dmp.cpp.o [ 5%] Building CXX object src/bbo/CMakeFiles/bbo.dir/DistributionGaussian.cpp.o [ 7%] Building CXX object src/dmp_bbo/CMakeFiles/dmp_bbo.dir/ExperimentBBO.cpp.o [ 7%] Building CXX object src/dynamicalsystems/CMakeFiles/dynamicalsystems.dir/ExponentialSystem.cpp.o [ 8%] Building CXX object src/bbo/CMakeFiles/bbo.dir/runOptimization.cpp.o [ 9%] Building CXX object src/dynamicalsystems/CMakeFiles/dynamicalsystems.dir/SigmoidSystem.cpp.o [ 10%] Building CXX object src/dmp_bbo/tasks/CMakeFiles/tasksolverdmparm2d.dir/TaskSolverDmpArm2D.cpp.o [ 11%] Building CXX object src/dmp_bbo/CMakeFiles/dmp_bbo.dir/Rollout.cpp.o [ 13%] Building CXX object src/dmp/CMakeFiles/dmp.dir/DmpContextualOneStep.cpp.o [ 13%] Building CXX object src/dmp_bbo/tasks/CMakeFiles/taskviapoint.dir/TaskViapoint.cpp.o [ 14%] Building CXX object src/dmp_bbo/tasks/CMakeFiles/taskviapointarm2d.dir/TaskViapointArm2D.cpp.o [ 15%] Building CXX object src/functionapproximators/CMakeFiles/functionapproximators.dir/BasisFunction.cpp.o [ 16%] Building CXX object src/bbo/CMakeFiles/bbo.dir/updaters/UpdaterCovarAdaptation.cpp.o [ 17%] Building CXX object src/dmp_bbo/CMakeFiles/dmp_bbo.dir/Task.cpp.o [ 18%] Linking CXX static library libeigen.a [ 18%] Built target eigen [ 19%] Building CXX object src/dmp/CMakeFiles/dmp.dir/DmpContextualTwoStep.cpp.o [ 20%] Building CXX object src/dynamicalsystems/CMakeFiles/dynamicalsystems.dir/SpringDamperSystem.cpp.o [ 21%] Linking CXX static library libtaskviapointarm2d.a [ 21%] Built target taskviapointarm2d [ 22%] Building CXX object src/bbo/CMakeFiles/bbo.dir/updaters/UpdaterCovarDecay.cpp.o [ 23%] Linking CXX static library libtasksolverdmparm2d.a [ 23%] Built target tasksolverdmparm2d [ 24%] Building CXX object src/dmp_bbo/CMakeFiles/dmp_bbo.dir/TaskSolver.cpp.o In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0, from /usr/include/c++/7/bits/char_traits.h:39, from /usr/include/c++/7/string:40, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/dynamicalsystems/DynamicalSystem.hpp:29, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/dynamicalsystems/ExponentialSystem.hpp:27, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/dynamicalsystems/ExponentialSystem.cpp:24: /usr/include/c++/7/bits/stl_iterator.h: In instantiation of โstd::insert_iterator<_Container>& std::insert_iterator<_Container>::operator=(typename _Container::value_type&&) [with _Container = Eigen::Matrix<double, -1, 1>; typename _Container::value_type = double]โ: /usr/include/c++/7/bits/stl_algo.h:4306:12: required from โ_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = nlohmann::detail::iter_impl<const nlohmann::basic_json<> >; _OIter = std::insert_iterator<Eigen::Matrix<double, -1, 1> >; _UnaryOperation = nlohmann::detail::from_json_array_impl(const BasicJsonType&, ConstructibleArrayType&, nlohmann::detail::priority_tag<0>) [with BasicJsonType = nlohmann::basic_json<>; ConstructibleArrayType = Eigen::Matrix<double, -1, 1>]::<lambda(const nlohmann::basic_json<>&)>]โ /usr/include/nlohmann/detail/conversions/from_json.hpp:215:19: required from โvoid nlohmann::detail::from_json_array_impl(const BasicJsonType&, ConstructibleArrayType&, nlohmann::detail::priority_tag<0>) [with BasicJsonType = nlohmann::basic_json<>; ConstructibleArrayType = Eigen::Matrix<double, -1, 1>]โ /usr/include/nlohmann/detail/conversions/from_json.hpp:245:25: required from โdecltype (((nlohmann::detail::from_json_array_impl(j, arr, nlohmann::detail::priority_tag<3>{}), j.get<typename ConstructibleArrayType::value_type>()), void())) nlohmann::detail::from_json(const BasicJsonType&, ConstructibleArrayType&) [with BasicJsonType = nlohmann::basic_json<>; ConstructibleArrayType = Eigen::Matrix<double, -1, 1>; typename std::enable_if<(((nlohmann::detail::is_constructible_array_type<BasicJsonType, ConstructibleArrayType>::value && (! nlohmann::detail::is_constructible_object_type<BasicJsonType, ConstructibleObjectType>::value)) && (! nlohmann::detail::is_constructible_string_type<BasicJsonType, ConstructibleStringType>::value)) && (! nlohmann::detail::is_basic_json<T>::value)), int>::type <anonymous> = 0; decltype (((nlohmann::detail::from_json_array_impl(j, arr, nlohmann::detail::priority_tag<3>{}), j.get<typename ConstructibleArrayType::value_type>()), void())) = void; typename ConstructibleArrayType::value_type = double]โ /usr/include/nlohmann/detail/conversions/from_json.hpp:377:25: required from โdecltype ((nlohmann::detail::from_json(j, val), void())) nlohmann::detail::from_json_fn::operator()(const BasicJsonType&, T&) const [with BasicJsonType = nlohmann::basic_json<>; T = Eigen::Matrix<double, -1, 1>; decltype ((nlohmann::detail::from_json(j, val), void())) = void]โ /usr/include/nlohmann/adl_serializer.hpp:28:30: required from โstatic decltype ((nlohmann::{anonymous}::from_json(forward<BasicJsonType>(j), val), void())) nlohmann::adl_serializer<T, SFINAE>::from_json(BasicJsonType&&, ValueType&) [with BasicJsonType = const nlohmann::basic_json<>&; ValueType = Eigen::Matrix<double, -1, 1>; <template-parameter-1-1> = Eigen::Matrix<double, -1, 1>; <template-parameter-1-2> = void; decltype ((nlohmann::{anonymous}::from_json(forward<BasicJsonType>(j), val), void())) = void]โ /usr/include/nlohmann/json.hpp:2643:45: required from โValueType nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::get() const [with ValueTypeCV = Eigen::Matrix<double, -1, 1>; ValueType = Eigen::Matrix<double, -1, 1>; typename std::enable_if<(((! nlohmann::detail::is_basic_json<U>::value) && nlohmann::detail::has_from_json<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>, ValueType>::value) && (! nlohmann::detail::has_non_default_from_json<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>, ValueType>::value)), int>::type <anonymous> = 0; ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string<char>; BooleanType = bool; NumberIntegerType = long int; NumberUnsignedType = long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::adl_serializer]โ /usr/include/nlohmann/json.hpp:2936:30: required from โnlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::operator ValueType() const [with ValueType = Eigen::Matrix<double, -1, 1>; typename std::enable_if<((((((! std::is_pointer<_Ptr>::value) && (! std::is_same<ValueType, nlohmann::detail::json_ref<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer> > >::value)) && (! std::is_same<ValueType, typename StringType::value_type>::value)) && (! nlohmann::detail::is_basic_json<BasicJsonType>::value)) && (! std::is_same<ValueType, std::initializer_list<typename StringType::value_type> >::value)) && typename nlohmann::detail::detector<nlohmann::detail::nonesuch, void, nlohmann::detail::get_template_function, const nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>&, ValueType>::value_t:: value), int>::type <anonymous> = 0; ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string<char>; BooleanType = bool; NumberIntegerType = long int; NumberUnsignedType = long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::adl_serializer]โ /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/dynamicalsystems/ExponentialSystem.cpp:110:58: required from here /usr/include/c++/7/bits/stl_iterator.h:703:20: error: โclass Eigen::Matrix<double, -1, 1>โ has no member named โinsertโ; did you mean โ_setโ? iter = container->insert(iter, std::move(__value)); ~~~~~~~~~~~^~~~~~ _set In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0, from /usr/include/c++/7/bits/char_traits.h:39, from /usr/include/c++/7/string:40, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/dynamicalsystems/DynamicalSystem.hpp:29, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/dynamicalsystems/SigmoidSystem.hpp:27, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/dynamicalsystems/SigmoidSystem.cpp:31: /usr/include/c++/7/bits/stl_iterator.h: In instantiation of โstd::insert_iterator<_Container>& std::insert_iterator<_Container>::operator=(typename _Container::value_type&&) [with _Container = Eigen::Matrix<double, -1, 1>; typename _Container::value_type = double]โ: /usr/include/c++/7/bits/stl_algo.h:4306:12: required from โ_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = nlohmann::detail::iter_impl<const nlohmann::basic_json<> >; _OIter = std::insert_iterator<Eigen::Matrix<double, -1, 1> >; _UnaryOperation = nlohmann::detail::from_json_array_impl(const BasicJsonType&, ConstructibleArrayType&, nlohmann::detail::priority_tag<0>) [with BasicJsonType = nlohmann::basic_json<>; ConstructibleArrayType = Eigen::Matrix<double, -1, 1>]::<lambda(const nlohmann::basic_json<>&)>]โ /usr/include/nlohmann/detail/conversions/from_json.hpp:215:19: required from โvoid nlohmann::detail::from_json_array_impl(const BasicJsonType&, ConstructibleArrayType&, nlohmann::detail::priority_tag<0>) [with BasicJsonType = nlohmann::basic_json<>; ConstructibleArrayType = Eigen::Matrix<double, -1, 1>]โ /usr/include/nlohmann/detail/conversions/from_json.hpp:245:25: required from โdecltype (((nlohmann::detail::from_json_array_impl(j, arr, nlohmann::detail::priority_tag<3>{}), j.get<typename ConstructibleArrayType::value_type>()), void())) nlohmann::detail::from_json(const BasicJsonType&, ConstructibleArrayType&) [with BasicJsonType = nlohmann::basic_json<>; ConstructibleArrayType = Eigen::Matrix<double, -1, 1>; typename std::enable_if<(((nlohmann::detail::is_constructible_array_type<BasicJsonType, ConstructibleArrayType>::value && (! nlohmann::detail::is_constructible_object_type<BasicJsonType, ConstructibleObjectType>::value)) && (! nlohmann::detail::is_constructible_string_type<BasicJsonType, ConstructibleStringType>::value)) && (! nlohmann::detail::is_basic_json<T>::value)), int>::type <anonymous> = 0; decltype (((nlohmann::detail::from_json_array_impl(j, arr, nlohmann::detail::priority_tag<3>{}), j.get<typename ConstructibleArrayType::value_type>()), void())) = void; typename ConstructibleArrayType::value_type = double]โ /usr/include/nlohmann/detail/conversions/from_json.hpp:377:25: required from โdecltype ((nlohmann::detail::from_json(j, val), void())) nlohmann::detail::from_json_fn::operator()(const BasicJsonType&, T&) const [with BasicJsonType = nlohmann::basic_json<>; T = Eigen::Matrix<double, -1, 1>; decltype ((nlohmann::detail::from_json(j, val), void())) = void]โ /usr/include/nlohmann/adl_serializer.hpp:28:30: required from โstatic decltype ((nlohmann::{anonymous}::from_json(forward<BasicJsonType>(j), val), void())) nlohmann::adl_serializer<T, SFINAE>::from_json(BasicJsonType&&, ValueType&) [with BasicJsonType = const nlohmann::basic_json<>&; ValueType = Eigen::Matrix<double, -1, 1>; <template-parameter-1-1> = Eigen::Matrix<double, -1, 1>; <template-parameter-1-2> = void; decltype ((nlohmann::{anonymous}::from_json(forward<BasicJsonType>(j), val), void())) = void]โ /usr/include/nlohmann/json.hpp:2643:45: required from โValueType nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::get() const [with ValueTypeCV = Eigen::Matrix<double, -1, 1>; ValueType = Eigen::Matrix<double, -1, 1>; typename std::enable_if<(((! nlohmann::detail::is_basic_json<U>::value) && nlohmann::detail::has_from_json<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>, ValueType>::value) && (! nlohmann::detail::has_non_default_from_json<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>, ValueType>::value)), int>::type <anonymous> = 0; ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string<char>; BooleanType = bool; NumberIntegerType = long int; NumberUnsignedType = long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::adl_serializer]โ /usr/include/nlohmann/json.hpp:2936:30: required from โnlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::operator ValueType() const [with ValueType = Eigen::Matrix<double, -1, 1>; typename std::enable_if<((((((! std::is_pointer<_Ptr>::value) && (! std::is_same<ValueType, nlohmann::detail::json_ref<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer> > >::value)) && (! std::is_same<ValueType, typename StringType::value_type>::value)) && (! nlohmann::detail::is_basic_json<BasicJsonType>::value)) && (! std::is_same<ValueType, std::initializer_list<typename StringType::value_type> >::value)) && typename nlohmann::detail::detector<nlohmann::detail::nonesuch, void, nlohmann::detail::get_template_function, const nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>&, ValueType>::value_t:: value), int>::type <anonymous> = 0; ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string<char>; BooleanType = bool; NumberIntegerType = long int; NumberUnsignedType = long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::adl_serializer]โ /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/dynamicalsystems/SigmoidSystem.cpp:183:58: required from here /usr/include/c++/7/bits/stl_iterator.h:703:20: error: โclass Eigen::Matrix<double, -1, 1>โ has no member named โinsertโ; did you mean โ_setโ? iter = container->insert(iter, std::move(__value)); ~~~~~~~~~~~^~~~~~ _set [ 48%] Building CXX object src/functionapproximators/CMakeFiles/functionapproximators.dir/ModelParametersRBFN.cpp.o [ 49%] Linking CXX static library libdmp_bbo.a [ 49%] Built target dmp_bbo [ 50%] Building CXX object src/functionapproximators/CMakeFiles/functionapproximators.dir/ModelParametersRRRFF.cpp.o src/functionapproximators/CMakeFiles/functionapproximators.dir/build.make:243: recipe for target 'src/functionapproximators/CMakeFiles/functionapproximators.dir/MetaParametersRBFN.cpp.o' failed make[2]: *** [src/functionapproximators/CMakeFiles/functionapproximators.dir/MetaParametersRBFN.cpp.o] Error 1 make[2]: *** ๆญฃๅจ็ญๅพ ๆชๅฎๆ็ไปปๅก.... [ 51%] Linking CXX static library libdmp.a [ 51%] Built target dmp In file included from /usr/include/nlohmann/adl_serializer.hpp:6:0, from /usr/include/nlohmann/json.hpp:51, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/eigen/eigen_json.hpp:26, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/functionapproximators/ModelParametersRBFN.cpp:30: /usr/include/nlohmann/detail/conversions/to_json.hpp: In instantiation of โstatic void nlohmann::detail::external_constructor<(nlohmann::detail::value_t)2>::construct(BasicJsonType&, const CompatibleArrayType&) [with BasicJsonType = nlohmann::basic_json<>; CompatibleArrayType = Eigen::Matrix<double, -1, -1>; typename std::enable_if<(! std::is_same<CompatibleArrayType, typename BasicJsonType::array_t>::value), int>::type <anonymous> = 0]โ: /usr/include/nlohmann/detail/conversions/to_json.hpp:266:52: required from โvoid nlohmann::detail::to_json(BasicJsonType&, const CompatibleArrayType&) [with BasicJsonType = nlohmann::basic_json<>; CompatibleArrayType = Eigen::Matrix<double, -1, -1>; typename std::enable_if<(((nlohmann::detail::is_compatible_array_type<BasicJsonType, CompatibleArrayType>::value && (! nlohmann::detail::is_compatible_object_type<BasicJsonType, CompatibleObjectType>::value)) && (! nlohmann::detail::is_compatible_string_type<BasicJsonType, ConstructibleStringType>::value)) && (! nlohmann::detail::is_basic_json<T>::value)), int>::type <anonymous> = 0]โ /usr/include/nlohmann/detail/conversions/to_json.hpp:337:23: required from โdecltype ((nlohmann::detail::to_json(j, forward<T>(val)), void())) nlohmann::detail::to_json_fn::operator()(BasicJsonType&, T&&) const [with BasicJsonType = nlohmann::basic_json<>; T = const Eigen::Matrix<double, -1, -1>&; decltype ((nlohmann::detail::to_json(j, forward<T>(val)), void())) = void]โ /usr/include/nlohmann/adl_serializer.hpp:45:28: required from โstatic decltype ((nlohmann::{anonymous}::to_json(j, forward<ValueType>(val)), void())) nlohmann::adl_serializer<T, SFINAE>::to_json(BasicJsonType&, ValueType&&) [with BasicJsonType = nlohmann::basic_json<>; ValueType = const Eigen::Matrix<double, -1, -1>&; <template-parameter-1-1> = Eigen::Matrix<double, -1, -1>; <template-parameter-1-2> = void; decltype ((nlohmann::{anonymous}::to_json(j, forward<ValueType>(val)), void())) = void]โ /usr/include/nlohmann/json.hpp:1304:35: required from โnlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::basic_json(CompatibleType&&) [with CompatibleType = const Eigen::Matrix<double, -1, -1>&; U = Eigen::Matrix<double, -1, -1>; typename std::enable_if<((! nlohmann::detail::is_basic_json<U>::value) && nlohmann::detail::is_compatible_type<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>, U>::value), int>::type <anonymous> = 0; ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string<char>; BooleanType = bool; NumberIntegerType = long int; NumberUnsignedType = long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::adl_serializer]โ /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/functionapproximators/ModelParametersRBFN.cpp:233:23: required from here /usr/include/nlohmann/detail/conversions/to_json.hpp:133:25: error: invalid use of void expression j.m_value.array = j.template create<typename BasicJsonType::array_t>(begin(arr), end(arr)); In file included from /usr/include/nlohmann/adl_serializer.hpp:5:0, from /usr/include/nlohmann/json.hpp:51, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/eigen/eigen_json.hpp:26, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/functionapproximators/ModelParametersRBFN.cpp:30: /usr/include/nlohmann/detail/conversions/from_json.hpp: In instantiation of โvoid nlohmann::detail::from_json_array_impl(const BasicJsonType&, ConstructibleArrayType&, nlohmann::detail::priority_tag<0>) [with BasicJsonType = nlohmann::basic_json<>; ConstructibleArrayType = Eigen::Matrix<double, -1, -1>]โ: /usr/include/nlohmann/detail/conversions/from_json.hpp:245:25: required from โdecltype (((nlohmann::detail::from_json_array_impl(j, arr, nlohmann::detail::priority_tag<3>{}), j.get<typename ConstructibleArrayType::value_type>()), void())) nlohmann::detail::from_json(const BasicJsonType&, ConstructibleArrayType&) [with BasicJsonType = nlohmann::basic_json<>; ConstructibleArrayType = Eigen::Matrix<double, -1, -1>; typename std::enable_if<(((nlohmann::detail::is_constructible_array_type<BasicJsonType, ConstructibleArrayType>::value && (! nlohmann::detail::is_constructible_object_type<BasicJsonType, ConstructibleObjectType>::value)) && (! nlohmann::detail::is_constructible_string_type<BasicJsonType, ConstructibleStringType>::value)) && (! nlohmann::detail::is_basic_json<T>::value)), int>::type <anonymous> = 0; decltype (((nlohmann::detail::from_json_array_impl(j, arr, nlohmann::detail::priority_tag<3>{}), j.get<typename ConstructibleArrayType::value_type>()), void())) = void; typename ConstructibleArrayType::value_type = double]โ /usr/include/nlohmann/detail/conversions/from_json.hpp:377:25: required from โdecltype ((nlohmann::detail::from_json(j, val), void())) nlohmann::detail::from_json_fn::operator()(const BasicJsonType&, T&) const [with BasicJsonType = nlohmann::basic_json<>; T = Eigen::Matrix<double, -1, -1>; decltype ((nlohmann::detail::from_json(j, val), void())) = void]โ /usr/include/nlohmann/adl_serializer.hpp:28:30: required from โstatic decltype ((nlohmann::{anonymous}::from_json(forward<BasicJsonType>(j), val), void())) nlohmann::adl_serializer<T, SFINAE>::from_json(BasicJsonType&&, ValueType&) [with BasicJsonType = const nlohmann::basic_json<>&; ValueType = Eigen::Matrix<double, -1, -1>; <template-parameter-1-1> = Eigen::Matrix<double, -1, -1>; <template-parameter-1-2> = void; decltype ((nlohmann::{anonymous}::from_json(forward<BasicJsonType>(j), val), void())) = void]โ /usr/include/nlohmann/json.hpp:2643:45: required from โValueType nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::get() const [with ValueTypeCV = Eigen::Matrix<double, -1, -1>; ValueType = Eigen::Matrix<double, -1, -1>; typename std::enable_if<(((! nlohmann::detail::is_basic_json<U>::value) && nlohmann::detail::has_from_json<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>, ValueType>::value) && (! nlohmann::detail::has_non_default_from_json<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>, ValueType>::value)), int>::type <anonymous> = 0; ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string<char>; BooleanType = bool; NumberIntegerType = long int; NumberUnsignedType = long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::adl_serializer]โ /usr/include/nlohmann/json.hpp:2936:30: required from โnlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::operator ValueType() const [with ValueType = Eigen::Matrix<double, -1, -1>; typename std::enable_if<((((((! std::is_pointer<_Ptr>::value) && (! std::is_same<ValueType, nlohmann::detail::json_ref<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer> > >::value)) && (! std::is_same<ValueType, typename StringType::value_type>::value)) && (! nlohmann::detail::is_basic_json<BasicJsonType>::value)) && (! std::is_same<ValueType, std::initializer_list<typename StringType::value_type> >::value)) && typename nlohmann::detail::detector<nlohmann::detail::nonesuch, void, nlohmann::detail::get_template_function, const nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>&, ValueType>::value_t:: value), int>::type <anonymous> = 0; ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string<char>; BooleanType = bool; NumberIntegerType = long int; NumberUnsignedType = long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::adl_serializer]โ /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/functionapproximators/ModelParametersRBFN.cpp:224:52: required from here /usr/include/nlohmann/detail/conversions/from_json.hpp:216:42: error: invalid use of void expression j.begin(), j.end(), std::inserter(ret, end(ret)), ~~~~~~~~~~~~~^~~~~~~~~~~~~~~ In file included from /usr/include/nlohmann/adl_serializer.hpp:6:0, from /usr/include/nlohmann/json.hpp:51, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/eigen/eigen_json.hpp:26, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/functionapproximators/ModelParametersLWR.cpp:30: /usr/include/nlohmann/detail/conversions/to_json.hpp: In instantiation of โstatic void nlohmann::detail::external_constructor<(nlohmann::detail::value_t)2>::construct(BasicJsonType&, const CompatibleArrayType&) [with BasicJsonType = nlohmann::basic_json<>; CompatibleArrayType = Eigen::Matrix<double, -1, -1>; typename std::enable_if<(! std::is_same<CompatibleArrayType, typename BasicJsonType::array_t>::value), int>::type <anonymous> = 0]โ: /usr/include/nlohmann/detail/conversions/to_json.hpp:266:52: required from โvoid nlohmann::detail::to_json(BasicJsonType&, const CompatibleArrayType&) [with BasicJsonType = nlohmann::basic_json<>; CompatibleArrayType = Eigen::Matrix<double, -1, -1>; typename std::enable_if<(((nlohmann::detail::is_compatible_array_type<BasicJsonType, CompatibleArrayType>::value && (! nlohmann::detail::is_compatible_object_type<BasicJsonType, CompatibleObjectType>::value)) && (! nlohmann::detail::is_compatible_string_type<BasicJsonType, ConstructibleStringType>::value)) && (! nlohmann::detail::is_basic_json<T>::value)), int>::type <anonymous> = 0]โ /usr/include/nlohmann/detail/conversions/to_json.hpp:337:23: required from โdecltype ((nlohmann::detail::to_json(j, forward<T>(val)), void())) nlohmann::detail::to_json_fn::operator()(BasicJsonType&, T&&) const [with BasicJsonType = nlohmann::basic_json<>; T = const Eigen::Matrix<double, -1, -1>&; decltype ((nlohmann::detail::to_json(j, forward<T>(val)), void())) = void]โ /usr/include/nlohmann/adl_serializer.hpp:45:28: required from โstatic decltype ((nlohmann::{anonymous}::to_json(j, forward<ValueType>(val)), void())) nlohmann::adl_serializer<T, SFINAE>::to_json(BasicJsonType&, ValueType&&) [with BasicJsonType = nlohmann::basic_json<>; ValueType = const Eigen::Matrix<double, -1, -1>&; <template-parameter-1-1> = Eigen::Matrix<double, -1, -1>; <template-parameter-1-2> = void; decltype ((nlohmann::{anonymous}::to_json(j, forward<ValueType>(val)), void())) = void]โ /usr/include/nlohmann/json.hpp:1304:35: required from โnlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::basic_json(CompatibleType&&) [with CompatibleType = const Eigen::Matrix<double, -1, -1>&; U = Eigen::Matrix<double, -1, -1>; typename std::enable_if<((! nlohmann::detail::is_basic_json<U>::value) && nlohmann::detail::is_compatible_type<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>, U>::value), int>::type <anonymous> = 0; ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string<char>; BooleanType = bool; NumberIntegerType = long int; NumberUnsignedType = long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::adl_serializer]โ /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/functionapproximators/ModelParametersLWR.cpp:444:23: required from here /usr/include/nlohmann/detail/conversions/to_json.hpp:133:25: error: invalid use of void expression j.m_value.array = j.template create<typename BasicJsonType::array_t>(begin(arr), end(arr)); In file included from /usr/include/nlohmann/adl_serializer.hpp:5:0, from /usr/include/nlohmann/json.hpp:51, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/eigen/eigen_json.hpp:26, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/functionapproximators/ModelParametersLWR.cpp:30: /usr/include/nlohmann/detail/conversions/from_json.hpp: In instantiation of โvoid nlohmann::detail::from_json_array_impl(const BasicJsonType&, ConstructibleArrayType&, nlohmann::detail::priority_tag<0>) [with BasicJsonType = nlohmann::basic_json<>; ConstructibleArrayType = Eigen::Matrix<double, -1, -1>]โ: /usr/include/nlohmann/detail/conversions/from_json.hpp:245:25: required from โdecltype (((nlohmann::detail::from_json_array_impl(j, arr, nlohmann::detail::priority_tag<3>{}), j.get<typename ConstructibleArrayType::value_type>()), void())) nlohmann::detail::from_json(const BasicJsonType&, ConstructibleArrayType&) [with BasicJsonType = nlohmann::basic_json<>; ConstructibleArrayType = Eigen::Matrix<double, -1, -1>; typename std::enable_if<(((nlohmann::detail::is_constructible_array_type<BasicJsonType, ConstructibleArrayType>::value && (! nlohmann::detail::is_constructible_object_type<BasicJsonType, ConstructibleObjectType>::value)) && (! nlohmann::detail::is_constructible_string_type<BasicJsonType, ConstructibleStringType>::value)) && (! nlohmann::detail::is_basic_json<T>::value)), int>::type <anonymous> = 0; decltype (((nlohmann::detail::from_json_array_impl(j, arr, nlohmann::detail::priority_tag<3>{}), j.get<typename ConstructibleArrayType::value_type>()), void())) = void; typename ConstructibleArrayType::value_type = double]โ /usr/include/nlohmann/detail/conversions/from_json.hpp:377:25: required from โdecltype ((nlohmann::detail::from_json(j, val), void())) nlohmann::detail::from_json_fn::operator()(const BasicJsonType&, T&) const [with BasicJsonType = nlohmann::basic_json<>; T = Eigen::Matrix<double, -1, -1>; decltype ((nlohmann::detail::from_json(j, val), void())) = void]โ /usr/include/nlohmann/adl_serializer.hpp:28:30: required from โstatic decltype ((nlohmann::{anonymous}::from_json(forward<BasicJsonType>(j), val), void())) nlohmann::adl_serializer<T, SFINAE>::from_json(BasicJsonType&&, ValueType&) [with BasicJsonType = const nlohmann::basic_json<>&; ValueType = Eigen::Matrix<double, -1, -1>; <template-parameter-1-1> = Eigen::Matrix<double, -1, -1>; <template-parameter-1-2> = void; decltype ((nlohmann::{anonymous}::from_json(forward<BasicJsonType>(j), val), void())) = void]โ /usr/include/nlohmann/json.hpp:2643:45: required from โValueType nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::get() const [with ValueTypeCV = Eigen::Matrix<double, -1, -1>; ValueType = Eigen::Matrix<double, -1, -1>; typename std::enable_if<(((! nlohmann::detail::is_basic_json<U>::value) && nlohmann::detail::has_from_json<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>, ValueType>::value) && (! nlohmann::detail::has_non_default_from_json<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>, ValueType>::value)), int>::type <anonymous> = 0; ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string<char>; BooleanType = bool; NumberIntegerType = long int; NumberUnsignedType = long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::adl_serializer]โ /usr/include/nlohmann/json.hpp:2936:30: required from โnlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::operator ValueType() const [with ValueType = Eigen::Matrix<double, -1, -1>; typename std::enable_if<((((((! std::is_pointer<_Ptr>::value) && (! std::is_same<ValueType, nlohmann::detail::json_ref<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer> > >::value)) && (! std::is_same<ValueType, typename StringType::value_type>::value)) && (! nlohmann::detail::is_basic_json<BasicJsonType>::value)) && (! std::is_same<ValueType, std::initializer_list<typename StringType::value_type> >::value)) && typename nlohmann::detail::detector<nlohmann::detail::nonesuch, void, nlohmann::detail::get_template_function, const nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>&, ValueType>::value_t:: value), int>::type <anonymous> = 0; ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string<char>; BooleanType = bool; NumberIntegerType = long int; NumberUnsignedType = long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::adl_serializer]โ /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/functionapproximators/ModelParametersLWR.cpp:434:52: required from here /usr/include/nlohmann/detail/conversions/from_json.hpp:216:42: error: invalid use of void expression j.begin(), j.end(), std::inserter(ret, end(ret)), ~~~~~~~~~~~~~^~~~~~~~~~~~~~~ In file included from /usr/local/include/eigen3/Eigen/Core:152:0, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.hpp:29, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/functionapproximators/Parameterizable.hpp:29, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/functionapproximators/ModelParameters.hpp:27, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/functionapproximators/ModelParametersLWR.hpp:27, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/functionapproximators/ModelParametersLWR.cpp:24: /usr/local/include/eigen3/Eigen/src/Core/StlIterators.h: In instantiation of โEigen::DenseBase<Derived>::iterator Eigen::DenseBase<Derived>::end() [with Derived = Eigen::Matrix<double, -1, -1>; Eigen::DenseBase<Derived>::iterator = void]โ: /usr/include/c++/7/bits/range_access.h:69:25: required from โdecltype (__cont.end()) std::end(_Container&) [with _Container = Eigen::Matrix<double, -1, -1>; decltype (__cont.end()) = void]โ /usr/include/nlohmann/detail/conversions/from_json.hpp:216:51: required from โvoid nlohmann::detail::from_json_array_impl(const BasicJsonType&, ConstructibleArrayType&, nlohmann::detail::priority_tag<0>) [with BasicJsonType = nlohmann::basic_json<>; ConstructibleArrayType = Eigen::Matrix<double, -1, -1>]โ /usr/include/nlohmann/detail/conversions/from_json.hpp:245:25: required from โdecltype (((nlohmann::detail::from_json_array_impl(j, arr, nlohmann::detail::priority_tag<3>{}), j.get<typename ConstructibleArrayType::value_type>()), void())) nlohmann::detail::from_json(const BasicJsonType&, ConstructibleArrayType&) [with BasicJsonType = nlohmann::basic_json<>; ConstructibleArrayType = Eigen::Matrix<double, -1, -1>; typename std::enable_if<(((nlohmann::detail::is_constructible_array_type<BasicJsonType, ConstructibleArrayType>::value && (! nlohmann::detail::is_constructible_object_type<BasicJsonType, ConstructibleObjectType>::value)) && (! nlohmann::detail::is_constructible_string_type<BasicJsonType, ConstructibleStringType>::value)) && (! nlohmann::detail::is_basic_json<T>::value)), int>::type <anonymous> = 0; decltype (((nlohmann::detail::from_json_array_impl(j, arr, nlohmann::detail::priority_tag<3>{}), j.get<typename ConstructibleArrayType::value_type>()), void())) = void; typename ConstructibleArrayType::value_type = double]โ /usr/include/nlohmann/detail/conversions/from_json.hpp:377:25: required from โdecltype ((nlohmann::detail::from_json(j, val), void())) nlohmann::detail::from_json_fn::operator()(const BasicJsonType&, T&) const [with BasicJsonType = nlohmann::basic_json<>; T = Eigen::Matrix<double, -1, -1>; decltype ((nlohmann::detail::from_json(j, val), void())) = void]โ /usr/include/nlohmann/adl_serializer.hpp:28:30: required from โstatic decltype ((nlohmann::{anonymous}::from_json(forward<BasicJsonType>(j), val), void())) nlohmann::adl_serializer<T, SFINAE>::from_json(BasicJsonType&&, ValueType&) [with BasicJsonType = const nlohmann::basic_json<>&; ValueType = Eigen::Matrix<double, -1, -1>; <template-parameter-1-1> = Eigen::Matrix<double, -1, -1>; <template-parameter-1-2> = void; decltype ((nlohmann::{anonymous}::from_json(forward<BasicJsonType>(j), val), void())) = void]โ /usr/include/nlohmann/json.hpp:2643:45: required from โValueType nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::get() const [with ValueTypeCV = Eigen::Matrix<double, -1, -1>; ValueType = Eigen::Matrix<double, -1, -1>; typename std::enable_if<(((! nlohmann::detail::is_basic_json<U>::value) && nlohmann::detail::has_from_json<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>, ValueType>::value) && (! nlohmann::detail::has_non_default_from_json<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>, ValueType>::value)), int>::type <anonymous> = 0; ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string<char>; BooleanType = bool; NumberIntegerType = long int; NumberUnsignedType = long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::adl_serializer]โ /usr/include/nlohmann/json.hpp:2936:30: required from โnlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::operator ValueType() const [with ValueType = Eigen::Matrix<double, -1, -1>; typename std::enable_if<((((((! std::is_pointer<_Ptr>::value) && (! std::is_same<ValueType, nlohmann::detail::json_ref<nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer> > >::value)) && (! std::is_same<ValueType, typename StringType::value_type>::value)) && (! nlohmann::detail::is_basic_json<BasicJsonType>::value)) && (! std::is_same<ValueType, std::initializer_list<typename StringType::value_type> >::value)) && typename nlohmann::detail::detector<nlohmann::detail::nonesuch, void, nlohmann::detail::get_template_function, const nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>&, ValueType>::value_t:: value), int>::type <anonymous> = 0; ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string<char>; BooleanType = bool; NumberIntegerType = long int; NumberUnsignedType = long unsigned int; NumberFloatType = double; AllocatorType = std::allocator; JSONSerializer = nlohmann::adl_serializer]โ /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/functionapproximators/ModelParametersLWR.cpp:434:52: required from here /usr/local/include/eigen3/Eigen/src/Core/StlIterators.h:309:3: error: static assertion failed: YOU_TRIED_CALLING_A_VECTOR_METHOD_ON_A_MATRIX EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived); ^ In file included from /usr/local/include/eigen3/Eigen/Core:340:0, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.hpp:29, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/functionapproximators/Parameterizable.hpp:29, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/functionapproximators/ModelParameters.hpp:27, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/functionapproximators/ModelParametersRBFN.hpp:27, from /home/scu/workspace/ws_lhj/opensource/dmpbbo/src/functionapproximators/ModelParametersRBFN.cpp:24: /usr/local/include/eigen3/Eigen/src/Core/StlIterators.h:328:10: error: expression list treated as compound expression in functional cast [-fpermissive] return const_iterator(derived(), size()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/functionapproximators/CMakeFiles/functionapproximators.dir/build.make:313: recipe for target 'src/functionapproximators/CMakeFiles/functionapproximators.dir/ModelParametersLWR.cpp.o' failed make[2]: *** [src/functionapproximators/CMakeFiles/functionapproximators.dir/ModelParametersLWR.cpp.o] Error 1 src/functionapproximators/CMakeFiles/functionapproximators.dir/build.make:327: recipe for target 'src/functionapproximators/CMakeFiles/functionapproximators.dir/ModelParametersRBFN.cpp.o' failed make[2]: *** [src/functionapproximators/CMakeFiles/functionapproximators.dir/ModelParametersRBFN.cpp.o] Error 1 [ 52%] Linking CXX static library libbbo.a [ 52%] Built target bbo CMakeFiles/Makefile2:496: recipe for target 'src/functionapproximators/CMakeFiles/functionapproximators.dir/all' failed make[1]: *** [src/functionapproximators/CMakeFiles/functionapproximators.dir/all] Error 2 Makefile:135: recipe for target 'all' failed make: *** [all] Error 2
Thank you for your reply
(splitting #31 into several separate issues)
When the library is compiled in static and linked to another one, boost serialization crashes.
It works fine when it's a shared library.
I have been using older versions of DMPBBO (~2018). Recently I updated to the latest and observed that I can't save or load serialized DMPs anymore. After some debugging, I noticed that adding the #include "dmp/serialization.hpp"
line solves the saving issue. It is hard to spot since the program still builds without this header and it used to work without the header in the older versions. I suggest mentioning this in the documentation.
I still can't load the old DMP archives with the following error:
terminate called after throwing an instance of 'boost::archive::archive_exception'
what(): unregistered class
Probably, I will need to do some changes in the old XML files. I will send the updates.
When running demosDmpChangeGoal
, the 2nd and 3rd plot in the top row span both rows and are obscured by the plots on the lower row.
Some of the demos cause a core dump if they don't find the correct file rather than existing nicely
I found demoOptimizationDmp
(splitting #31 into several separate issues)
What is the process to become a contributor to the code? Is it just making a PR, or is there a contributors list that names should be appended to (or anything along these lines)? Could you add a sentence in the README on what the process for submitting code to this repo is?
I serialize and deserialize a Dmp similar to testDmpSerialization.cpp. Then, calling dmp->analyticalSolution() leads to a sigsegv error.
Crash occurs at 560th line of Dmp.cpp:
perturbation(i_dim) = (*analytical_solution_perturber_)();
Apparently, after deserialization analytical_solution_perturber_ is not NULL anymore. But I didn't set it before serialization. Also, there is no perturbation property in a serialized dmp.xml file.
As a workaround, calling dmp->set_perturbation_analytical_solution() after deserialization solves the problem:
{
// create and open an archive for input
ifstream ifs;
ifs.open(dmp_filename.c_str());
boost::archive::xml_iarchive ia(ifs);
// read class state from archive
ia >> BOOST_SERIALIZATION_NVP(dmp_);
} // brackets for auto-closing streams
// to avoid seg fault in analyticalSolution
dmp_->set_perturbation_analytical_solution(0.0);
Built with static libraries, debug mode. Ubuntu 16.04.
Hi
I have the following error when I execute the demo:
$python2 demoDmpBbo.py
../../../bin/demoDmpBbo /tmp/demoDmpBbo/
/home/marie-morgane/ensStage/dmpbbo/src/dynamicalsystems/SigmoidSystem.cpp:116:In function SigmoidSystem::computeKs(), Ks is too close to N_0s. This may lead to errors during numerical integration. Recommended solution: choose a lower magnitude for the maximum rate of change (currently it is -40)
Couldn't make directory '/tmp/demoDmpBbo/'. Not saving data.
Traceback (most recent call last):
File "demoDmpBbo.py", line 36, in <module>
plotEvolutionaryOptimization(directory,axs)
File "/home/marie-morgane/ensStage/dmpbbo/src/bbo/plotting/plotEvolutionaryOptimization.py", line 188, in plotEvolutionaryOptimization
plotLearningCurve(eval_at_samples,costs_eval,ax,costs_all)
File "/home/marie-morgane/ensStage/dmpbbo/src/bbo/plotting/plotEvolutionaryOptimization.py", line 151, in plotLearningCurve
y_limits = [0,1.2*max(costs_eval)];
ValueError: max() arg is an empty sequence
Could you please tell me if this problem comes from my install or if this is a more general issue?
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.