pantor / ruckig

Motion Generation for Robots and Machines. Real-time. Jerk-constrained. Time-optimal.
https://ruckig.com
MIT License
728 stars 164 forks source link

trajectory.hpp #64

Closed grotius-cnc closed 3 years ago

grotius-cnc commented 3 years ago

Hi,

I just cloned the newest repository because of the dynamic-DoFs input option. Thanks for that. My previous cloned repository had no compile problems so far except editing some include path for linux:

include <experimental/optional>

At the moment i just get one compile error.

At line 160 of trajectory.hpp :

any_interval |= t_min.has_value();

I get compile error : ‘class std::experimental::fundamentals_v1::optional’ has no member named ‘has_value’

Could i replace the current text with : bool val=0; if(t_min.value()>0){ val=1; } any_interval |= val;

Thanks.

P.s. i like your coding style. Only thing is, i never used template classes. Is it possible for you to avoid this setup? Or do i just need to understand this?

pantor commented 3 years ago

Hi @grotius-cnc,

Ruckig is primarily written in C++17, so please use a C++ compiler supporting that version. It seems that you are using an older compiler, so if you are not able to upgrade, there is the script path-c++11.sh to make Ruckig compatible with C++11. Note however that this results in a performance drop.

I think templates are a very useful and important feature of modern C++, so I really recommend to have a look into that. :wink: