In file included from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/api/function_impl.h:4,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/api/method.h:7,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/api/object.h:6,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/api/module.h:4,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/import.h:5,
from /home/ros/tmp/libtorch/libtorch/include/torch/script.h:9,
from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.hpp:4,
from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.cpp:1:
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/ir/ir.h:1371:7: note: initializing argument 2 of ‘torch::jit::Value* torch::jit::Graph::insertConstant(const c10::IValue&, int)’
1371
std::optional loc = c10::nullopt,
^~~~~
In file included from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/resolver.h:5,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/script_type_parser.h:4,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/unpickler.h:7,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/pickle.h:8,
from /home/ros/tmp/libtorch/libtorch/include/torch/script.h:10,
from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.hpp:4,
from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.cpp:1:
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:562:19: error: cannot convert ‘const torch::jit::SourceRange’ to ‘int’
562
/range=/loc);
^~~
const torch::jit::SourceRange
In file included from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/api/function_impl.h:4,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/api/method.h:7,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/api/object.h:6,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/api/module.h:4,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/import.h:5,
from /home/ros/tmp/libtorch/libtorch/include/torch/script.h:9,
from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.hpp:4,
from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.cpp:1:
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/ir/ir.h:1385:7: note: initializing argument 4 of ‘torch::jit::Value* torch::jit::Graph::insert(c10::Symbol, c10::ArrayRef, c10::ArrayRef, int)’
1385
const std::optional& range = {});
^~~~~~~
In file included from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/resolver.h:5,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/script_type_parser.h:4,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/unpickler.h:7,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/pickle.h:8,
from /home/ros/tmp/libtorch/libtorch/include/torch/script.h:10,
from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.hpp:4,
from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.cpp:1:
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h: At global scope:
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:641:12: error: ‘std::optional’ has not been declared
641
std::optional static_len = c10::nullopt);
^~~~
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:641:20: error: expected ‘,’ or ‘...’ before ‘<’ token
641
std::optional static_len = c10::nullopt);
^
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:657:8: error: ‘optional’ in namespace ‘std’ does not name a template type
657
std::optional staticLen() override {
^~~~
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:657:3: note: ‘std::optional’ is only available from C++17 onwards
657
std::optional staticLen() override {
^~~
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:670:8: error: ‘optional’ in namespace ‘std’ does not name a template type
670
std::optional staticlen;
^~~~
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:670:3: note: ‘std::optional’ is only available from C++17 onwards
670
std::optional staticlen;
^~~
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:715:8: error: ‘optional’ in namespace ‘std’ does not name a template type
715
std::optional staticLen() override {
^~~~
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:715:3: note: ‘std::optional’ is only available from C++17 onwards
715
std::optional staticLen() override {
^~~
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:733:8: error: ‘optional’ in namespace ‘std’ does not name a template type
733
std::optional unrolllength = c10::nullopt;
^~~~
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:733:3: note: ‘std::optional’ is only available from C++17 onwards
733
std::optional unrolllength = c10::nullopt;
^~~
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h: In member function ‘virtual std::shared_ptr torch::jit::SimpleSelf::makeSugared(torch::jit::Value*) const’:
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:747:16: error: cannot convert ‘const ClassTypePtr’ {aka ‘const std::shared_ptr’} to ‘c10::TypePtr’ {aka ‘c10::Type::SingletonOrSharedTypePtr’}
747
v->setType(classType_);
^~~~~~
const ClassTypePtr {aka const std::shared_ptr}
In file included from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/api/function_impl.h:4,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/api/method.h:7,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/api/object.h:6,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/api/module.h:4,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/import.h:5,
from /home/ros/tmp/libtorch/libtorch/include/torch/script.h:9,
from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.hpp:4,
from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.cpp:1:
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/ir/ir.h:1504:38: note: initializing argument 1 of ‘torch::jit::Value* torch::jit::Value::setType(c10::TypePtr)’
1504
inline Value* Value::setType(TypePtr type) {
~~^~
In file included from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/resolver.h:5,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/script_type_parser.h:4,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/unpickler.h:7,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/pickle.h:8,
from /home/ros/tmp/libtorch/libtorch/include/torch/script.h:10,
from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.hpp:4,
from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.cpp:1:
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h: In member function ‘virtual std::shared_ptr torch::jit::ExceptionValue::call(const torch::jit::SourceRange&, torch::jit::GraphFunction&, c10::ArrayRef, c10::ArrayRef, size_t)’:
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:797:74: error: cannot convert ‘const torch::jit::SourceRange’ to ‘int’
797
auto exceptionmessage = insertConstant(*m.graph(), message + ": ", loc);
^~~
const torch::jit::SourceRange
In file included from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/ir/named_value.h:4,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/ir/ir.h:5,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/api/function_impl.h:4,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/api/method.h:7,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/api/object.h:6,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/api/module.h:4,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/import.h:5,
from /home/ros/tmp/libtorch/libtorch/include/torch/script.h:9,
from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.hpp:4,
from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.cpp:1:
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/ir/constants.h:28:5: note: initializing argument 3 of ‘torch::jit::Value torch::jit::insertConstant(torch::jit::Graph&, const c10::IValue&, int)’
28 | std::optional loc = c10::nullopt,
| ^~~~~
In file included from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/resolver.h:5,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/script_type_parser.h:4,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/unpickler.h:7,
from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/pickle.h:8,
from /home/ros/tmp/libtorch/libtorch/include/torch/script.h:10,
from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.hpp:4,
from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.cpp:1:
/home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:800:43: error: no match for ‘operator’ (operand type is ‘c10::StringTypePtr’ {aka ‘c10::SingletonTypePtr’})
800 | if (!input_str->type()->isSubtypeOf(*StringType::get())) {
| ^~~~~~
`
rl_sim包中的CMakeLists出现问题,find_package所有包都找不到,换catkin_make出现以下报错
~~~~ In file included from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/resolver.h:5, from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/script_type_parser.h:4, from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/unpickler.h:7, from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/pickle.h:8, from /home/ros/tmp/libtorch/libtorch/include/torch/script.h:10, from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.hpp:4, from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.cpp:1: /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:562:19: error: cannot convert ‘const torch::jit::SourceRange’ to ‘int’ 562~~~~~~ In file included from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/resolver.h:5, from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/script_type_parser.h:4, from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/unpickler.h:7, from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/pickle.h:8, from /home/ros/tmp/libtorch/libtorch/include/torch/script.h:10, from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.hpp:4, from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.cpp:1: /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h: At global scope: /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:641:12: error: ‘std::optional’ has not been declared 641~~~ /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:641:20: error: expected ‘,’ or ‘...’ before ‘<’ token 641~~~ /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:657:3: note: ‘std::optional’ is only available from C++17 onwards 657~~~ /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:670:3: note: ‘std::optional’ is only available from C++17 onwards 670~~~ /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:715:3: note: ‘std::optional’ is only available from C++17 onwards 715~~~ /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:733:3: note: ‘std::optional’ is only available from C++17 onwards 733~~~~~~~^~ In file included from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/resolver.h:5, from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/script_type_parser.h:4, from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/unpickler.h:7, from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/pickle.h:8, from /home/ros/tmp/libtorch/libtorch/include/torch/script.h:10, from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.hpp:4, from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.cpp:1: /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h: In member function ‘virtual std::shared_ptrIn file included from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/ir/named_value.h:4, from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/ir/ir.h:5, from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/api/function_impl.h:4, from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/api/method.h:7, from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/api/object.h:6, from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/api/module.h:4, from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/import.h:5, from /home/ros/tmp/libtorch/libtorch/include/torch/script.h:9, from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.hpp:4, from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.cpp:1: /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/ir/constants.h:28:5: note: initializing argument 3 of ‘torch::jit::Value torch::jit::insertConstant(torch::jit::Graph&, const c10::IValue&, int)’ 28 | std::optional loc = c10::nullopt,
| ^ ’ (operand type is ‘c10::StringTypePtr’ {aka ‘c10::SingletonTypePtr’})
800 | if (!input_str->type()->isSubtypeOf(*StringType::get())) {
| ^
~~~~ In file included from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/resolver.h:5, from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/script_type_parser.h:4, from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/unpickler.h:7, from /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/serialization/pickle.h:8, from /home/ros/tmp/libtorch/libtorch/include/torch/script.h:10, from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.hpp:4, from /home/ros/tmp/wiki-grx-gazebo/src/rl_sim/library/rl_sdk/rl_sdk.cpp:1: /home/ros/tmp/libtorch/libtorch/include/torch/csrc/jit/frontend/sugared_value.h:800:43: error: no match for ‘operator~~~~~ `